cv2DRotationMatrix()函数返回一个指向2X3矩阵的指针。具体函数如下:
public:
static IntPtr cv2DRotationMatrix(
PointF center,
double angle,
double scale,
IntPtr mapMatrix
)
PointF center:源图像的旋转中心。
double angle:源图像旋转的角度,正值表示逆时针旋转(坐标原点假设在图像左上角)。
double scale:等向比例因子。
IntPer mapMatrix:用于返回的2X3矩阵。
//逆时针旋转图像degree角度(原尺寸)
void rotateImage(IplImage* img, IplImage *img_rotate,int degree)
{
//旋转中心为图像中心
CvPo