Hades logo    Hades applet banner

TAMS / Java / Hades / applets (print version): contents | previous | next

Purple fringing reduction

Purple fringing reduction screenshot

Description

The so-called purple fringing image artifact compromises the image quality of many digital cameras. It occurs when dark objects are in front of bright areas, especially in wide-angle lens settings and wide aperture. As you can see in the demo image (a crop of a larger image of Cologne cathedral), the effect manifests itself with bright purple/blue artifacts around the high-contrast zones that completely dominate and destroy the picture.

The simple filter graph shown in the applet demonstrates a simple technique to at least reduce the purple fringing. The role of the special PurpleDetectionFilter is to detect image areas where the blue color component is larger than both the red and green components, with the required level-difference settable via the property-sheet. (Naturally, this filter could also have been constructed from multiple individual filters, but it seemed simpler to just write another Java class.)

The output of the PurpleDetectionFilter is a mask image, where 'purple' pixels in the original image are set to white, and the remaining pixels set to black. The mask image is then multiplied with a constant (blue) color (giving a blue mask image), which is then simply subtracted from the original input image. As you can see, this simple filter cascade reduces the purple fringing by a large amount.

Naturally, the simple algorithm shown here does not work very well when your input image contains purple areas that are real and not just imaging artifacts. A simple strategy to handle such cases are to restrict the PurpleDetectionFilter to a smaller region of the input image. A more complex algorithm would be to try combining the purple-detection with an edge-detection algorithm.

Run the applet | Run the editor (via Webstart)


Impressum | 24.11.06
http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/00-intro/02-imageprocessing/purple_print.html