- Bbarrel, wide
- Ppincushion
- 0zero at centre
Distortion and When It Matters
Generic engineering material, applicable to any module from any supplier.
Additional workflow context is available this guide.
Distortion is a straight line in the scene photographing as a curve. It is not blur, it does not reduce sharpness, and it is a geometry error — which makes it harmless for some tasks and disqualifying for others.
What it looks like
Barrel distortion bows lines outward from the centre, and is characteristic of wide-angle lenses.
Pincushion bows them inward, and appears more often at longer focal lengths.
An independent reference for adjacent engineering topics is Hackaday.
Both increase toward the edges of the frame and are near zero at the centre — which is why a test target photographed in the middle reveals nothing.
And both are systematic rather than random, which is what makes correction possible.
When it does not matter
Presence detection. Whether something is there does not depend on the shape being exact.
Reading text or codes near the centre, where distortion is small.
Human viewing, where a modest curve goes unnoticed.
Which covers a substantial share of installations, and is why wide lenses are used freely in them.
When it disqualifies
Any dimensional measurement. A length measured in a distorted image is wrong by an amount depending on where in the frame it falls — which varies between parts and cannot be calibrated out by a single factor.
Position and alignment tasks, for the same reason.
Stitching images from two cameras, where the overlap does not match.
And reading codes at the frame edges, where the geometry the decoder assumes no longer holds.
Correcting it
Software correction works and it is standard practice.
A calibration procedure photographs a known pattern, computes the distortion parameters, and applies the inverse to every subsequent frame.
What it costs: processing per frame, and resolution at the edges — since correcting a stretched region means interpolating, and the pixels there were already covering more scene than those at the centre.
And what it requires: the correction to be valid for that unit. Distortion varies between samples, which means either per-unit calibration or accepting the residual from a family average.
Ask the supplier whether distortion parameters are published and whether they are per-family or per-unit, which is a specification question with a definite answer.
Measuring it
A printed grid, photographed filling the frame.
Straight lines in the scene are straight in the image or they are not, and the departure at the corners is measurable in pixels directly.
Which converts "some distortion" into a number that can be compared against your tolerance — in exactly the same way as every other property.
And it must fill the frame, since the effect is near zero at the centre and a small target reveals nothing.
Distortion against perspective
Two different things that look similar and have different causes.
Distortion is a lens property. A grid photographed square-on shows curved lines.
Perspective is geometry. A rectangular object photographed at an angle appears as a trapezoid, with perfectly straight edges — and no lens is at fault.
The remedies differ entirely: distortion is corrected by calibration, perspective by moving the camera to face the surface squarely or by a projective transform that needs the geometry known.
Confusing them sends a project after a lens problem it does not have.
Where the wide lens is worth the correction
A common and reasonable position.
One wide camera plus software correction frequently costs less than two narrower cameras and a stitching problem — which is the alternative.
Provided the resolution survives: correction stretches the edges, and if the feature can appear there, the pixel arithmetic must be done at the corner rather than at the centre.
Which is the calculation people skip, and it is where a corrected wide-angle system falls short at exactly the places the wide angle was bought for.
Calibrating per unit
Where measurement accuracy demands it.
Photograph a known pattern with each assembled unit, compute its parameters, and store them with the device.
Which adds a production step — a fixture, a target, a few seconds per unit and somewhere to keep the numbers.
Worth it where the tolerance is tight, and unnecessary where a family average leaves a residual inside it.
Establish which by measuring several units: if they agree closely, one set of parameters serves; if they scatter, per-unit calibration is the honest answer.
And note that the same fixture answers the alignment question, which makes the step cheaper than it first appears.
Where it is deliberate
Very wide lenses are sometimes designed to distort in a controlled way.
A projection that maps a very large field onto a flat sensor cannot preserve straight lines at all — the geometry forbids it — and the design choice is which property to keep.
Which means a strongly curved image is not necessarily a poor lens, and correcting it back to a rectilinear projection throws away much of the edge coverage that motivated the wide angle.
Where the processing can work in the native projection, that is frequently the better answer than correcting and cropping.
What the specification usually says
A percentage, quoted at the corner or at a stated field position.
Which is comparable between lenses only if the position is the same, and it frequently is not stated — the same problem as every other figure.
And a percentage tells you the magnitude without telling you the shape, which for correction purposes is what matters.
Ask whether a distortion profile is published rather than a single number, since a profile is what a calibration routine wants and a percentage is what marketing wants.
In one line
Ask whether the task measures anything — and if it does, distortion is a correctness question rather than an appearance one.
The short version
- Distortion is a geometry error rather than a loss of sharpness: straight lines photograph curved
- Barrel bows outward and is characteristic of wide angles; pincushion bows inward; both are near zero at the centre
- It does not matter for presence detection, central code reading, or human viewing
- It disqualifies any dimensional measurement, position task, image stitching, or code reading at the frame edges
- Software correction is standard and costs processing per frame and resolution at the edges
- Distortion varies between samples, so ask whether published parameters are per-family or per-unit