import cv2
cap = cv2.VideoCapture(input_path)
count = 0
n=0
while True:
ret, frame = cap.read()
if ret:
# You can do processing on this frame variabqle
roi = frame[343:489, 572:759]
# frame = cv2.resize(roi, None, fx=0.9, fy=0.9)
cv2.imshow("roi", roi)
cv2.imshow("image", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
else:
break
cv2.destroyAllWindows()
I want the first frame of video to compare with other frames of video and calculate ssim (similarity) based on the first frame. How to do this search a lot but not getting the desired result.