Red Eye Removal

26
1/26 Red Eye Removal Tony Meccio Red eye removal 17/04/2008

description

A presentation by Tony Mecciio on red eye removal algorithms and a comparison of the state-of-the-art products

Transcript of Red Eye Removal

Page 1: Red Eye Removal

1/26

Red Eye Removaly

Tony Meccio

Red eye removal 17/04/2008

Page 2: Red Eye Removal

2/26Overview

I t d ti t th R d E bl• Introduction to the Red Eye problem

• Red Eye prevention

• Red Eye detection

• Semi-automatic methods

• Automatic methods

R d E ti• Red Eye correction

• Desaturation

• Inpainting techniques

• False positives and unnatural corrections a po a d u a u a o o

• Red Eye removal examples

Red eye removal 17/04/2008

Page 3: Red Eye Removal

3/26The Red Eye problem

Th R d E h i llThe Red Eye phenomenon is a well-known problem which happens when taking flash-lighted pictures g g pof people.

The pupils in the picture appear red instead of black.

Thi h ft h This happens more often when using compact, consumer-oriented cameras.a a

Red eye removal 17/04/2008

Page 4: Red Eye Removal

4/26Why the Red Eye?

Red Eye Cone

Eye

α β

Eye

α ββα β

• The red eye cone shines from the flashed eye back at the flash with an angle α;g ;

• Its red color is caused by the reflection of the flash off the blood vessels of the retina;a o b ood o a;

• The camera will record this red hue if the angle βbetween the flash and the camera is not greater be ee e as a d e ca e a s o g ea ethan α.

Red eye removal 17/04/2008

Page 5: Red Eye Removal

5/26Red Eye prevention

Eye Red Eye ConeRed Eye Cone

α

ββ

• If the equipment allows it, the flash can be spaced further away from the sensor in order to increase yβ (not possible on compact devices);

• One or more additional flashes before picture O o o add o a a b o p uacquisition make the iris tighten and decrease α;

• This methods reduce the probability of the Red s e ods educe e p obab y o e edEye phenomenon but don’t remove it entirely.

Red eye removal 17/04/2008

Page 6: Red Eye Removal

6/26Red Eye detection

M t f th ti d t b d Most of the times, red eyes must be removed during post-processing.

F d t b f ll d th t For red eyes to be successfully removed, they must be first detected then corrected.

Methods are classified according to the detection hphase:

• Semi-automatic methods ask the user to ll l li th d manually localize the red eyes;

• Automatic methods detect the red eyes th lthemselves.

Red eye removal 17/04/2008

Page 7: Red Eye Removal

7/26Semi-automatic methodsThe eyes are manually selected using a visual interface (Adobe g (Photoshop ®, Corel Paint Shop Pro ®, ACD See ®, etc.)

Pros:

• Eyes are easy to localize for y ymen.

Cons:

• It may be difficult to have such an interface on a mobile device;

• Automatic methods are easier u o a od a ato use and more appealing.

Red eye removal 17/04/2008

Page 8: Red Eye Removal

8/26Automatic methods

A t ti th d tt t t fi d d Automatic methods attempt to find red eyes on their own. The task is harder than it may seem:

N “ f t” R d E d t ti th d h No “perfect” Red Eye detection method has been developed yet.

A t ti th d t t f t f i i Automatic methods extract features from images in order to identify red eyes. Different methods work on different features:

Face detection Skin detection• Face detection

• Eye detection

• Skin detection

• Flash-noFlash comparisoncomparison

Red eye removal 17/04/2008

Page 9: Red Eye Removal

9/26Face-based methods

F l k d f i lti l f t • Faces are looked for using a multiple feature object based approach;

O th f f t h b f d th th • Once the face features have been found then the research is restricted to red pixels.

Face

ExtractionExtraction

Extracted

AreaMultiple Masks

Red Eye ResearchArea Red-Eye Research

Red eye removal 17/04/2008

Page 10: Red Eye Removal

10/26Eye-based methods

Si il t f d t ti b t lSimilar to face detection, but more complexbecause the features are less evident:

E k d t hi fi d t l t t • Eyes are seeked, matching fixed templates at different resolutions with regular eyes present into the images, or looking for red pixels using g , g p gcomputed color LUTs.

Initial Single Eye Pairing Candidate Detection

g yVerification

gVerification

Red eye removal 17/04/2008

Page 11: Red Eye Removal

11/26Skin-based methods

Ski i d t t d fi t b i l l• Skin is detected first by pixel colors;

• Red circular patches near the skin are then l k d flooked for.

This approach is simpler and does not take into t th f l f taccount the presence of more complex features.

Red Circular Pairing

Skin

Detection

Patches

Research

gVerification

Optional

Red eye removal 17/04/2008

Page 12: Red Eye Removal

12/26Flash-noFlash methods

• Two different pictures, ith fl h d one with flash and one

without, are acquired one after the other;;

• Red eyes are detected as patches whose color is pred in the “flash”image and black in the “ fl h” i“nonflash” image.

This approach has several drawbacks:

• The dimension of the buffer must double;

• The two images may be mis-aligned;e o ages ay be s a g ed;

• The subject(s) may move between acquisitions.

Red eye removal 17/04/2008

Page 13: Red Eye Removal

13/26An algorithm in detail

Input Skin Morphological Red Color

Detection in

Image Detection Operators Skin Area

Morphological Operators

Corrected

Image

Operators

Single Eye Verification

Pairing Verification

Red-Eye

Correctiong

The Algorithm is Skin Feature Extraction based.

• First the skin is extracted and morphologically modified to blob the enhanced areas;

• Then a successive red color detection is performed to find red eyes in the skin areas;

• The red regions are then dilated, eroded and analyzedto identify the Red-Eyes pairs.

Red eye removal 17/04/2008

Page 14: Red Eye Removal

14/26Example

Input Image Skin Detection Morphological Operators

Red Color Detection

in Skin Areain Skin Area

Corrected

Image

Morphological Operators

Pairing Verification

Red eye removal 17/04/2008

Page 15: Red Eye Removal

15/26Input/Output comparison

Red eye removal 17/04/2008

Page 16: Red Eye Removal

16/26Algorithm drawbacks

U bl t f i l d d t ti• Unable to perform single red eye detection;

• The skin detection is performed over the whole image (slow);

• Big (slow) morphological operators permit to get g ( ) p g p p ggood results only on small images (less than 1 Mpixels): it would require even bigger (and slower)

t t t l ioperators to operate on larger images.

Red eye removal 17/04/2008

Page 17: Red Eye Removal

17/26Red eye correction

O d h b d t t d th t b Once red eyes have been detected, they must be corrected.

Red eye correction is quite simpler than detection, b t th diffi lt th thbut there are more difficult cases than others.

Correction may vary from simple desaturation to complete reconstruction of iris and pupil.

Red eye removal 17/04/2008

Page 18: Red Eye Removal

18/26Desaturation

Desaturation means lowering/zeroing the chrominancecomponents while mantaining the luminance componentcomponents while mantaining the luminance component.

It is the best way to correct “easy” red eyes.

Red eye removal 17/04/2008

Page 19: Red Eye Removal

19/26Washed-out irises

Washed-out irises Wrong correction

Sometimes irises are totally washed out by reflected light. In these cases a simple desaturation or color correction is not enough.

It is necessary to use a more complex method to reconstruct a realistic image of the eye.

Red eye removal 17/04/2008

Page 20: Red Eye Removal

20/26Inpainting techniques

Some tools completely reconstruct the irises and the pupils t l th d (J P i t Sh P ®)to replace the red eye (Jasc Paint Shop Pro ®).

The results, however, are often unrealistic and look like glass eyes.

Red eye removal 17/04/2008

Page 21: Red Eye Removal

21/26False positivesOne of the biggest issue in red eye removal are false positives in the detection phase.p p

Unwanted corrections are much less desirable than missing onesmissing ones.

Red eye removal 17/04/2008

Page 22: Red Eye Removal

22/26Unnatural corrections• Unnatural corrections are another

important issue.important issue.• The most common ones are:

• Partial correction: only a f Partial correctionportion of the red pupil has

been corrected;• Noisy correction: the presence

Partial correction

Noisy correction: the presence of heavy noise or jpeg compression can introduce false red pixels around the pupil and red pixels around the pupil and thus a strange correction is made over the iris;

Noisy correction

• Wrong luminance correction: in this case the disk has been correctly found but the correctly found but the correction is unnatural due to wrong luminance distribution.

Wrong luminance correction

Red eye removal 17/04/2008

Page 23: Red Eye Removal

23/26Red Eye removal examples

StopRedeyes® AutoRemover®

Red eye removal 17/04/2008

Page 24: Red Eye Removal

24/26Red Eye removal examples

StopRedeyes® AutoRemover®

Red eye removal 17/04/2008

Page 25: Red Eye Removal

25/26Red Eye removal examples

StopRedeyes® AutoRemover®

Red eye removal 17/04/2008

Page 26: Red Eye Removal

26/26References• J.Y. Hardeberg, “Red Eye Removal using Digital Color Image Processing”, Conexant Systems, Inc. , Redmond, Washington, USA

• M. Gaubatz, R. Ulichney, “Automatic Red-Eye Detection and Correction”, HP Lab, Cornell University ICIP 2002 University, ICIP 2002

• S. Ioffe, “Red Eye Detection With Machine Learning”, Fujifilm Software, California, ICIP 2003.

• F Gasparini R Schettini “Automatic Redeye Removal for Smart Enhancement of Photos of • F. Gasparini, R. Schettini, Automatic Redeye Removal for Smart Enhancement of Photos of Unknown Origin”, DISCO University of Milano-Bicocca, VIS 2005.

• H. Luo, J. Yen, D. Tretter, “An Efficient Redeye Detection and Correction Algorithm”, HP labs, Palo Alto, California, ICPR 2004.

• A. Patti, K. Konstantinides, D. Tretter, Q. Lin, “Automatic Digital Redeye Reduction”, HP Labs, Palo Alto California, ICIP 1998.

• L. Zhang, Y. Sun, M. Li, H. Zhang, “Automated Red-Eye Detection and Correction in Digital Photographs” Microsoft Research Asia China ICIP 2004Photographs”, Microsoft Research Asia, China, ICIP 2004

• B. Smolka, K. Czubin, J.Y. Hardeberg, K.N. Palataniotis, M. Szczepanski, K. Wojciechowski, “Towars Automatic Redeye Effect Removal”, Pattern Recognition Letter 2003.

• J S Schildkraut R T Gray “A Fully Automatic Redeye Detection and Correction Algorithm” • J.S. Schildkraut, R. T. Gray, A Fully Automatic Redeye Detection and Correction Algorithm , Kodak Company, NY, ICIP 2002.

• R. Schettini, F. Gasparini, F. Chazli, ”A Modular Procedure for Automatic Redeye Correction in Digital Photos”, DISCO University of Milano-Bicocca, SPIE 2004

• PETSCHNIGG, G., AGRAWALA, M., HOPPE, H., SZELISKI, R., COHEN, M., and TOYAMA, K. 2004. Digital photography with flash and no-flash image pairs. ACM Transactions on Graphics 23, 3 (Aug.), 664–672.

Red eye removal 17/04/2008