Eye Detection
The next step in the workflow is Eye detection.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhEag8vyZS77UtDLN5uoY_VN2URErL4DZywlh-s2_BA-yCBJaZF0n9VUrXptCmEBaFWhqvZZLUUhzpzuQG9Y0I7nBwcZAtW8Jol6s-npiZGrhH44xEt7d6JT8s8_sCBCBRu15KHVxXC30/s200/I2.JPG)
CODE:
ed = vision.CascadeObjectDetector('EyePairBig');
BoundBox=step(ed,J);
figure,imshow(J);
for i = 1:size(BoundBox,1)
aaa = rectangle('Position',BoundBox(i,:),'LineWidth',4,'LineStyle','-','EdgeColor','r');
end
%Crop out eye area
for i = 1:size(BoundBox,1)
J= imcrop(J,BoundBox(i,:))
figure(3),subplot(2,2,i);imshow(J);
end
Comments
Post a Comment