OpenCV python: ValueError: too many values to unpack

前端 未结 7 1076
借酒劲吻你
借酒劲吻你 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:02

    python is right.
    you cannot unpack 3 values from the turple and place them in a turple of two contours, _ = cv2.findContours(skin_ycrcb, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)

    use

    img, contours, _ = cv2.findContours(skin_ycrcb, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)

提交回复
热议问题