Код: Выделить всё
(contours, hierarchy) = cv2.findContours(
img_bin, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE
)
print(contours[0].shape)
Код: Выделить всё
(299, 1, 2)
Подробнее здесь: https://stackoverflow.com/questions/743 ... -in-opencv
Код: Выделить всё
(contours, hierarchy) = cv2.findContours(
img_bin, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE
)
print(contours[0].shape)
Код: Выделить всё
(299, 1, 2)