Iam getting this error :
OpenCV(4.6.0) /io/opencv/modules/core/src/arithm.cpp:212: error: (-209:Sizes of input arguments do not match) The operation is neither 'array op array' (where arrays have the same size and type), nor 'array op scalar', nor 'scalar op array' in function 'binary_op'
My concept is paste an video on the top of an image, I mean the image will be backword and the video will be forward . The code i tried bellow :
file_name = 'Center_transperant.mov'
nparr = np.fromstring(bgrm_image, np.uint8)
bgrm_Img = cv2.imdecode(nparr, cv2.IMREAD_UNCHANGED)
vid = cv2.VideoCapture(storage_dir + file_name)
fps = vid.get(cv2.CAP_PROP_FPS)
ret, frame = vid.read()
try:
while(ret):
ret, frame = vid.read()
if not ret:
break
subject = cv2.resize(frame, (250, 250))
frame = cvzone.overlayPNG(
subject,frame, [50, 50])
except Exception as error:
print(">>>>> error", str(error))