My simple python code is this
import cv2 img=cv2.imread(\'Materials/shapes.png\') blur=cv2.GaussianBlur(img,(3,3),0) gray=cv2.cvtColor(blur,cv2.COLOR_BGR2G
the function cv2.findContours() has been changed to return only the contours and the hierarchy and not ret
cv2.findContours()
you should change it to:
contours,hierachy=cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)