I = imread('Image1.jpg');MouthDetect = vision.CascadeObjectDetector('Mouth','MergeThreshold',400);BB=step(MouthDetect,I);imshow(I); hold onfor i = 1:size(BB,1) rectangle('Position',BB(i,:),'LineWidth',2,'LineStyle','-','EdgeColor','r'); nbox = step(MouthDetect, I); x1 = nbox(1) + nbox(3)/2; y1 = nbox(2) + nbox(4)/2; plot(x1,y1, 'Marker','+','Color','red','MarkerSize',10); EyeDetect = vision.CascadeObjectDetector('EyePairBig'); BB=step(EyeDetect,I); hold on rectangle('Position',BB(i,:),'LineWidth',2,'LineStyle','-','EdgeColor','b'); nbox = step(EyeDetect, I); x2 = nbox(1) + nbox(3)/2; y2 = nbox(2) + nbox(4)/2; plot(x2,y2, 'Marker','+','Color','red','MarkerSize',10); p=plot([x1 x2],[y1 y2], 'Marker','+','Color','red','MarkerSize',10); end
MATLAB: How to plot the center point on the line
biometricseyesfacefind center point on lineimage processingImage Processing Toolboxlipsmouth
Best Answer