import cv2 img=cv2.imread('1.jpg') img1=cv2.resize(img,(416,333)) img21=cv2.imread('2.jpg') # r1,c1=img21.shape() # print(r1) img2=cv2.resize(img21,(416,333)) # B=cv2.add(img1,img2) A=cv2.addWeighted(img1,0.8,img2,0.2,2) cv2.imshow('king',A) if cv2.waitKey(0)&0xFF==ord('k'): cv2.destroyAllWindows()