I have a png image of shape(480,640,4) and webcam frame of shape(480,640,3). I would like to overlay the png entirely over the webcam feed but I'm getting the following error:
added_image = cv2.addWeighted(frame,0.4,png,0.1,0)
The error:
cv2.error: OpenCV(4.2.0) /io/opencv/modules/core/src/arithm.cpp:669: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function 'arithm_op'
Is the issue because of the channel difference. Can someone help me solve this issue? Thanks in advance!