You are here: Start » AVL.NET » Function Reference » Computer Vision » Camera Calibration » AVL.CalibrateWorldPlane_Labeled

AVL.CalibrateWorldPlane_Labeled

Finds the image to world plane transformation matrix using sparse world coordinate information, i.e. world coordinates are known for only a few points of the grid.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void CalibrateWorldPlane_Labeled
(
	IList<AvlNet.AnnotatedPoint2D> inImageGrid,
	IList<AvlNet.AnnotatedPoint2D> inLabeledWorldPoints,
	float inGridThickness,
	bool inInvertedWorldY,
	AvlNet.RectificationTransform outTransform
)

Parameters

Name Type Range Default Description
inImageGridSystem.Collections.Generic.IList<AvlNet.AnnotatedPoint2D>Annotated calibration grid.
inLabeledWorldPointsSystem.Collections.Generic.IList<AvlNet.AnnotatedPoint2D>Sparse array of world coordinate points. Annotations need to correspond to those in the inImageGrid input.
inGridThicknessfloat0.0fThe world plane will be shifted by given amount in direction perpendicular to the grid to compensate for grid thickness. Default value: 0.0f.
inInvertedWorldYboolFalseSet to true if world coordinate system has right-handed orientation, also known as mathematical or standard. Default value: False.
outTransformAvlNet.RectificationTransform

Description

The filter estimates the correspondence between the image plane and a "world plane" – a given planar surface in observed space. It is capable of using a sparse world coordinate information - a calibration grid for which only a few world plane coordinates are known.

The image plane, and thus inImageGrid points are assumed to be distorted, and to correct for the distortion the inCameraModel (calibration data) needs to be provided. The calculated result – outTransform contains all the information for transforming the distorted image plane to the world plane.

The inCameraModel is also used to define the type of the planar correspondence. For a standard projective camera (pinhole camera), the planar correspondence is a homography. If the inCameraModel is a telecentric camera, the planar correspondence is affine (as there are no perspective parameters in orthographic projection). If no inCameraModel is provided, the filter defaults to homography.

To uniquely define the outTransform, the algorithm requires at least four inImageGrid points (the affine relation requires at least three), and at least two inLabeledWorldPoints.

The filter provides a few methods for judging the feasibility of calculated solution.

  • The outRmsImageError and outRmsWorldError could show if the error is due to the inImageGrid or inLabeledWorldPoints errors. Model mismatch (i.e. trying to calibrate a non-planar object, e.g. wavy surface) will also result in increased reprojection errors. Large difference between outRmsImageError and outMaxReprojectionError could be a sign of presence of outliers in inImageGrid input data.
  • The outReprojectionErrorSegments consists of segments connecting input image points to reprojected world points, and thus it can be readily used for visualization of per-point reprojection errors (excluding the errors due to incorrect world plane labeling).

Examples

Good case of image to world plane calibration using high amount of calibration points. Calibration resulted in RMS and maximum reprojection errors less than 1.0, as expected. The outReprojectionErrorSegments are not visible at that scale.

Errors

List of possible exceptions:

Error type Description
DomainError inGridSpacing needs to be positive

Function Overrides

See also