digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::LensDistortionPixelAccess Class Reference

LensDistortionPixelAccess class: solving the eternal problem: random, cubic-interpolated, sub-pixel coordinate access to an image. More...

Public Member Functions

 LensDistortionPixelAccess (DImg *srcImage)
 
void pixelAccessGetCubic (double srcX, double srcY, double brighten, uchar *dst)
 

Protected Member Functions

void cubicInterpolate (uchar *src, int rowStride, uchar *dst, bool sixteenBit, double dx, double dy, double brighten)
 
uchar * pixelAccessAddress (int i, int j)
 
void pixelAccessDoEdge (int i, int j)
 
void pixelAccessReposition (int xInt, int yInt)
 
void pixelAccessSelectRegion (int n)
 

Detailed Description

Assuming that accesses are at least slightly coherent, LensDistortionPixelAccess keeps LensDistortionPixelAccessRegions buffers, each containing a LensDistortionPixelAccessWidth x LensDistortionPixelAccessHeight region of pixels. Buffer[0] is always checked first, so move the last accessed region into that position. When a request arrives which is outside all the regions, get a new region. The new region is placed so that the requested pixel is positioned at [LensDistortionPixelAccessXOffset, LensDistortionPixelAccessYOffset] in the region.