I'm using OpenCV (Canny + findCountours) to find external contours of objects. The curve drawn is typically almost, but not entirely, closed. I'd like to close it - to find the region it bounds.
How do I do this?
Things considered:
Using PolyLine method to draw contours
cv2.PolyLine(img, points, is_closed=True, 255, thickness=1, lineType=8, shift=0)
Read the docs for further details: http://docs.opencv.org/2.4/modules/core/doc/drawing_functions.html
Mark answered if it resolved your problem. If not then let me know.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With