You’re failing to read the image, most likely you’re not giving the full path of the image to the cv2.imread function, so the cv2.resize function receives None
You need something like this:
cv2.imread(os.path.join(image_path, image), cv2.IMREAD_COLOR)
Make sure you import os
first at the top of your code.
Fill image_path
variable with the path of the image.
CLICK HERE to find out more related problems solutions.