Back to Aurora Vision Studio website

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

cvGetRotationMatrix2D


Module: OpenCV

Calculates the affine matrix of 2D rotation.

Applications

Prepares matrix to be used with cvWarpAffine.
Name Type Description
Input value inCenter Point2D Center of the rotation in the source image.
Input value inAngle Real Rotation angle in degrees. Positive values mean counter-clockwise rotation. The coordinate origin is assumed to be the top-left corner.
Input value inScale Real Isotropic scale factor.
Output value outM Matrix The output affine transformation, 2x3 floating-point matrix.

Description

The operation calculates matrix of rotation described on input. Rotation matrix can be applied to image using cvWarpAffine filter.

Examples

Result of applying output matrix of cvGetRotationMatrix2D with inCenter = (150, 150), inAngle = 45.0, inScale = 1 to sample image using cvWarpAffine. The cvWarpAffine filter was used with inDWidth = 300, inDHeight = 300 and inBorderMode = BORDER_CONSTANT.

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • cvWarpAffine – Applies an affine transformation to an image.