Mat rotateImg(Mat img, double angle, Point Center)
{
int rows = img.size[0];
int cols = img.size[1];
Mat M = getRotationMatrix2D(Center, angle, 1);
Mat dst;
warpAffine(img, dst, M, Size(cols, rows));
return dst;
}
2024-04-10 22:36:36
Mat rotateImg(Mat img, double angle, Point Center)
{
int rows = img.size[0];
int cols = img.size[1];
Mat M = getRotationMatrix2D(Center, angle, 1);
Mat dst;
warpAffine(img, dst, M, Size(cols, rows));
return dst;
}
下一篇:剑指Offer 矩阵中的路径