Re: [Gimp-developer] 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]