CCD Camera Fringe Removal

The script removes the blue/purple fringe found in digital camera pictures.

This script came out of necessity, when laborious and tedious work for fixing a large set of images became too much! It's certainly not perfect, but it does do a really decent job for a hands-off approach!

Version 1.1 (2009 June 18)

  • Fixed some blotchiness found in overblown areas
  • Cleared bright areas instead of value invert for better recoloring
  • Added multiply layer to darken the fringe a bit
Version 1.2 (2009 July 5)
  • Masked the darkening layer so "big" blue objects aren't darkened unnecessarily, which also fixed problems with blotchiness found in large blue areas (sky shots)

The script is located in "<Image> / Script-Fu / Enhance / Defringe"

Feedback appreciated!

AttachmentSize
defringe.scm6.11 KB

Comments

Keep up the good work

I've been having a few problems with purple fringing myself and this helps enormously.

Hopefully a few points of constructive criticism won't offend:

When using defringe on a whole image it causes blotchiness on non-problem areas such as sky.
It also darkens these areas alot.

When I tried to extracting the areas with fringing and working on them in a seperate layer, I noticed that on repasting there is a dark border and and what looks like a tide line around it. It appears that darken fringe layer is being applied to the whole area. Would it be possible to link the fringe darkening to some edge detection so only the required edges are darkened?

If you would like more info contact me on: steve.churchill@bcs.org.uk

Regards
Steve Churchill

Blotchiness Fixed

This sky problem should be fixed now along with all "large" blue objects are now not darkened.

fringe colours

i have found in many moderate-inexpensive cameras that and image, say a lamp pole, will fringe blueish on one side and its compliment on the other side. this is usually due to poor camera optics. it would be nice if a plugin would exist where a bar or some pointer can be position to cancel colors and their compliments to target.

Error

Error: eval: unbound variable: Defringe

more info

can you give me some more info? what version of gimp are you using? did you have only one layer? was it RGB, grayscale, etc? thanks!