2022
09-20
09-20
OpenCV绘制圆角矩形的方法实例
功能函数//绘制圆角矩形voidDrawRotatedRectChamfer(cv::Matmask,constcv::RotatedRectrotatedrect,floatradius,constcv::Scalar&color,intthickness,intlineType){//创建画布cv::Matcanvas=cv::Mat::zeros(mask.size(),CV_8UC1);cv::RotatedRectnewrotatedrect=rotatedrect;//画宽缩减后的矩形cv::RotatedRectr1=newrotatedrect;r1.size.width=r1.size.width-2*radius;DrawRotatedRect(ca...
继续阅读 >