When I run this:
contours,_,hierarchy = cv2.findContours(thresh.copy(),cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
I get this error:
cv2.findContours() return two values and cannot be unpacked to contours, hierarchy and _
cv2.findContours()
It should be like this:
contours, hierarchy = cv2.findContours(thresh.copy(),cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
or more:
a, b, *others = [1, 2, 3, 4]