Code from the tutorial doesn't work
.
import numpy as np
import cv2
im = cv2.imread('test.jpg')
imgray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY)
ret,thresh = cv2.threshold(imgray,127,255,0)
contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
When executing this code, I get an error: ValueError: too many values to unpack (expected 2) .
Is there a mistake in tutorial or am I doing something wrong?