Back to Aurora Vision Studio website

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

cvWarpPerspective


Module: OpenCV

Applies a perspective transformation to an image.

Name Type Range Description
Input value inSrc Image Source image.
Input value inM Matrix 3x3 transformation matrix.
Input value inDWidth Integer 0 - Width of destination image.
Input value inDHeight Integer 0 - Height of destination image.
Input value inInterpolation CvInterpolationMethod Interpolation method.
Input value inWarpInverseMap Bool True value means that M is the inverse transformation, dst->src.
Input value inBorderMode CvBorderType Pixel extrapolation method.
Input value inBorderValue Pixel* Value used in case of a constant border.
Output value outDst Image Output image.

Description

WarpPerspective transforms source image using specified inM matrix as follows:

when inWarpInverseMap is true. Otherwise, the transformation is first inverted and then put to formula above instead of inM.

Remarks

The useful transformation matrix may be obtained using cvGetPerspectiveTransform filter.

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 transformation matrix must have dimensions 3 x 3 in cvWarpPerspective.

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • cvWarpAffine – Applies an affine transformation to an image.