RedEyeRemoval Class

Removes a red eye effect from an image.

Namespace: Aurigma.GraphicsMill.Transforms
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public sealed class RedEyeRemoval : IBitmapTransform, IDisposable

Remarks

Using this class you can add red eye removal functionality into your application. It supports two modes: Manual and Semiautomatic.

In the Manual mode, the tranfrom works in two steps:

  1. Select the face of the person whose eyes should be processed. The selection should be specified by the FaceRegion property.
  2. Specify red eye coordinates on the selected face (e.g. by mouse click). It is specified by the EyePoint property.

The Semiautomatic mode also requires the user to select a face. However it automatically searches red eyes on the selected face. When this mode is used, you can get the coordinates of red eyes found by the algorithm with a help of the Mask property. This way if the algorithm mistakes, you can display the user what was found and possible give them an opportunity to fix it manually. See the RedEyeMask and RedEyeBlob classes description for more details on this.

If you are not happy with results, you can play with sensitivity of the algorithm. Try to reduce the RedChannelThreshold property slightly. In the Manual mode you can play with additional property, namely Sensitivity.

Note

Both modes analyzes facial features when deciding what red pixels should be suppressed and what ones should not. This way the algorithm reduces probability of malfunction (i.e. mistake reddish areas of the face or background for red eyes). The more precise the user selects the face, the more accurate red eye effect removal will be. Also, if the user works in the Manual mode, they need try to click inside the red area of an eye. If the user clicks, say, white area of the flash reflection, the algorithm will not be able to fix red eye effect.

Inheritance Hierarchy

System.Object
L Aurigma.GraphicsMill.Transforms.RedEyeRemoval

Thread Safety

Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.

See Also

Reference