2022
08-12
08-12
OpenCV绘制圆端矩形的示例代码
目录功能函数测试代码测试效果本文主要介绍了OpenCV绘制圆端矩形的示例代码,分享给大家,具体如下:功能函数//绘制圆端矩形(药丸状,pill)voidDrawPill(cv::Matmask,constcv::RotatedRect&rotatedrect,constcv::Scalar&color,intthickness,intlineType){cv::Matcanvas=cv::Mat::zeros(mask.size(),CV_8UC1);//确定短边,短边绘制圆形cv::RotatedRectrect=rotatedrect;floatr=rect.size.height/2.0...
继续阅读 >