On Thu, 19 Aug 2010, Max wrote:
While I was checking out a Canon EOS 5D automatic face detection and focus, I wondered why this camera can do so effortless and the OpenCV on a Mac 8 core machine uses one Processor with 250% for that. When changing to greyscale colorspace and reducing the resolution to a quarter of PAL one get under 100% but it still still seems like a lot. Any Ideas why that could be?
There are several reasons, one of which being that specialised processors can still be much faster than general processors (just look at what video cards can do...) but it's also very possible that they downscale the image by a factor of 2*2 (4 times faster) or 4*4 (16 times faster) before starting to apply the face detection.
Note also that converting from GEM's YUV to RGB upscales the U and V channel by a factor of 2 horizontally (no vertical scaling), which means that the RGB data is a bit redundant. That's the "422" mode. For cameras in YUV "420" mode, there's also vertical scaling, therefore, in my camera code, I have added an option to convert directly from YUV420 to a twice narrower, twice shorter RGB picture, for the case where the chroma resolution is absolutely essential. It reduces a lot of waste.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801