c++ opencv中通过角度和中心点旋转图片

Mat rotateImg(Mat img, double angle, Point Center)
{
    Mat M = getRotationMatrix2D(Center, angle, 1.0);
    Mat dst;
  warpAffine(img, dst, M, Size(img.cols, img.rows));
    return dst;
}
原文地址:https://www.cnblogs.com/DoublearmyLi/p/14275367.html