You are here: Start » Tutorial Exercises » Removing Camera Lens Distortion: Chessboard (distortions)

Removing Camera Lens Distortion: Chessboard (distortions)

Aim

Prepare an Adaptive Vision program, which will remove a lens distortion from the provided images.

The program should process all the images in an endless loop and display the results. The image size after correction should be chosen optimally.

Input

A set of images before calibration.

Images are stored in distortion directory.

Output

An application that shows images after calibration.

Hints

Calibration of a camera is based on images which contain a calibration chessboard.

Calibration of the camera can be done in two ways:

Both ways results in this same calibration results but the second one is only for advanced users.

Solution (AVS)

  1. Add filter EnumerateImages to project,

  2. Add filter UndistortImage and open the calibration editor,

  3. Using the Add images... add images from directory distortion,

  4. Choose only these no more than 10 images which covers entire image (for example files: 00, 04, 10, 20, 23, 26, 29, 43).

  5. Generate SpatialMap and close editor.

  6. Run the resulting program, showing the original and remapped images next to each other.

Main macrofilter remaps input images.