Issue
I have a motion detection program in OpenCV, and I want it to play a sound when it detects motion. I use winsound. However, OpenCV still seems to be gathering frames while the sound is playing, so I want to know a way to stop all OpenCV processes for about 17 seconds. I tried time.sleep and running it with the -u
tag. Neither worked. Any ideas? Thanks.
Solution
I was able to solve the problem by putting what I want to run before resuming processes (playing the sound) in another script, performing import sound
and breaking out of the loop to stop the program, and I can't figure out how to start it again. For my purposes, I can restart it manually.
Answered By - user7872485
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.