March 2019
Intermediate to advanced
312 pages
7h 37m
English
To test the haarcascade_eye output, observe the following steps:
CascadeClassifier eyeDetector("haarcascade_eye.xml");
To detect the eyes, we need to find the face region (region of interest) in the image (video feed). Inside the face-detection for loop, we will create a Mat variable called faceroi. videofeed(face[f]), which will find faces in videofeed and store them inside the faceroi variable:
Mat faceroi = videofeed(face[f]);
vector<Rect> eyes;eyeDetector.detectMultiScale(faceroi, eyes, 1.3, 5, 0 |CASCADE_SCALE_IMAGE,Size(30, 30));
In the ...