Stay With us
3 new comments

beginner
new

Help & Settings
About
Help
Tips

operands could not be broadcast together with shapes (269,541,3) (265,533,3)

Error while running the code in python opencv.

I have tried to add two images and show them using opencv. But it shows an error

import cv2
import numpy as np

img1 = cv2.imread('first.png')
img2 = cv2.imread('second.png')

add = img1 + img2

cv2.imshow('add',add)
cv2.waitKey(0)
cv2.destroyAllWindows()

Error is

operands could not be broadcast together with shapes (269,541,3) (265,533,3)

(0) Replies

Please login or register to Comment or Answer