so, I have this code in which I'm comparing five images (don't mind that part of the code, I just wanted to give you guys some context) through IF statements but I'm getting an indentation error inside them and I just couldn't solve it. I just can't see my mistake, I need a second opinion :(
import cv2
width=50
height=50
dimension = (width,height)
img1 = cv2.cv2.imread('D:/Scripts/img/CAPTCHA/Imagen_0.png',cv2.cv2.IMREAD_GRAYSCALE)
img2 = cv2.cv2.imread('D:/Scripts/img/CAPTCHA/Imagen_1.png',cv2.cv2.IMREAD_GRAYSCALE)
img3 = cv2.cv2.imread('D:/Scripts/img/CAPTCHA/Imagen_2.png',cv2.cv2.IMREAD_GRAYSCALE)
img4 = cv2.cv2.imread('D:/Scripts/img/CAPTCHA/Imagen_3.png',cv2.cv2.IMREAD_GRAYSCALE)
img5 = cv2.cv2.imread('D:/Scripts/img/CAPTCHA/Imagen_4.png',cv2.cv2.IMREAD_GRAYSCALE)
img1 = cv2.cv2.resize(img1,dimension,interpolation=cv2.cv2.INTER_AREA)
img2 = cv2.cv2.resize(img2,dimension,interpolation=cv2.cv2.INTER_AREA)
img3 = cv2.cv2.resize(img3,dimension,interpolation=cv2.cv2.INTER_AREA)
img4 = cv2.cv2.resize(img4,dimension,interpolation=cv2.cv2.INTER_AREA)
img5 = cv2.cv2.resize(img5,dimension,interpolation=cv2.cv2.INTER_AREA)
if cv2.cv2.countNonZero(img1[0]) != cv2.cv2.countNonZero(img2[0]):
if cv2.cv2.countNonZero(img1[0]) == cv2.cv2.countNonZero(img3[0]):
#search image 2
else:
#search image 1
else:
if cv2.cv2.countNonZero(img1[0]) != cv2.cv2.countNonZero(img3[0]):
if cv2.cv2.countNonZero(img1[0]) == cv2.cv2.countNonZero(img4[0]):
#search image 3
else:
#no image found
else:
if cv2.cv2.countNonZero(img1[0]) != cv2.cv2.countNonZero(img4[0]):
if cv2.cv2.countNonZero(img1[0]) == cv2.cv2.countNonZero(img5[0]):
#search image 4
else:
#search image 5
Please help me with the IF statements structure, don't worry about the rest of the code :( I just need to solve the indentation problem.