March 2019
Intermediate to advanced
312 pages
7h 37m
English
The programming logic for detecting the right eye is very similar to detecting the left eye. The only thing that we have to change is the classifier name and some variable names to distinguish the left and right eyes. To detect the right eye, perform these steps:
CascadeClassifier eyeDetectorright("haarcascade_righteye_2splits.xml");
Mat faceroi = videofeed(face[f]); vector<Rect> righteye;eyeDetectorright.detectMultiScale(faceROI, ...