4.7. Tutorial: Calibrating the Lens


Standard zoom and wide-angle lenses exhibit significant distortion of the image. Straight lines at the edges of the image can appear curved. Lens distortion effects can impact on the accuracy of the modelling process.


3DSOM Pro provides a Lens Calibration Wizard to allow the user to take additional photos for automatically calibrating the lens. Once the lens has been calibrated, new photos will be automatically undistorted when they are loaded from disc.

In this tutorial we will show how to calibrate a zoom camera lens.

Starting Point

Launch the Lens Calibration Wizard using the File > Calibrate Lens... menu item. When the Lens Calibration Wizard Window is opened choose the first option, "New calibration", to calibrate from photos. Then click the Next > button to proceed to the next page of the wizard.

Step 1

The first step is to print out the lens calibration grid (a regular grid of dots) onto a plain sheet of white paper. Hit the 1. Print calibration grid button to open the print dialog.


Ideally, you should try to print out a lens calibration grid roughly the same size as a typical object you will be modelling. That way you can take photos of the grid at a similar distance to images you will take of your objects. However this is not essential.

Hit the "Change..." button to modify the page setup and margins allowing you to print larger grids over multiple pages. Hit the OK button to print.

Step 2

Stick the lens calibration grid onto a flat surface such as a rigid piece of card or a wall. If you printed over multiple sheets be careful to line up the sheets accurately using the guides.

To calibrate a fixed focal length lens you need to take up to 3 front-on shots (at an angle less than 10 degrees).

To calibrate a zoom lens you need to take front-on shots of the grid at a range of zoom settings. Note that if your camera does not export JPEG images with EXIF tags you will need to fix the zoom setting for all photos and treat as a fixed focal length camera.

General points to note...

Example photos for a digital compact zoom camera are shown in Figure 4.7.1.

Figure 4.7.1. Images taken at focal lengths of 5.8mm, 9.2mm, 18.4mm and 58.0mm

Step 3

Once you have taken the calibration photos, transfer them to your computer and load them by hitting the 3. Load photos button.

Step 4

Once 3DSOM Pro has processed the photos you will be presented with the following page.

You can see the input photos and undistorted images resulting from lens calibration. The dots should now appear in precise straight lines.

You can save the calibration data for future projects using the Save button. To reload a calibration you can use the "Load existing calibration settings" option when the wizard is launched.

Check the "Use as the default calibration for all new projects" to use the saved calibration as the default for all new projects on your PC. 3DSOM Pro will automatically load this calibration file when you launch the software or start a new project.

Hit the Finish button to continue with your project. Imported photos (using the ID_FILE_NEW.jpgNew project... button or the Images > Add Images... menu item) will now be lens corrected using the results of calibration.