我正在研究OpenCV-Python . 我有一个像这样的图像(波纹管图像,但没有浅绿色线条)来自网络摄像头的实时馈送 . 我找到了角坐标,
(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
1 回答
你可以使用
drawContours()
功能:文档解释得很好:
http://docs.opencv.org/master/d4/d73/tutorial_py_contours_begin.html#gsc.tab=0