MCPcopy
hub / github.com/JimmyHHua/opencv_tutorials / contours_info

Function contours_info

python/code_053/opencv_053.py:5–9  ·  view source on GitHub ↗
(image)

Source from the content-addressed store, hash-verified

3
4
5def contours_info(image):
6 gray = cv.cvtColor(image, cv.COLOR_BGR2GRAY)
7 ret, binary = cv.threshold(gray, 0, 255, cv.THRESH_BINARY | cv.THRESH_OTSU)
8 out, contours, hierarchy = cv.findContours(binary, cv.RETR_EXTERNAL, cv.CHAIN_APPROX_SIMPLE)
9 return contours
10
11
12src = cv.imread("abc.png")

Callers 1

opencv_053.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected