- To determine the camera matrix and distortion coefficient matrix, run Agisoft Lens.
- Select Tools | Show Chessboard.
A chessboard pattern is displayed on the screen.
- 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.
- In Agisoft Lens, select Tools | Add Photos.
The Add Photos dialog box appears.
- Browse and select the chessboard images captured previously. Click Open.
The images are listed in Agisoft Lens.
- Select Tools | Calibrate.
The Calibration dialog box appears.
- Toggle on the camera and distortion coefficient parameters you want to calculate. Click OK.
Processing messages appear.
The matrices are calculated and displayed.
- Note down or save the parameters fx, fy, cx, cy, k1, k2, k3, p1, p2.
Note: the focal length units are in pixels.
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.