Sunday, 7 September 2014

How to draw a circle on detected face using vision toolbox in matlab with center of the circle highlighted

I = imread('KA.SA3.35.png');% this image has been extracted from japanese female expression %database
bb=step(fdetect,I);
c=bb(3)/2;
d=bb(4)/2;
cx=bb(1)+c
cy=bb(2)+d
position=[cx,cy,c];
videoout=insertObjectAnnotation(I,'circle',position,'face');
imshow(videoout);
hold on; plot(cx,cy,'+','MarkerSize',10);
hold off;

Results:


1 comment: