← Computer Vision for EveryoneToolsInVisionLearning Center
Calibration and Measurement · Lesson 22

Estimate Distortion from a Pattern

Straight board lines bow near the edge of a wide lens.

Watch the lesson

Estimate Distortion from a Pattern explained visually

1:14

Straight board lines bow near the edge of a wide lens. English captions are optional and start off. The complete transcript follows the written lesson.

Lesson overview

What you will learn

Straight board lines bow near the edge of a wide lens.

  1. A practical question
  2. The useful idea
  3. Work through the example
  4. Limits and next step
01

A practical question

In the parking image, a straight painted line bows near the border. The camera lens may be bending its projected position. A calibration pattern gives us many known points to compare with an ideal camera model.

02

The useful idea

Estimate internal parameters and distortion coefficients from varied pattern views, then use the model to predict where each observed corner should appear. The distortion describes systematic departures from the ideal projection, often more visible away from the image center. It should be estimated from data, not copied from a different lens because the cameras look alike.

03

Work through the example

Undistort a test photo and inspect straight painted lines across the frame. Then project known corners and examine their errors. A visually straighter line is encouraging, but cropped or shifted borders after correction also need accounting in the image coordinates.

04

Limits and next step

Save the original and calibration alongside the corrected image. Next, we'll read the remaining reprojection error without letting one average hide bad views.

Worked example

Compare corner residuals before and after estimating radial distortion.

Knowledge check

Quick check: test your understanding

Try it yourself: In the situation described above, explain the method and one reason its output might be misleading.

Check the reasoning

A distortion model maps ideal pinhole coordinates to the real lens's observed positions. Overfitting a flexible model to weak board detections can mislead measurement.

What is the main idea behind estimate distortion from a pattern?

A distortion model maps ideal pinhole coordinates to the real lens's observed positions.

How is it used in the example?

Compare corner residuals before and after estimating radial distortion.

What limitation should be checked?

Overfitting a flexible model to weak board detections can mislead measurement.

Further reading

Programming Computer Vision with Python — Jan Erik Solem.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 22 transcript155 words · Video transcript · Matches the published narration and captionsOpen transcript

In the parking image, a straight painted line bows near the border. The camera lens may be bending its projected position. A calibration pattern gives us many known points to compare with an ideal camera model.

Estimate internal parameters and distortion coefficients from varied pattern views, then use the model to predict where each observed corner should appear. The distortion describes systematic departures from the ideal projection, often more visible away from the image center. It should be estimated from data, not copied from a different lens because the cameras look alike.

Undistort a test photo and inspect straight painted lines across the frame. Then project known corners and examine their errors. A visually straighter line is encouraging, but cropped or shifted borders after correction also need accounting in the image coordinates.

Save the original and calibration alongside the corrected image. Next, we'll read the remaining reprojection error without letting one average hide bad views.