def _get_contours(array):
major = _get_opencv_version()[0]
if major == 3:
_, contours, _ = cv2.findContours(array, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
else:
_, contours = cv2.findContours(array, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
return contours
评论列表
文章目录