Why does detectMultiScale return no faces?
I try to use tutorial code from opencv tutorials to detect faces. All cascades are loaded properly but after calling
faceCascade.detectMultiScale( frame_gray, faces, 1.1, 2, 0|CV_HAAR_SCALE_IMAGE, Size(20, 20) );
I get no faces, that means faces.size() returns 0. Does anybody played with this code? Does it work? What could I have wrong?
As I have written Mar 28 '14 at 11:57 I have had a bug in part of code showing if cascade is loaded. It was not. XML files HAVE to be in prog dir It is SOLVED
You are specifying minimum detected object size as (20,20). Maybe your image contains faces which are of much smaller size. Try changing it to smaller number.
This page explains various parameters of detectMultiScale function :