
Intrinsic lens calibration is performed using a calibration chessboard and is used to determine parameters associated with the camera lenses and to correct for distortion and other visual effects. Lens calibration is required for OptiTrack Prime Color camera users, and may be required for Qualisys and Vicon camera users who are not using those third parties’ wand calibration procedures. See How-To: Record Intrinsic Lens Calibrations for detailed instructions for recording lens calibration trials.

If your lens calibration trial videos require enhancement to improve the brightness, contrast, or white balance, you can use the Enhance Videos tool. Use the lens calibration Load Videos button, then open and use the Enhance Videos tool to modify your videos.
Load Videos
Load video files (.mp4 or .avi) containing the intrinsic lens calibration trial. To load the videos, browse to and select the folder containing the videos. The structure of this folder must conform to the format described in Video Data. Note that videos loaded using this dialog are rendered in grayscale.
Frame Grab Step
The step between frames searched for chessboards. Smaller values take longer to process, but may provide slightly improved calibration results compared to larger values.
Use Custom Chessboard
Use a custom size chessboard for the calibration. Only select this option if not using the chessboard provided by Theia Markerless.
- Square Size: The width and height of each square on the chessboard. Measured in mm.
- Number of Squares High: The number of inner squares in the vertical direction of the chessboard.
- Number of Squares Wide: The number of inner squares in the horizontal direction of the chessboard.
Calibrate Lenses
Perform the instrinsic calibration for all of the cameras.
Save Intrinsics
Save the intrinsic calibration parameters in a format that can be loaded during future calibrations. This is useful when the intrinsic parameters do not change between calibrations. To save the intrinsic calibration, browse to the desired save location and enter the desired filename.
Load Intrinsics
Load the intrinsic calibration parameters from a previous calibration. This is useful when the intrinsic parameters do not change between calibrations. To load the intrinsic calibration, browse to and select the previously saved intrinsic lens calibration file.
Merge Intrinsics
Merge the intrinsic calibration parameters from the current calibration trial with those from a previous calibration. This is useful when new cameras have been acquired that need to be added to an existing intrinsic calibration file, or if a new intrinsic calibration trial has been recorded for a subset of cameras that are already in an existing intrinsic calibration file and the old camera parameters should be replaced. To add or replace intrinsic parameters for a set of cameras within an existing intrinsic calibration file, load the intrinsic calibration trial for those cameras, select the Frame Grab Step, and click Calibrate Lenses.
Lens Calibration Metrics
After the lenses have been calibrated, click Merge Intrinsics, then navigate to and open the existing intrinsic calibration file to which the new parameters should be merged. A new, merged intrinsic calibration file will be saved next to the existing file.
After the lens calibration is complete, a dialog will appear with the results of the intrinsic lens calibration trial.

Chessboards The number of video frames used to calibrate each camera.
Coverage The proportion (maximum value 1) of the camera view covered during the intrinsic lens calibration trial. Recommend >0.9 as a quality threshold.
Angle The maximum angle of the chessboard relative to the camera image plane during the intrinsic lens calibration trial. Recommend 30-60 degress as a quality threshold.
After acknowledging the lens calibration results dialog window, the camera views will be updated to visualize the results of the lens calibration process. The green shading is a heatmap of the detected chessboard across the camera view, where the green area indicates the portion of the view that was covered during the calibration and the intensity of the green area indicates the number of frames in which the chessboard was detected while covering that part of the view.
