Removal of purple fringing from digital photos
OCaml Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
src
INSTALL
LICENSE
Makefile
README.md

README.md

Unpurple

Unpurple is a tool for removing purple fringes (axial chromatic aberration) from digital photos using a heuristic of my own.

Currently there is an OCaml implementation which produces a standalone executable with a simple command-line interface. It is fast enough (~ one second per megapixel) but doesn't preserve Exif data and the JPEG compression factor is fixed at 75%.

I gave up on the gimp integration, but if it's up for grabs if anyone is interested.

Example

Before:

Before

After:

After

Difference:

Difference

More examples

Algorithm outline

  1. Produce a blurred mask from the blue component in the original image.
  2. Subtract from the original image some amount of blue and red based on the intensities found in the blurred mask, using the following constraints:
    • Blue level may not drop below green level.
    • Red level may not drop below green level.
    • Red:blue ratio may not drop below some constant.

Please refer to the implementation for details and default parameters.