How to get the 4 pts for mouth in face parts detection????
3 views (last 30 days)
Show older comments
This is the pgm for face parts detection...
img = imread('f5.jpg');
detector = buildDetector();
[bbox bbimg faces bbfaces] = detectFaceParts(detector,img,3);
figure;imshow(bbimg);
for i=1:size(bbfaces,2)
figure;imshow(bbfaces{i});
end
leye = imcrop(img,bbox(:,5:8));
figure;imshow(leye);title ('Left Eye');
imsave;
reye = imcrop(img,bbox(:,9:12));
figure;imshow(reye); title ('Right Eye');
imsave;
mouth = imcrop(img,bbox(:,13:16));
figure;imshow(mouth); title ('Mouth');
imsave;
nose = imcrop(img,bbox(:,17:20));
figure;imshow(nose); title ('Nose');
imsave;
Using this pgm m extracting the left eye, right eye, mouth & nose. from tis i wanted to find 4 coordinate points(AU1, AU2, AU3, AU4) for mouth. how do i get those 4 pts?? can anyone plz help me out..
0 Comments
Answers (2)
Image Analyst
on 10 Aug 2013
I suggest you look at detail at the function detectFaceParts().
2 Comments
Image Analyst
on 10 Aug 2013
I said "I suggest you look..." - so what did you learn? I really have no idea what that code does and don't have the time to figure it out and explain it to you. Sorry but I hope you understand. You can use the debugger to step through it and understand what it does.
Anand
on 12 Aug 2013
img = imread('f5.jpg');
mouthDetector = vision.CascadeObjectDetector('Mouth');
bbox = step(mouthDetector,I);
2 Comments
Anand
on 14 Aug 2013
You would have to do some post-processing to get that information. For example, chances are the strongest corner points (using the corner function) at a symmetrical distance from the eye-ball (which can be found using imfindcircles). This is code you would need to develop yourself.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!