darktable page lede image
darktable page lede image

Removal of red-eye effect

3.5.4. Removal of red-eye effect

3.5.4.1. Overview

The red-eye effect in photography is the common appearance of red pupils in color photographs of eyes. It occurs when using a photographic flash very close to the camera lens (as with most cameras with built-in flash), in ambient low light.

We use the channel mixer module to reduce the red color of the pupil. To limit the processing to the pupils we have to apply two masks.

3.5.4.2. Masking

  1. Enable the channel mixer module (see Section 3.4.2.18, “Channel mixer”).

  2. Activate blending

    Modules with blending support exhibit an additional combobox blend at the bottom of their GUI. Blending is activated with this combobox. Set value to drawn mask. Additional controls are displayed which allow you to draw a mask.

  3. Masking the pupil

    Clicking the symbol adds a circle shape.

    Click into the canvas to place the circle. Left-click and drag the circle to the position of the first pupil. Use the scroll-wheel of your mouse while in the circle to change the diameter. Scroll within the circle border to minimize the width of the gradual decay.

    Alternatively you can use an elliptical shape. See Section 3.2.5.5, “Drawn mask” for further details.

  4. Repeat step 3.

    Clicking the symbol adds another circle shape.

    Mark the second pupil.

3.5.4.3. Desaturation

  1. Approach - Modifying the output channel red.

    1. Set output channel destination to red (default)

    2. Set red color value to 0.00

    3. Set green color value to 0.50

    4. Set blue color value to 0.50

    You are free to experiment what gives you the most realistic pupil, but this is a good starting point. Another proposal is 0.10/0.60/0.30. The sum of the three values should be 1.

  1. Approach - Modifying the output channel gray.

    1. Set output channel destination to gray

    2. Set red color value to 0.24

    3. Set green color value to 0.68

    4. Set blue color value to 0.08

    You are free to experiment what gives you the most realistic pupil, but this is a good starting point. The sum of the three values should be 1.