Please enable JavaScript to view this site.

TerraPhoto User Guide

Navigation: Programming Interface > File Formats

Camera calibration file format

Scroll Prev Top Next More

Camera calibration file format

A camera calibration file stores the geometrical parameters of a camera system. The default extension for a camera calibration file is CAL.

The camera calibration file is written as a text file where the first row is a constant header which is used for recognizing the file. Each of the following rows contains one parameter name followed by an equal sign and the value(s) for that parameter. The order of the parameter rows is free. This file structure is very flexible as the basic file structure does not need to be changed if new parameters are added or old ones are removed.

The possible parameters are:

Version - camera calibration file format version.

Description - descriptive name of the camera.

TimeOffset - time offset (seconds) to add to time stamps.

Exposure - time difference between top and bottom edge of an image. Depends on the opening time of the shutter.

LeverArm - vector from trajectory positions to the camera, space-separated values for lever arm XYZ components.

AntennaToCameraOffset - not used by the software.

AttitudeCorrections (HRP) - heading, roll, and pitch misalignment angles separated by space.

PlateSize - size of the CCD plate (pixels recommended), space-separated width and height values.

ImageSize - image size in pixels, space-separated width and height values.

Margin - number of pixels ignored along image edges.

Orientation - overall camera orientation.

PrincipalPoint(XoYoZo) - principal point XYZ position (pixels recommended), separated by space.

LensModel - lens distortion model.

LensA3, A5 - radial lens distortion parameter.

LensA7 - radial lens distortion parameter (if modeled as Function or Homogenous ).

LensA9 - lens distortion parameter (if modeled as Homogenous ).

LensR0 - zero radius for lens distortion (if modeled as Zero radius functions ).

LensK0, K1, K2 - lens distortion parameter (if modeled as Balanced )

LensP1, P2 - tangential lens distortion parameters.

LensColumns - number of lens distortion grid columns (if modeled as Grid )

LensRows - number of lens distortion grid row (if modeled as Grid )

LensRow01 ... AA - values for each lens distortion grid row, colums separated by space (AA=number of rows in the grid)

Example:

1 [TerraPhoto calibration]

2 Version=20050513

3 Description= Vertical

4 TimeOffset= 0.0000

5 Exposure= 0.00000

6 LeverArm= 0.0000 0.0000 0.0000

7 AntennaToCameraOffset= 0.0000 0.0000 0.0000

8 AttitudeCorrections(HRP)= 0.0094 -0.0450 -0.0635

9 PlateSize= 5616.00000000 3744.00000000

10 ImageSize= 5616 3744

11 Margin= 0

12 Orientation= TOP

13 PrincipalPoint(XoYoZo)= -14.24375000 -6.49375000 -8059.35469829

14 LensModel=Function

15 LensA3=-9.646484E-010

16 LensA5=2.248258E-017

17 LensA7=-1.177917E-025

18 LensP1=-3.806478E-008

19 LensP2=-5.885584E-008

TerraPhoto User Guide   01.01.2024   © 2024 Terrasolid Ltd