Ask Your Question

OpenCV Face Recognition Lag

asked 2012-10-20 12:17:41 -0600

beowulf gravatar image

Hello everybody, I managed to do a Face Recognition using my webcam, but unfortunately it is very slow, with a "lag".

Follow the code:

Why is slow? There is another technique better than the Haar Cascade?

Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-10-20 16:30:38 -0600

Here are my hints on how to speed up the Face Detection. First try to use the Local Binary Patterns Cascades coming with OpenCV. As you can see in this post, calculating the LBP codes for an image is computationally very simple. You can find the available LBP Cascades in the data folder coming with your OpenCV installation, see:

If this doesn't speed up the detection process significantly or if you are using LBP cascades already, then try to downscale the image with cv::resize, but I can't make any assumptions on the minimal image size for your detection task. Anyway, downscaling the input images should speed up the detection definitely.

And the most obvious way to speed up the detection process is to probably use a highly parallelized CascadeClassifier as available in the GPU module:

edit flag offensive delete link more

Question Tools


Asked: 2012-10-20 12:17:41 -0600

Seen: 2,511 times

Last updated: Oct 20 '12