Advertisements

Archive for April 14th, 2014

Wide-Angle Lens Distortion Correction

The Sony HDR-AS30V camera lens has a view angle of 120° or 170°, achieved by internal image processing rather than mechanical lens adjustments. For most action-camera purposes you don’t care about fisheye distortion, but sometimes a more rectilinear picture will look better, in which case the GIMP’s Lens Distortion filter comes in handy.

A still image at 120°, which doesn’t look all that bad, really:

Sony HDR-AS30V 120 angle - as captured

Sony HDR-AS30V 120 angle – as captured

Applying Main=-25 gives this:

Sony HDR-AS30V 120 angle - corrected

Sony HDR-AS30V 120 angle – corrected

A frame captured from video at 170°, with the overhead wires hanging upward:

Sony HDR-AS30V 170 angle - as captured

Sony HDR-AS30V 170 angle – as captured

Applying Main=-25, Edge=-12.5, Zoom=+8 flattens them enough to be acceptable:

Sony HDR-AS30V 170 angle - corrected

Sony HDR-AS30V 170 angle – corrected

The main effect of the Zoom parameter seems to be discarding the severely distorted remnants around the edges of the corrected 170° view. Sometimes, those pixels around the edges can be very, very important, so I’d rather make that decision after the fact.

If you must fix many images at once, Fred’s defisheye ImageMagick Script would certainly be useful. There’s also a bare-knuckles ImageMagick version, including how to measure lens parameters.

Advertisements

Leave a comment