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
In OpenCV4, cv2.findContours has only 2 return values. Contours being the FIRST value
contours, _ = cv2.findContours(thresh.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
Note that I added underscore to let go of the other return value of hierarchy