The "Red-Eye" effect spoils many otherwise perfect photos. Even though digital cameras usually have a flash setting that prevents red-eye, how often do we forget to select that option?
Removing the red glare from the eye is very simple in applications that use csXImage. The method is demonstrated in the Visual basic demo program supplied in the csXImage download.
The photo is corrected in two steps.
(1) A region around the eye, usually an ellipse or a circle, is selected. This requires just one line of code.
(2) After the user completes the selection using the mouse, two further lines of code adjust the red intensity for pixels where it is the dominant colour.
ImageBox1.UseSelection := True
The result is shown below.
Selecting the red-eye
The final result
© Chestysoft, 2013.