OpenCV python: ValueError: too many values to unpack

前端 未结 7 1031
借酒劲吻你
借酒劲吻你 2020-11-30 01:39

I\'m writing an opencv program and I found a script on another stackoverflow question: Computer Vision: Masking a human hand

When I run the scripted answer, I get th

相关标签:
7条回答
  • 2020-11-30 02:22

    The thing you need to do is just add '_' where you are not using the required var , originally given by:

    im2, contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)

    to

    _ , contours, _ = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)

    Here the original doc is given: https://docs.opencv.org/3.1.0/d4/d73/tutorial_py_contours_begin.html

    0 讨论(0)
提交回复
热议问题