Calibration
This examples shows hot to perform calibration of a telecentric lens using a single checkerboard image.

The image is load fro file, then passed to Calibrate_SingleImage which computes the rectification map.

The output of Calibrate_SingleImage is a CalibrationMap which contains the distortion map to apply to input image and the UmOnPixel (Unit measure on pixel) that represents the pixel size in the image coordinates.
Note
The UmOnPixel is calculated using FeatureStep in PatternFinderParams (i.e. the size of the chess, in this case is 4 [ mm ]); it is important to achieve correct results when performing measuring tasks that this value is consistent in the entire project.
Pattern features (OutPatternPoints) are also displayed as reference on the image.

The image is then remapped using Remap.
On the remapped image, two segments are fitted with FitSegment_ToEdges_Direct and their distance is calculated.


The tool Distance_Segments takes in input the two fitted segments and the UmONPixel from the CalibrationMap, giving a result of 7.998 [ mm ] against 8.0 [ mm ].
Note
This result demonstrates the correctness of the measure according to input pattern parameters; to achieve even better results more aspects must be considered when creating a metrology application such as alignments, illumination and so on.