[Digikam-devel] Patch: fix automatic correction of lens chromatic aberration

Gilles Caulier caulier.gilles at gmail.com
Tue Mar 10 10:01:19 GMT 2009


Matthias, Andi,

It will be better to use bugzilla and post new entry with patch than mailing
list. Look here :

https://bugs.kde.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=digikamimageplugins&component=Lens+Distortion

Gilles

2009/3/10 Matthias Welwarsky <matze at welwarsky.de>

> On Tuesday 10 March 2009 09:14:43 Andi Clemens wrote:
> > Ok so I'll wait for another update...
>
> I think I've fixed it, but no time to test. Will post an update tonight.
>
> >
> > Andi
> >
> > On Tuesday 10 March 2009 08:56:48 Matthias Welwarsky wrote:
> > > On Monday 09 March 2009 11:30:27 Andi Clemens wrote:
> > > > I will take a look it the patch now...
> > >
> > > I've taken another look into it, seems its not complete yet. Geometry
> and
> > > distortion correction also need subpixel access, and I've found that it
> > > doesn't work any more if I check "16 bits color depth" in the "Raw
> > > Conversion" settings.
> > >
> > > > Andi
> > > >
> > > > On Sunday 08 March 2009 19:51:12 Gilles Caulier wrote:
> > > > > Matthias,
> > > > >
> > > > > Thanks a lots. this patch solve a task from my TODO list.
> > > > >
> > > > > This patch is a good candidate to go to 0.11 development branch
> and,
> > > > > if it doesn't break i18n, in 0.10 (trunk) before finale release.
> > > > >
> > > > > Marcel, Andi, can you check this patch for me and guide Matthias on
> > > > > the right way. I'm very busy here to prepare my evening classes
> > > > > presentation for next Wednesday. To test, just use these pictures :
> > > > >
> > > > > http://digikam3rdparty.free.fr/TEST_IMAGES/LENSFUN/
> > > > >
> > > > > Thanks in advance.
> > > > >
> > > > > Gilles Caulier
> > > > >
> > > > > 2009/3/8 Matthias Welwarsky <matze at welwarsky.de>
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > the attached patch fixes CA correction in the lens
> auto-correction
> > > > > > tool. The fix
> > > > > > consists of two parts:
> > > > > > 1.) set Alpha component of corrected pixel to "fully opaque",
> > > > > > otherwise corrected image is not visible (trivial)
> > > > > > 2.) Implement sub-pixel interpolation in class DImg, necessary
> for
> > > > > > CA and CI
> > > > > > correction with lensfun.
> > > > > > There are two new pixel color accessor functions:
> > > > > > getSubPixelColor() and getSubPixelColorFast(). The first one uses
> > > > > > Lanczos interpolation to compute subpixel colors, the second one
> > > > > > bilinear interpolation. Lanczos yields better
> > > > > > results, but is a lot slower than bilinear. Before using
> > > > > > getSubPixelColor(),
> > > > > > prepareSubPixelAccess() needs to be called to precompute the
> > > > > > Lanczos kernel.
> > > > > >
> > > > > > Lanczos implementation was adapted from ufraw, Bilinear was
> > > > > > implemented according to Wikipedia description.
> > > > > >
> > > > > > I would be happy to hear comments on how to optimize the
> > > > > > computation, it's probably not optimal yet.
> > > > > >
> > > > > > regards,
> > > > > >         matthias
> > > > > >
> > > > > > _______________________________________________
> > > > > > Digikam-devel mailing list
> > > > > > Digikam-devel at kde.org
> > > > > > https://mail.kde.org/mailman/listinfo/digikam-devel
> > > >
> > > > _______________________________________________
> > > > Digikam-devel mailing list
> > > > Digikam-devel at kde.org
> > > > https://mail.kde.org/mailman/listinfo/digikam-devel
> > >
> > > _______________________________________________
> > > Digikam-devel mailing list
> > > Digikam-devel at kde.org
> > > https://mail.kde.org/mailman/listinfo/digikam-devel
> >
> > _______________________________________________
> > Digikam-devel mailing list
> > Digikam-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/digikam-devel
>
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20090310/acb9b881/attachment.html>


More information about the Digikam-devel mailing list