嗨,我在 python 中知道并打开 CV .. 我尝试使用圆检测对象
for a in cnts:
(x,y), radius = cv2.minEnclosingCircle(a)
center = (int(x), int(y))
radius = int(radius)
if area > 500:
cv2.circle(img, center, radius, (0,0,255),1)
有没有人知道如何在圆上画直径线?并显示大小
感谢你
直径:
cv2.line(img, (x - radius, y), (x + radius, y), (0,0,255),1)
文本:cv2.putText
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句