Calibration

This subgroup contains functions for the correlation between pixels and real world pixels. They are usually used together with the measurement functions.

Functions

Calibration

Compensation of lens distortion

Transformation between image and world coordinates

Calibration 1:

Requirements for the input images

The input images should not be used in a packed or filtered format, such as Bayer format. In the case of the calibration functions, this has the consequence that the recognition of the patterns is disturbed, which can lead to poorer calibration results or no calibration results at all. Since an interpolation takes place during the compensation functions, in which the original arrangement of the pixels is changed, the image can no longer be converted correctly afterwards. Therefore, it is recommended to always perform a conversion first before using a function from this subgroup.

Calibration 2:

Requirements for the camera matrix

Calibration 3:

The camera matrix is made up of the focal lengths fx and fy and the principal point (cx,cy), which are expressed in pixel units. The principal point, which is the intersection of the optical axis with the image, is normally located near the center of the image. The following conditions must be met:

    • 0 < fx and fy
    • cx >= 0 and <= image width -1
    • cy >= 0 and <= image height -1
    • The other positions in the matrix must be filled with 0 or 1, as shown in the figure. Other values are not permissible.