opencv 图像旋转任意角度

			//// 旋转90度
			cv::Mat dst;
			cv::Point center(img.cols / 2, img.rows / 2); //旋转中心
			double angle = -90.0;  //角度
			double scale = 1.0;  //缩放系数
			cv::Mat rotMat = getRotationMatrix2D(center, angle, scale);
			warpAffine(img, img, rotMat, img.size());
发布了59 篇原创文章 · 获赞 57 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/xiakejiang/article/details/103731705