Search This Blog

TopMeny

Thursday, December 13, 2007

Red eye removal

A simple red eye removal tool using Matlab.

redeye.jpg
It seems like a simple task, but red eye removal is quite complicated. It includes locating the eye and removing the redness and make the eye look natural with a believable color and specular shine. This was a task that was given to us in the Advances Image Processing course. We completed the program using matlab and got a really good understanding of the problem.

A few persons have asked me if I could publish the matlab code, but I wont do that. Many of you are in school projects and should solve the problem yourself. This seems to be a trivial problem but it is in fact quite complicated. There are many, many ways to solve this and I can give you some hints to a good solution. Do not try to do an automatic solution that scans the whole image, you will then need to use som face-recognition algorithm and you do not want to go there, instead use the built in functions in matlab to mark an area. Then search for round areas in the red channel and do some opening/closing to get rid of noise. When you are changing the color, be sure that you dont remove the specular spot in the eyes becaus that will kill the person in the photo :) (It wont look realistic).

5 comments:

Crusader said...

Hi I am currently working on the same project and you are right its my " Final year Project". I have detected the red eyes by the bright glint in the center of the eye due to the flash but correction is something where i am stuck.....PLzz can you throw me a hint on how to solve the problem really i would be quite greatful ...my email id is shashank.mendiratta1@gmail.com

Thank you very much

regards

Shashank

Unknown said...

hey there....

i want to take red eye removal as my subject project of DSP....plz help me out....how to start this project? and which topic i should sutdy to achieve this project???
my id is abubakar.yamin@gmail.com

Anonymous said...

Hi I am currently working on the same project and you are right its my " Final year Project". I have detected the red eyes by the bright glint in the center of the eye due to the flash but correction is something where i am stuck.....PLzz can you throw me a hint on how to solve the problem really i would be quite greatful ...my email id is infosac3@gmail.com

Unknown said...

Hi,
This looks like fun :) I kinda liked the idea of doing it using MATLAB instead of Photoshop. Can you email me the code to mhalattas@hotmail.com

Thanx, I appreciate it,
Moe Alattas

Anonymous said...

hi i am a research assistant at yasar university in Turkey. I would really appreaciate it if i can have your red eye removal matlab code. myself is also working on some code, but i want to discuss other methods in the class. thanks. gokhan.demirkiran@hotmail.com