Removing red eye 2015-03-01

The red eye effect occurs when a strong light source, typically a flash, is reflected off the retina in the picture, giving a red rather than black pupil. As the reflection is specular, it requires the flash source to be near the lense. The red eye effect is therefore best eliminated by changing the lighting of the picture, for example by using ambient light rather than a flash. If this can't be done, it can be removed in

To remove red eye(s) from an image, visit the editor and import your image. Then select the red eye remove tool. Now click on the red eye you'd like to remove. You might optionally have to change the size of the tool to fit the eye.

The red eye effect is removed by setting the value of the red channel to the average of the green and blue channels. This helps preserve the intensity of the pixel, avoiding a 'dead-eye' effect. This operation is simply coded as, using the stet image representation,

  for(var byte in region)
    var green = image[byte + 1];
    var blue  = image[byte + 2];
    var red = (green + blue) / 2;
    image[byte] = red;
Back to blog