OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.48k stars 2.18k forks source link

How can I do to make that the processed video stream is playing in real-time to users in ImageAI? #822

Open Haicaji opened 1 year ago

Haicaji commented 1 year ago

Hello. How can I do to make that the processed video stream is playing in real-time to users in ImageAI? Instead of users viewing through saved files after processing.

Thank you!

OlafenwaMoses commented 10 months ago

You can easily do this by replacing the variable input_file_path=os.path.join(execution_path, "traffic.mp4") in line 56 with camera_input=cv2.VideoCapture('<camera_stream_input>') ,
e.g camera_input=cv2.VideoCapture(0) in the example file video_analysis_per_frame.py