Very nice code! I'm so glad I don't have to compile the entire OpenCV library.
However, I'm having the same problem Chun-Yi is having, any other cascade except the included "frontface_alt" gives no results.
Furthermore, detection rates drop very fast at lower resolutions. I actually have to *upsample* my images (to something like 2000x1000 pixels, for group portraits) to detect faces. The "Scale" parameter is supposed to scale images down to 384 pixels, but I can't imagine getting *any* detections at that scale.
Rafaee,sr for disturbing u again. i have trouble with my final project,"People counting system using camera(in Matlab)". Can u give me some advice about how can we apply Viola-jones algorithm to counting people? my email: firstname.lastname@example.org. i have nothing just a song played by myself as a gift (https://www.youtube.com/watch?v=c2ima-xlzro).relaxing. have a nice day.
@nahatmusic, Example 1,
% 1- Need to Convert an OpenCV classifier XML file on a Matlab. There should be XML in HaarCascades folder / .xml
% 2 - Detect Faces
% 3 - ObjectDetection func.