[Digikam-devel] Patch: fix automatic correction of lens chromatic aberration
Matthias Welwarsky
matze at welwarsky.de
Sun Mar 8 17:22:14 GMT 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lenscorrection-ca-fix.patch
Type: text/x-patch
Size: 11395 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20090308/7b5b865e/attachment.bin>
More information about the Digikam-devel
mailing list