RSS/Atom feed Twitter
Site is read-only, email is disabled

Purple fringing removal extension

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

12 of 12 messages available
Toggle history

Please log in to manage your subscriptions.

Purple fringing removal extension Martin Jambon 14 Jul 08:35
  Purple fringing removal extension Monty Montgomery 14 Jul 20:51
   Purple fringing removal extension Martin Jambon 15 Jul 07:17
  Purple fringing removal extension Alexandre Prokoudine 14 Jul 21:19
   Purple fringing removal extension Robert Krawitz 14 Jul 22:51
    Purple fringing removal extension wwp 15 Jul 07:05
    Purple fringing removal extension Alexandre Prokoudine 16 Jul 08:37
   Purple fringing removal extension Robert Krawitz 14 Jul 22:56
    Purple fringing removal extension Martin Jambon 15 Jul 07:52
    Purple fringing removal extension Martin Jambon 15 Jul 07:54
     Purple fringing removal extension Robert Krawitz 15 Jul 15:14
      Purple fringing removal extension Martin Jambon 16 Jul 07:49
Martin Jambon
2012-07-14 08:35:21 UTC (over 12 years ago)

Purple fringing removal extension

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

My algorithm needs to perform pixelwise operations (+, -, min, max between two channels; scaling of one channel) but I also would prefer something that is easy to install (for users) and easy to maintain (for me).

The OCaml source code is here; it should give an idea of what's needed:

https://github.com/mjambon/purple-fringe/blob/master/src/unpurple.ml

(see functions make_purple_blur and remove_purple_blur, lines 103-177)

My questions are:

1. Is it possible to do that using a Gimp script?

2. If so, Scheme or Python?

3. If a plugin makes more sense, will average users be able to install it for themselves or would I have to wait for the inclusion in some standard precompiled distribution?

Also, please let me know if you're interested in the tool or if you know something that is already usable from within Gimp. The results obtained with Darla's purple fringe script
(http://www.farcrydesign.com/GIMP/PurpleFringe.html) were too disapppointing, and my recent camera's built-in chromatic aberration correction doesn't do much either (Sony NEX-5N).

Any sort of help is appreciated!

Thanks,

Martin

Monty Montgomery
2012-07-14 20:51:11 UTC (over 12 years ago)

Purple fringing removal extension

On Sat, Jul 14, 2012 at 4:35 AM, Martin Jambon wrote:

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

Hey, that's not half bad. I especially like that it doesn't go overboard trying to 'fix' everything completely, just makes a nice solid improvement.

Do you have any examples that show it not working well, or doing something unexpected? For example, a camera where the fringing is a slightly different hue due to a slightly different Bayer filter, or a different UV cutoff?

I would Totally Use This, especially given my fondness for vintage lenses that can fringe badly.

Monty

Alexandre Prokoudine
2012-07-14 21:19:52 UTC (over 12 years ago)

Purple fringing removal extension

On Sat, Jul 14, 2012 at 12:35 PM, Martin Jambon wrote:

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

My algorithm needs to perform pixelwise operations (+, -, min, max between two channels; scaling of one channel) but I also would prefer something that is easy to install (for users) and easy to maintain (for me).

The OCaml source code is here; it should give an idea of what's needed:

https://github.com/mjambon/purple-fringe/blob/master/src/unpurple.ml

(see functions make_purple_blur and remove_purple_blur, lines 103-177)

My questions are:

1. Is it possible to do that using a Gimp script?

2. If so, Scheme or Python?

3. If a plugin makes more sense, will average users be able to install it for themselves or would I have to wait for the inclusion in some standard precompiled distribution?

Just in case, are you aware of http://kcd.sourceforge.net/fix-ca.php ?

Alexandre Prokoudine http://libregraphicsworld.org

Robert Krawitz
2012-07-14 22:51:15 UTC (over 12 years ago)

Purple fringing removal extension

On Sun, 15 Jul 2012 01:19:52 +0400, Alexandre Prokoudine wrote:

On Sat, Jul 14, 2012 at 12:35 PM, Martin Jambon wrote:

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

My algorithm needs to perform pixelwise operations (+, -, min, max between two channels; scaling of one channel) but I also would prefer something that is easy to install (for users) and easy to maintain (for me).

The OCaml source code is here; it should give an idea of what's needed:

https://github.com/mjambon/purple-fringe/blob/master/src/unpurple.ml

(see functions make_purple_blur and remove_purple_blur, lines 103-177)

My questions are:

1. Is it possible to do that using a Gimp script?

2. If so, Scheme or Python?

3. If a plugin makes more sense, will average users be able to install it for themselves or would I have to wait for the inclusion in some standard precompiled distribution?

Just in case, are you aware of http://kcd.sourceforge.net/fix-ca.php ?

That fixes lateral chromatic aberration (the focal length, or image magnification, is different for different wavelengths but the focal plane is the same). Purple fringing is caused by longitudinal chromatic aberration (the focal plane is different for different wavelengths). It's a different lens defect and is much more difficult to fix (stopping down reduces the problem, since it increases depth of field, but there are often reasons why you don't want to do that).

Lateral chromatic aberration will be zero at the center of the image and will increase toward the edges; longitudinal chromatic aberration will affect the entire image field (including the very center) more or less equally.

Martin's tool looks very impressive, particularly for those of us who have the Canon 85 f/1.8 -- a truly great lens marred only by a fair bit of purple fringing at large apertures.

Robert Krawitz
2012-07-14 22:56:57 UTC (over 12 years ago)

Purple fringing removal extension

On Sun, 15 Jul 2012 01:19:52 +0400, Alexandre Prokoudine wrote:

On Sat, Jul 14, 2012 at 12:35 PM, Martin Jambon wrote:

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

My algorithm needs to perform pixelwise operations (+, -, min, max between two channels; scaling of one channel) but I also would prefer something that is easy to install (for users) and easy to maintain (for me).

The OCaml source code is here; it should give an idea of what's needed:

https://github.com/mjambon/purple-fringe/blob/master/src/unpurple.ml

(see functions make_purple_blur and remove_purple_blur, lines 103-177)

My questions are:

1. Is it possible to do that using a Gimp script?

2. If so, Scheme or Python?

3. If a plugin makes more sense, will average users be able to install it for themselves or would I have to wait for the inclusion in some standard precompiled distribution?

Just in case, are you aware of http://kcd.sourceforge.net/fix-ca.php ?

BTW, Martin, I'd suggest optimizing it -- 1 second/megapixel is a fair amount of time for someone processing a lot of 18 MP images, and people with Nikon D800's will be even more unhappy. You may also want to talk with the ImageMagick folks about getting it included there. This could become a very important part of a photographic workflow.

wwp
2012-07-15 07:05:46 UTC (over 12 years ago)

Purple fringing removal extension

Hello Robert,

On Sat, 14 Jul 2012 18:51:15 -0400 Robert Krawitz wrote:

On Sun, 15 Jul 2012 01:19:52 +0400, Alexandre Prokoudine wrote:

On Sat, Jul 14, 2012 at 12:35 PM, Martin Jambon wrote:

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

My algorithm needs to perform pixelwise operations (+, -, min, max between two channels; scaling of one channel) but I also would prefer something that is easy to install (for users) and easy to maintain (fo> >> The OCaml source code is here; it should give an idea of what's needed:

https://github.com/mjambon/purple-fringe/blob/master/src/unpurple.ml

(see functions make_purple_blur and remove_purple_blur, lines 103-177)

My questions are:

1. Is it possible to do that using a Gimp script?

2. If so, Scheme or Python?

3. If a plugin makes more sense, will average users be able to install it for themselves or would I have to wait for the inclusion in some standard precompiled distribution?

Just in case, are you aware of http://kcd.sourceforge.net/fix-ca.php ?

That fixes lateral chromatic aberration (the focal length, or image magnification, is different for different wavelengths but the focal plane is the same). Purple fringing is caused by longitudinal chromatic aberration (the focal plane is different for different wavelengths). It's a different lens defect and is much more difficult to fix (stopping down reduces the problem, since it increases depth of field, but there are often reasons why you don't want to do that).

Lateral chromatic aberration will be zero at the center of the image and will increase toward the edges; longitudinal chromatic aberration will affect the entire image field (including the very center) more or less equally.

Martin's tool looks very impressive, particularly for those of us who have the Canon 85 f/1.8 -- a truly great lens marred only by a fair bit of purple fringing at large apertures.

I second that, his work is impressive!

Regards,

wwp
Martin Jambon
2012-07-15 07:17:46 UTC (over 12 years ago)

Purple fringing removal extension

On 07/14/2012 01:51 PM, Monty Montgomery wrote:

On Sat, Jul 14, 2012 at 4:35 AM, Martin Jambon wrote:

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

Hey, that's not half bad. I especially like that it doesn't go overboard trying to 'fix' everything completely, just makes a nice solid improvement.

Do you have any examples that show it not working well, or doing something unexpected? For example, a camera where the fringing is a slightly different hue due to a slightly different Bayer filter, or a different UV cutoff?

It requires manual tuning when purple objects are present, otherwise the default settings would often grey them out. The purple areas in the last example at http://mjambon.com/purple-fringe/examples.html would become completely black with the default settings.

I am sure there are many ways to improve the results but before digging deeper, which can last forever, I would like to create an initial Gimp extension.

I would Totally Use This, especially given my fondness for vintage lenses that can fringe badly.

Good to hear!

Martin

Martin Jambon
2012-07-15 07:52:13 UTC (over 12 years ago)

Purple fringing removal extension

On 07/14/2012 03:56 PM, Robert Krawitz wrote:

On Sun, 15 Jul 2012 01:19:52 +0400, Alexandre Prokoudine wrote:

On Sat, Jul 14, 2012 at 12:35 PM, Martin Jambon wrote:

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

My algorithm needs to perform pixelwise operations (+, -, min, max between two channels; scaling of one channel) but I also would prefer something that is easy to install (for users) and easy to maintain (for me).

The OCaml source code is here; it should give an idea of what's needed:

https://github.com/mjambon/purple-fringe/blob/master/src/unpurple.ml

(see functions make_purple_blur and remove_purple_blur, lines 103-177)

My questions are:

1. Is it possible to do that using a Gimp script?

2. If so, Scheme or Python?

3. If a plugin makes more sense, will average users be able to install it for themselves or would I have to wait for the inclusion in some standard precompiled distribution?

Just in case, are you aware of http://kcd.sourceforge.net/fix-ca.php ?

BTW, Martin, I'd suggest optimizing it -- 1 second/megapixel is a fair amount of time for someone processing a lot of 18 MP images, and people with Nikon D800's will be even more unhappy. You may also want to talk with the ImageMagick folks about getting it included there. This could become a very important part of a photographic workflow.

Right. I'd like to try built-in implementations of blur algorithms first, since it is likely to remain the bottleneck of my algorithm. If that's not enough, some parallelization should help.

Martin

Martin Jambon
2012-07-15 07:54:50 UTC (over 12 years ago)

Purple fringing removal extension

On 07/14/2012 03:56 PM, Robert Krawitz wrote:

On Sun, 15 Jul 2012 01:19:52 +0400, Alexandre Prokoudine wrote:

On Sat, Jul 14, 2012 at 12:35 PM, Martin Jambon wrote:

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

My algorithm needs to perform pixelwise operations (+, -, min, max between two channels; scaling of one channel) but I also would prefer something that is easy to install (for users) and easy to maintain (for me).

The OCaml source code is here; it should give an idea of what's needed:

https://github.com/mjambon/purple-fringe/blob/master/src/unpurple.ml

(see functions make_purple_blur and remove_purple_blur, lines 103-177)

My questions are:

1. Is it possible to do that using a Gimp script?

2. If so, Scheme or Python?

3. If a plugin makes more sense, will average users be able to install it for themselves or would I have to wait for the inclusion in some standard precompiled distribution?

Just in case, are you aware of http://kcd.sourceforge.net/fix-ca.php ?

BTW, Martin, I'd suggest optimizing it -- 1 second/megapixel is a fair amount of time for someone processing a lot of 18 MP images, and people with Nikon D800's will be even more unhappy. You may also want to talk with the ImageMagick folks about getting it included there. This could become a very important part of a photographic workflow.

Right. I'd like to try built-in implementations of blur algorithms first, since it is likely to remain the bottleneck of my algorithm. If that's not enough, some parallelization should help.

Martin

Robert Krawitz
2012-07-15 15:14:13 UTC (over 12 years ago)

Purple fringing removal extension

On Sun, 15 Jul 2012 00:54:50 -0700, Martin Jambon wrote:

On 07/14/2012 03:56 PM, Robert Krawitz wrote:

On Sun, 15 Jul 2012 01:19:52 +0400, Alexandre Prokoudine wrote:

On Sat, Jul 14, 2012 at 12:35 PM, Martin Jambon wrote:

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

My algorithm needs to perform pixelwise operations (+, -, min, max between two channels; scaling of one channel) but I also would prefer something that is easy to install (for users) and easy to maintain (for me).

The OCaml source code is here; it should give an idea of what's needed:

https://github.com/mjambon/purple-fringe/blob/master/src/unpurple.ml

(see functions make_purple_blur and remove_purple_blur, lines 103-177)

My questions are:

1. Is it possible to do that using a Gimp script?

2. If so, Scheme or Python?

3. If a plugin makes more sense, will average users be able to install it for themselves or would I have to wait for the inclusion in some standard precompiled distribution?

Just in case, are you aware of http://kcd.sourceforge.net/fix-ca.php ?

BTW, Martin, I'd suggest optimizing it -- 1 second/megapixel is a fair amount of time for someone processing a lot of 18 MP images, and people with Nikon D800's will be even more unhappy. You may also want to talk with the ImageMagick folks about getting it included there. This could become a very important part of a photographic workflow.

Right. I'd like to try built-in implementations of blur algorithms first, since it is likely to remain the bottleneck of my algorithm. If that's not enough, some parallelization should help.

Have you profiled the code yet?

Martin Jambon
2012-07-16 07:49:31 UTC (over 12 years ago)

Purple fringing removal extension

On 07/15/2012 08:14 AM, Robert Krawitz wrote:

On Sun, 15 Jul 2012 00:54:50 -0700, Martin Jambon wrote:

On 07/14/2012 03:56 PM, Robert Krawitz wrote:

On Sun, 15 Jul 2012 01:19:52 +0400, Alexandre Prokoudine wrote:

On Sat, Jul 14, 2012 at 12:35 PM, Martin Jambon wrote:

Hi,

I am totally new here but I wrote a standalone program that does a decent job of removing purple fringing from photos, and I would like to be able to implement the same functionality for Gimp.

Here are some examples of what it does:

http://mjambon.com/purple-fringe/examples.html

My algorithm needs to perform pixelwise operations (+, -, min, max between two channels; scaling of one channel) but I also would prefer something that is easy to install (for users) and easy to maintain (for me).

The OCaml source code is here; it should give an idea of what's needed:

https://github.com/mjambon/purple-fringe/blob/master/src/unpurple.ml

(see functions make_purple_blur and remove_purple_blur, lines 103-177)

My questions are:

1. Is it possible to do that using a Gimp script?

2. If so, Scheme or Python?

3. If a plugin makes more sense, will average users be able to install it for themselves or would I have to wait for the inclusion in some standard precompiled distribution?

Just in case, are you aware of http://kcd.sourceforge.net/fix-ca.php ?

BTW, Martin, I'd suggest optimizing it -- 1 second/megapixel is a fair amount of time for someone processing a lot of 18 MP images, and people with Nikon D800's will be even more unhappy. You may also want to talk with the ImageMagick folks about getting it included there. This could become a very important part of a photographic workflow.

Right. I'd like to try built-in implementations of blur algorithms first, since it is likely to remain the bottleneck of my algorithm. If that's not enough, some parallelization should help.

Have you profiled the code yet?

Yes, but it's written in OCaml and I expect to rewrite it completely in order to fit in the gimp dev environment. The algorithm is not very complicated and I'm hoping to use optimized high-level primitives.

Martin

Alexandre Prokoudine
2012-07-16 08:37:25 UTC (over 12 years ago)

Purple fringing removal extension

On Sun, Jul 15, 2012 at 2:51 AM, Robert Krawitz wrote:

That fixes lateral chromatic aberration (the focal length, or image magnification, is different for different wavelengths but the focal plane is the same). Purple fringing is caused by longitudinal chromatic aberration (the focal plane is different for different wavelengths). It's a different lens defect and is much more difficult to fix (stopping down reduces the problem, since it increases depth of field, but there are often reasons why you don't want to do that).

Aha, thanks for clarification! :)

@Martin

Yes, but it's written in OCaml and I expect to rewrite it completely in order to fit in the gimp dev environment.

That would be C and, preferably, as a GEGL operation :)

Alexandre Prokoudine http://libregraphicsworld.org