Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to turn the real time webcame to detect on pre-recorded video? #43

Open
C45513 opened this issue Nov 16, 2020 · 3 comments
Open

How to turn the real time webcame to detect on pre-recorded video? #43

C45513 opened this issue Nov 16, 2020 · 3 comments

Comments

@C45513
Copy link

C45513 commented Nov 16, 2020

Hi,

I'm new to OpenCV and computer vision. I'm grateful for your detailed instruction and I managed to run it with no sweat and pull up the real time webcam detector. However, how can I change the script to detect from the recorded video rather from the webcam?

Also, how can the result (probabilities of the emotions) be automatically recorded in the system?

Thank you very much.

@version0chiro
Copy link

version0chiro commented Feb 11, 2021

Hey @C45513, You can change the code from real-time to recorded video by replacing the
camera = cv2.VideoCapture(0)
while True:
with
camera = cv2.VideoCapture('path of the video file')
while(cap.isOpened()):

Be sure to add some try and except for error handling

@AjeelAhmed1998
Copy link

hey @version0chiro what is cap here? Also would the solution be the same if I wanted to detect emotions in just one image?
Thanks.

@AjeelAhmed1998
Copy link

AjeelAhmed1998 commented May 23, 2021

Nevermind I figured it out.

In case anyone else is looking for it: here's the link to my Stack overflow post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants