opencv-python 错误解决方法

文|Seraph

  1. 调用cv2.findContours时报错:ValueError: not enough values to unpack (expected 3, got 2)
    解决:旧版返回3个参数,新版改为返回两个参数:
    contours, hierarchy = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)

你可能感兴趣的:(opencv-python 错误解决方法)