📜  valueerror 需要超过 2 个值来解压 findcontours - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:46.141000             🧑  作者: Mango

代码示例1
if cv2.getVersionMajor() in [2, 4]:
    # OpenCV 2, OpenCV 4 case
    contour, hier = cv2.findContours(
                    thresh.copy(), cv2.RETR_CCOMP, cv2.CHAIN_APPROX_NONE)
else:
    # OpenCV 3 case
    image, contour, hier = cv2.findContours(
                    thresh.copy(), cv2.RETR_CCOMP, cv2.CHAIN_APPROX_NONE)