0

I am working on OpenCV-Python. I have a image like this(bellow image,but without light green lines) from live feed by webcam.I have found corners coordinates,

(array([[[280, 109]],

   [[162, 206]],

   [[189, 341]],

   [[329, 389]],

   [[444, 283]],

   [[412, 160]]])

of polygon. How to draw a line around recognized polygon like light green lines shown on image?

Recognized shape

4

1 回答 1

1

您可以使用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

于 2016-01-23T08:41:07.633 回答