Face detection with HAAR Classifier
Hi,
I am trying to detect face features of people while using a webcam. I used HAAR Classifiers with haarcascade_frontalface_alt2.xml. It works well but the main problem I have is that as soon as the person does not front the camera perfectly, the face is not detected. I then tried to detect only the nose with haarcascade_mcs_nose.xml but I have the same problem.
I know this is possible because I saw people implementing this with HAAR classifier but I don't know what I am doing wrong...
I use:
cvtColor(frame, frame_gray, CV_BGR2GRAY);
equalizeHist(frame_gray, frame_gray);
face_cascade.detectMultiScale(frame_gray, faces, 1.1, 2, CASCADE_FIND_BIGGEST_OBJECT | CASCADE_DO_ROUGH_SEARCH, Size(30, 30), Size(200, 200));
Thank you very much !
Alex