필터 지우기
필터 지우기

Face recognition and image normalization

조회 수: 3 (최근 30일)
Artyom
Artyom 2014년 11월 6일
댓글: Image Analyst 2016년 7월 8일
How can I normalize image to align the eyes with a horizontal line.
EyeDetect = vision.CascadeObjectDetector('EyePairBig');
I = imread('1.jpg');
BB=step(EyeDetect,I);
As I understand I can rotate image by imrotate , but I need to know angle of the rotation.

채택된 답변

Dima Lisin
Dima Lisin 2014년 11월 6일
If (x1,y1) is the center of the first eye, and (x2, y2) is the center of the second eye, then (y2 - y1) / (x2 - x1) is the tangent of the angle between the line connecting the two centers and the horizontal. You can get the angle using atan2(y2-y1, x2-x1).
  댓글 수: 2
chinnurocks
chinnurocks 2016년 7월 8일
How to get centre points of the eyes... automatically... I mean without using the data cursor manually ?
Image Analyst
Image Analyst 2016년 7월 8일
Segment out the eyes, then use regionprops().

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Image Analyst
Image Analyst 2014년 11월 6일
Be sure to see the Mathworks Webinar on Face detection/recognition on Nov. 13, 2014: Click Here

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by