Table of Contents

Class RotationMatrix2D

Namespace
Emgu.CV
Assembly
Emgu.CV.dll

A (2x3) 2D rotation matrix. This Matrix defines an Affine Transform

public class RotationMatrix2D : Mat, IEquatable<Mat>, IInputOutputArray, IInputArrayOfArrays, IOutputArrayOfArrays, IOutputArray, IInputArray, IDisposable, ISerializable
Inheritance
RotationMatrix2D
Implements
Inherited Members
Extension Methods

Constructors

RotationMatrix2D()

Create an empty (2x3) 2D rotation matrix

public RotationMatrix2D()

RotationMatrix2D(PointF, double, double)

Create a (2x3) 2D rotation matrix

public RotationMatrix2D(PointF center, double angle, double scale)

Parameters

center PointF

Center of the rotation in the source image

angle double

The rotation angle in degrees. Positive values mean couter-clockwise rotation (the coordiate origin is assumed at top-left corner).

scale double

Isotropic scale factor.

Methods

Clone()

Return a clone of the Matrix

public RotationMatrix2D Clone()

Returns

RotationMatrix2D

A clone of the Matrix

CreateRotationMatrix(PointF, double, Size, out Size)

Create a rotation matrix for rotating an image

public static RotationMatrix2D CreateRotationMatrix(PointF center, double angle, Size srcImageSize, out Size dstImageSize)

Parameters

center PointF

The rotation center

angle double

The rotation angle in degrees. Positive values mean couter-clockwise rotation (the coordiate origin is assumed at image centre).

srcImageSize Size

The source image size

dstImageSize Size

The minimun size of the destination image

Returns

RotationMatrix2D

The rotation matrix that rotate the source image to the destination image.

RotateLines(LineSegment2DF[])

Rotate the lineSegments, the value of the input lineSegments will be changed.

public void RotateLines(LineSegment2DF[] lineSegments)

Parameters

lineSegments LineSegment2DF[]

The line segments to be rotated

RotatePoints(MCvPoint2D64f[])

Rotate the points, the value of the input points will be changed.

public void RotatePoints(MCvPoint2D64f[] points)

Parameters

points MCvPoint2D64f[]

The points to be rotated, its value will be modified

RotatePoints(PointF[])

Rotate the points, the value of the input points will be changed.

public void RotatePoints(PointF[] points)

Parameters

points PointF[]

The points to be rotated, its value will be modified

RotatePoints<TDepth>(Matrix<TDepth>)

Rotate the single channel Nx2 matrix where N is the number of 2D points. The value of the matrix is changed after rotation.

public void RotatePoints<TDepth>(Matrix<TDepth> points) where TDepth : new()

Parameters

points Matrix<TDepth>

The N 2D-points to be rotated

Type Parameters

TDepth

The depth of the points, must be double or float

SetRotation(PointF, double, double)

Set the values of the rotation matrix

public void SetRotation(PointF center, double angle, double scale)

Parameters

center PointF

Center of the rotation in the source image

angle double

The rotation angle in degrees. Positive values mean couter-clockwise rotation (the coordiate origin is assumed at top-left corner).

scale double

Isotropic scale factor.