I'd like to compare two images using "cv2.resize" because I have different size of images. But it shows some errors.
(omitted) Source:
def img_compare(passA, passB):
imageA = cv2.imread(passA)
imageB = cv2.imread(passB)
print (imageA.shape) # for debug
print (imageB.shape) # for debug
imageA = cv2.resize(imageA, imageB.shape)
Console:
(728, 1034, 3)
(721, 1020, 3)
Traceback (most recent call last):
File "comp.py", line 156, in <module>
throw_compare()
File "comp.py", line 150, in throw_compare
img_compare(passA, passB)
File "comp.py", line 89, in img_compare
imageA = cv2.resize(imageA, imageB.shape)
cv2.error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function 'resize'
> Overload resolution failed:
> - Can't parse 'dsize'. Expected sequence length 2, got 3
> - Can't parse 'dsize'. Expected sequence length 2, got 3
How to fix them?