python調用cv2.findContours時報錯:ValueError: not enough values to unpack (expected 3, got 2)

  OpenCV舊版,返回三個參數:python im2, contours, hierarchy = cv2.findContours(mask, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) 要想返回三個參數:ip 把OpenCV 降級成3.4.3.18 就能夠了,在終端輸入pip install opencv-python==3.4.3.18pip Open
相關文章
相關標籤/搜索