OpenCV and all about speed

asked 2015-02-08 11:38:17 -0500

ArcadeBit gravatar image

I am currently working on a face detection application.

I use the integrated webcam from my laptop. The maximum framerate of the webcam is 30FPS but I only get 15FPS out of the webcam. Measuring it, I take 30 Pictures in 2 Second or 55-75ms per picture.

Would a switch to a faster webcam, like the Playstation Eye, improve the performance?

The other questions are about the Face Detector itself.

    Size minSize = new Size(50, 50);
    Size maxSize = new Size(500, 500);
    faceDetector.detectMultiScale(image, result, 1.05, 3, CASCADE_FIND_BIGGEST_OBJECT, minSize, MaxSize);

The first is about the scaleFactor. What is the maximum value, which still achieves good results. I want to have a performance orientated version.

The second one is about the Flag. I use CASCADE_FIND_BIGGEST_OBJECT. Does this change the algorithm to start with a big sub-window and start to scale down, until it finds a Object and stop? Or does it still run through the complete pyramid from sub-windows?

My last question is about the multicore use from OpenCV. Does it use more then one core to detect a face or does it only run on one core. If it only runs on one core, is it smart to start 2 - 3 Threads, each one running a face detection with different Options? I would use a fast one, but with a bad detection and a slower one with a better detection. Would this make sense?

edit retag flag offensive close merge delete