2017-09-15 43 views
-1
img1 = cv2.imread("lena.jpg") 
img2 = cv2.imread('rsz_katrina.jpg') 

img1+img2 


爲什麼用同一陣列廣播錯誤塑造

ValueError         
Traceback (most recent call last) 
<ipython-input-46-475bd2d47c0f> in <module>() 
     2 img2 = cv2.imread('rsz_katrina.jpg') 
     3 
----> 4 img1+img2 

ValueError: operands could not be broadcast together with shapes (225,225,3) (255,255,3) 

回答

1

有在你的錯誤消息尺寸的密切關注:大小是不同的(225和255)。