Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am facing a problem with processing some frontal facial images.

I need to adjust the centers of the eyes (irises) to be at certain specific pixels in the image. In other words, i need to transform the image until the centers of the eyes are at specific pixels.

Can anyone help me with this problem, an algorithm, technique, ...etc. that might solve this problem ?


share|cite|improve this question

Assuming you can find the centers of the eyes...

  1. Rotate - Find the difference of the angle between the actual eyes and your desired angle. Rotate image accordingly.
  2. Scale - Find the distance between eyes. Scale according to the desired distance.
  3. Translate - Move the image so that one eye lines up. If you've rotated and scaled properly, both should now be in the desired spot.
share|cite|improve this answer

You can apply homographic transformation to the image, the homography matrix can be estimated using the known positions of the points.

You can use OpenCV for quick implementation.

You can read this paper for your further reference:

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.