Closed pcakhilnadh closed 4 years ago
In openCV 4 it returns only two parameters
So the line
im2, contours, hierarchy = cv2.findContours(img_final_bin, cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
should be chnaged to
contours, hierarchy = cv2.findContours( img_final_bin, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
Find contours for image, which will detect all the boxes
im2, contours, hierarchy = cv2.findContours(img_final_bin, cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
ValueError: not enough values to unpack (expected 3, got 2)