Face recognition and image normalization

2 visualizaciones (últimos 30 días)
Artyom
Artyom el 6 de Nov. de 2014
Comentada: Image Analyst el 8 de Jul. de 2016
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.

Respuesta aceptada

Dima Lisin
Dima Lisin el 6 de Nov. de 2014
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 comentarios
chinnurocks
chinnurocks el 8 de Jul. de 2016
How to get centre points of the eyes... automatically... I mean without using the data cursor manually ?
Image Analyst
Image Analyst el 8 de Jul. de 2016
Segment out the eyes, then use regionprops().

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 6 de Nov. de 2014
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