Monday, March 28, 2016

Using Agisoft Lens for calculating camera calibration and distortion coefficient matrices

OpenCV was giving me a hard time in calculating camera and optical distortion coefficient matrices from photo frame images of checker board pattern grids. So I tried alternative methods and I found the free Agisoft Lens (bundled with PhotoScan Professional and Standard versions) to be robust and easy to use.


  1. To determine the camera matrix and distortion coefficient matrix, run Agisoft Lens.


  2. Select Tools | Show Chessboard.

    A chessboard pattern is displayed on the screen.
  3. Use the camera you want to calibrate and take a few photos of the chessboard pattern at different angles. Then copy the images to the computer.
  4. In Agisoft Lens, select Tools | Add Photos.

    The Add Photos dialog box appears.
  5. Browse and select the chessboard images captured previously. Click Open.

    The images are listed in Agisoft Lens.

  6. Select Tools | Calibrate.

    The Calibration dialog box appears.

  7. Toggle on the camera and distortion coefficient parameters you want to calculate. Click OK.

    Processing messages appear.


    The matrices are calculated and displayed.

  8. Note down or save the parameters fx, fy, cx, cy, k1, k2, k3, p1, p2.

    Note: the focal length units are in pixels

No comments:

Post a Comment