<< corr2 SIVP - Scilab Image and Video Processing Toolbox detectfaces >>

SIVP - Scilab Image and Video Processing Toolbox >> SIVP - Scilab Image and Video Processing Toolbox > detectlefteyes

detectlefteyes

Find left eyes in the image.

detectrighteyes

Find right eyes in the image.

Calling Sequence

leyes = detectlefteyes(im)
reyes = detectrighteyes(im)

Parameters

im
The input image, color or gray image.
leyes, reyes
An Nx4 matrix. Each row of the matrix contains information about an teye position and size: [x,y,w,h]. (x,y) is the top-left corner coordinates of a rectangle contains an eye; w,h are width and height of the rectangle respectively.

Description

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.

Examples

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);

Authors

Bibliography

"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.

Availability

The latest version of SIVP can be found at

http://sivp.sf.net

See Also

<< corr2 SIVP - Scilab Image and Video Processing Toolbox detectfaces >>