Nave
Nave

Reputation: 715

Eye-detection in MATLAB

I have two images. In one of the images, my eye is in the center position and in the other image, it is in the left. How do I find out whether my eye is in the left or the right?

I am using MATLAB. Are there any functions for this?

Upvotes: 3

Views: 9194

Answers (5)

Syed Zain Nasir
Syed Zain Nasir

Reputation: 68

You should also have a look at Eye Ball Detection in MATLAB , they have detected eyes first and then detected the EyeBall.

Upvotes: 0

Ferdin Joe
Ferdin Joe

Reputation: 72

By using Color Distance Maps, the skin and non skin area can be differentiated and thus the non skin area contains the iris. From the iris, the whole eye could be detected. Hope it works.

Upvotes: 0

Yair
Yair

Reputation: 1345

If you are willing to select the eye in one image you can use template matching to find it in others (for example you can mark it in the first frame of a video and then find it in all other frames).

Look at the normxcor2 function in matlab: http://www.nd.edu/~hpcc/solaris8_usr_local/src/matlab6.1/help/toolbox/images/normxcorr2.html

This technique is robust to constant illumination change, but will fail if the appearance of the eye changes significantly between the image you took the template from and the image you are searching in.

If you are going to search for the eye in a lot of frames (for example, eye tracking from a webcam) then you should look at stronger techniques such as the Kalman Filter or the Particle Filter (aka Condensation Filter in computer vision)

Upvotes: 1

Amro
Amro

Reputation: 124573

A simple solution is to try to detect the iris using circular Hough Transform.

You can find a lot materials out there. To name a few, these two fileexchange submissions:

Upvotes: 3

Jacob
Jacob

Reputation: 34621

This sounds like Eye tracking implemented in MATLAB which is a fairly popular research topic.

If you want a more detailed answer, please answer the following questions:

  1. Do you know the coordinates of your eye in the first image?
  2. What kind of motion is there between the two images? Rotation/translation/scaling/...?
  3. Do you want this to be real-time?
  4. What is the resolution of the images?
  5. Are there going to be more eyes in the image apart from yours?

Upvotes: 2

Related Questions