Lens Correction — Distortion, Vignetting, Chromatic Aberration
Remove barrel and pincushion distortion, compensate falloff at the corners and correct lateral chromatic aberration.
All processing runs in your browser. No file leaves this device.
Distortion uses the radial polynomial r_src = r·(1 + k1·r² + k2·r⁴), the same form Adobe and PTLens profiles are built on. The radius is normalised against half the frame diagonal, so a coefficient that works for one image works for the same lens at any resolution.
Correction is done by inverse mapping: each output pixel is traced back to where it came from in the source and sampled there. Forward mapping would leave unwritten holes scattered across the result.
Lateral chromatic aberration is corrected by scaling the red and blue channels radially relative to green, which is what causes the coloured fringes along high-contrast edges toward the corners of the frame.