[Digikam-devel] Patch: fix automatic correction of lens chromatic aberration
matze at welwarsky.de
Sun Mar 8 17:22:14 GMT 2009
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 11395 bytes
Desc: not available
More information about the Digikam-devel