detectlefteyes - Find left eyes in the image.
detectrighteyes - Find right eyes in the image.
The function finds left/right eyes in an image.
The result of lefteye detection or righteye detection is not enough accuracy as the face detection; results of lefteye detection and righteye detection are quite similar in some case. In order to get proper results, it's better to apply lefteye detection and righteye detection functions to a upper half of a detected face image.
im = imread(SIVP_PATH+'/images/lena.png'); face = detectfaces(im); rect = face*diag([1,1,1,0.7]); subface = imcrop(im, rect); leyes = detectlefteyes(subface); [m,n] = size(leyes); for i=1:m, im = rectangle(im, leyes(i,:)+rect*diag([1,1,0,0]), [0,255,0]); end; imshow(im);
"Rapid Object Detection using a Boosted Cascade of Simple Features", Paul Viola and Michael J. Jones, IEEE CVPR, 2001.
"An Extended Set of Haar-like Features for Rapid Object Detection", Rainer Lienhart and Jochen Maydt, IEEE ICIP 2002, Vol. 1, pp. 900-903, Sep. 2002.