版本:opencv-4.7.0-windows
Opencv中,大多数时候,逆时针旋转是正方向,但在RotatedRect和ellipse中,顺时针旋转是正方向。
//RotatedRect的角度参数是顺时针为正方向
RotatedRect(const Point2f& center, const Size2f& size, float angle);
//ellipse的angle、startAngle、endAngle都是顺时针为正方向
void ellipse(InputOutputArray img, Point center, Size axes,
double angle, double startAngle, double endAngle,
const Scalar& color, int thickness = 1,
int lineType = LINE_8, int shift = 0);
源码说明:

代码测试:
#include <opencv2/opencv.hpp>
int main()
{
#pragma region RotatedRect顺时针为正
cv::Mat image = cv::Mat(500,

最低0.47元/天 解锁文章
1880

被折叠的 条评论
为什么被折叠?



