cv2.circle()函数及其参数

上面这个代码是我最近在网上找的代码中出现的一部分,这里用到了circle这个函数,本来没什么好说的,但是就是运行不过去,一直提示

后面去网上搜了下说CV_AA是opencv3里的用法,没办法我就只能改代码,然后去搜circle的详细参数了

网上找了一圈说这个参数表示的是圆边界的类型,那么我改代码的话应该填一个什么值进去?

找了半天没找到,最后只能去看文档了,下面附上官方文档的描述,和文档链接。

 

void cv::circle(InputOutputArray img,Point center,int radius,const Scalar & color,int thickness = 1,int lineType = LINE_8,int shift = 0 )

imgImage where the circle is drawn.
centerCenter of the circle.
radiusRadius of the circle.
colorCircle color.
thicknessThickness of the circle outline, if positive. Negative values, like FILLED, mean that a filled circle is to be drawn.
lineTypeType of the circle boundary. See LineTypes
shiftNumber of fractional bits in the coordinates of the center and in the radius value.

 几个参数分别表达的含义是,画圆的图、圆心、半径、圆的颜色、画圆的线条的粗细、画圆的线的类型、中心坐标和半径值中的小数位数。

其中参数lineType可填入的值可以在官方文档中查找到,不过多讲述。

所以根据官方文档CV_AA应该改成cv2.LINE_AA。

官方文档链接:https://docs.opencv.org/4.1.2/d6/d00/tutorial_py_root.html

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值