Automatic-leaf-infection-identifier icon indicating copy to clipboard operation
Automatic-leaf-infection-identifier copied to clipboard

error for cv2.findContours()

Open shivgana opened this issue 3 years ago • 2 comments

line 137 in leafdetectionALLmix.py, contours,hierarchy = cv2.findContours(bordered, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE) error occured: ValueError: too many values to unpack (expected 2)

while creating dataset

shivgana avatar Aug 03 '20 14:08 shivgana

I have the same issue

SeemaManju avatar Aug 16 '20 12:08 SeemaManju

Hi! I had the same issue, I found a fix in SO https://stackoverflow.com/questions/25504964/opencv-python-valueerror-too-many-values-to-unpack It might be worth it to add this to master? if you want to try it just change contours,hierarchy = cv2.findContours to auxvar,contours,hierarchy = cv2.findContours in lines 137 and 206 (leafdetectionALLmix.py)

psicobloc avatar Nov 10 '20 16:11 psicobloc