2024-06-03 03:00:54 发布
网友
我正在研究opencvpython。 我有一个像这样的图像(下面的图片,但没有浅绿色的线),我已经找到了角落的坐标
(array([[[280, 109]], [[162, 206]], [[189, 341]], [[329, 389]], [[444, 283]], [[412, 160]]])
多边形。 如何在识别出的多边形周围画一条线,如图中所示的浅绿色线?在
Recognized shape
您可以使用drawContours()函数:
drawContours()
cv2.drawContours(img, contours, -1, (0,255,0), 3)
文件很好地解释了这一点:
http://docs.opencv.org/master/d4/d73/tutorial_py_contours_begin.html#gsc.tab=0
您可以使用
drawContours()
函数:文件很好地解释了这一点:
http://docs.opencv.org/master/d4/d73/tutorial_py_contours_begin.html#gsc.tab=0
相关问题 更多 >
编程相关推荐