The current paper provides methods to correct the artifact known as “red eye” by means of digital color image processing. This artifact is typically formed in amateur photographs taken with a built-in camera flash. To correct red eye artifacts, an image mask is computed by calculating a colorimetric distance between a prototypical reference “red eye” color and each pixel of the image containing the red eye. Various image processing algorithms such as thresholding, blob analysis, and morphological filtering, are applied to the mask, in order to eliminate noise, reduce errors, and facilitate a more natural looking result. The mask serves to identify pixels in the color image needing correction, and further serves to identify the amount of correction needed. Pixels identified as having red eye artifacts are modified to a substantially monochrome color, while the bright specular reflection of the eye is preserved.
Jon Y. Hardeberg, "Digital Red Eye Removal" in Journal of Imaging Science and Technology, 2002, pp 375 - 379, https://doi.org/10.2352/J.ImagingSci.Technol.2002.46.4.art00016