Matthieu Napoli Matthieu Napoli - 1 month ago 16
C++ Question

Slow face detection on OpenCV?

I compiled and installed OpenCV (last version from the SVN) on Mac Os X (this is maybe the source of the problem).

The sample works, but the face detection algorithm seems slow to me. The detection time for a face is around 400ms (I just used the example included). The FPS is then quite low.

On youtube and all, I see super-smooth video with real time face detection (even on the iPhone) so I feel confuse. I remember it being even faster on my old Windows PC.

Is 400 ms a correct detection time ?

Note : my Macbook is not old (2009) and everything runs fine on it. I use the iSight webcam (integrated webcam). I have just one face (my face) on the webcam. And it is around the same time if there is no face.

Answer

What is the size of the input image. I am guessing 640x480. Generally people who post YouTube videos resize the image to 160x120. IN full resolution of 640x480 it is very difficult to get more than 2-3 fps. Try to send 160x120 image. You should be getting at least 10fps.