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

AVL.CalibrateWorldPlane_OffgridOrigin

Finds the image to world plane transformation matrix, with world origin and axes specified in the image coordinates.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void CalibrateWorldPlane_OffgridOrigin
(
	IList<AvlNet.AnnotatedPoint2D> inImageGrid,
	float inGridSpacing,
	float inGridThickness,
	AvlNet.RectificationTransform outTransform
)

Parameters

Name Type Range Default Description
inImageGridSystem.Collections.Generic.IList<AvlNet.AnnotatedPoint2D>Annotated calibration grid.
inGridSpacingfloat<0.000001f, INF>1.0fReal-world distance between adjacent grid points. Default value: 1.0f.
inGridThicknessfloat0.0fThe world plane will be shifted by given amount in direction perpendicular to the grid to compensate for grid thickness. Note, that inWorldPlaneOrigin and inWorldPlaneXAxis won't be compensated, so they need to be selected on the target world plane, and not on the grid. Default value: 0.0f.
outTransformAvlNet.RectificationTransform

Description

The filter estimates the correspondence between the image plane and a "world plane" – a given planar surface in observed space. 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.

The homography requires at least four inImageGrid points. The affine relation requires at least three.

This filter allows for setting the world plane origin and x-axis direction in terms of input image points - see the inWorldPlaneOrigin and inWorldPlaneXAxis. Note that the origin and the axis direction does not need to lie on a grid point, it can be arbitrarily chosen.

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

  • The outRmsError and outMaxReprojectionError. The main contributor to these values is the random noise in inImageGrid point positions. 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 outRmsError and outMaxReprojectionError could be a sign of presence of outliers in 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.

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.

Example of a gross error. The RMS reprojection error is 17.6, max reprojection error is 91.2, source of these errors is clearly visible thanks to outReprojectionErrorSegments: the association of image points and their grid coordinates in inImageGrid is wrong.

Errors

List of possible exceptions:

Error type Description
DomainError inGridSpacing needs to be positive

Function Overrides

See also