subtraction between image pixels

Viewed 26

I found this error when I try to use cv2.subtract(image1, image2)

error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\core\src\arithm.cpp:674: error: (-5:Bad argument) When the input arrays in add/subtract/multiply/divide functions have different types, the output array type must be explicitly specified in function 'cv::arithm_op'

The images has the same shape, I cannot understand why this is happening.

Thanks in advance.

0 Answers
Related