Search code examples
c++opencveye-detection

Eye detection with OpenCV (detecting eye from "Scream's mask")


I have to detect eyes from this picture and after I need the coordinates from them.

http://damngoodcup.com/wp-content/uploads/scream-mask.jpg

I have used OpenCV, and the following command:

eyes_cascade.detectMultiScale(frame_gray, eyes, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, Size(30, 30));

On other pictures (for eg.: on a selfie) it's working, but with this "Scream face" it's useless.

Is there way to find eyes on that picture? (using OpenCV is not important if there is any easier solution)


Solution

  • Haar classifier provided with opencv will not work for this image (face, eyes, etc), because it differs too much from the positive training data, which was only limited to humans' faces. For example, humans' eyes have different features to be extracted as haar features than the "eyes" in the image you've provided.

    If you would like to detect eye-like region in the image by haar cascade, you have to train you own by yourself. I don't think you can find any kind of such already trained classifier.