fall_detection / utils /video_player.py
kuldipparaliya's picture
Upload 7 files
8d18193 verified
raw
history blame contribute delete
418 Bytes
import cv2
class VideoPlayer:
def play_video(self, video_path):
cap = cv2.VideoCapture(video_path)
while cap.isOpened():
ret, frame = cap.read()
if ret:
cv2.imshow('Video', frame)
if cv2.waitKey(60) & 0xFF == ord('q'):
break
else:
break
cap.release()
cv2.destroyAllWindows()