ImageGear for C and C++ on Windows v19.10 - Updated
Red-Eye Removal
User Guide > How to Work with... > Image Processing and Cleanup > Red-Eye Removal

Red-eye removal removes the "red eye" effect in color images by converting the red color in the eye to the new specified color. ImageGear's Red-Eye Removal works by detecting an area around a specified point where the colors correspond to the point color with the specified threshold. This detected area is saved as a Region of Interest (ROI) of the hIGear. Red eye is then removed for every point in the ROI of a hIGear. It is designed only for red eye removal, not other colors (as may occur with animal eyes).

The IG_IP_detect_redeye_area detects an area around specified point where the colors correspond to the point color with the specified threshold. The detected area is returned as a ROI.

For example, the color of the specified point is:

Red == 212;

Green == 96;

Blue == 128;

And threshold is 10.

The method detects a closed polygon around the specified point in which the color components belong to the range.

Red - 202.. 222;

Green - 86..106

Blue - 118.. 138

The IG_IP_remove_redeye removes red eye for every point in the ROI of a hIGear image. First, the red component must be reduced to be around the same level of the green and blue components. Then, all three components must be reduced. The following are some examples of corrected color values:

210,39,71 -> 25,23,26

186,77,82 -> 64,54,53

236,95,101 -> 80,80,78