I have found the following code on this website:
import os
import os.path
import cv2
import glob
import imutils
CAPTCHA_IMAGE_FOLDER = \"generated_captcha_im
I wrote the same code in following way:
_, contours, hierarchy = cv2.findContours(img,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE)
and my code worked. I think previously it was returning 2 variables now we have to unpack into three variables. If this doesn't work try the following:
_, contours, _ = cv2.findContours(img,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_NONE)
this should work.
For more information, you can visit the OpenCV documentation page: https://docs.opencv.org/3.1.0/d4/d73/tutorial_py_contours_begin.html
I hope this will help you.