Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » OpenCV » Geometric Image Transformations » cvUndistortPoints

cvUndistortPoints


Module: OpenCV

Undistorts points.

Name Type Description
inPoints Point2DArray Input points array.
inCameraMatrix Matrix Input camera matrix.
inDistCoeffs Matrix Input array of distortion coefficients.
inR Matrix* The rectification transformation in object space, use identity if not specified.
inP Matrix* The new camera matrix or the new projection matrix, use inCameraMatrix if not specified.
outPoints Point2DArray Output array of undistorted points.

Description

The operation computes ideal point coordinates from observed point coordinates. It is similar to cvUndistort and cvInitUndistortRectifyMap but it operates on a set of points instead of raster image.

The inP Matrix can be either a camera matrix \(A\) (3x3), or the projection matrix \( A * [R|t]\). Leaving it with a default value means using the original camera matrix - the resulting points will correspond to the same camera setup (projection matrix), but without lens distortions.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Input camera matrix must be 3x3 in cvUndistortPoints.
DomainError Supported matrix sizes for inDistCoeffs are: 1x4, 4x1, 1x5, 5x1, 1x8, 8x1, 1x12, 12x1 in cvUndistortPoints.

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • cvUndistort – Transforms an image to compensate for lens distortion.