Threading within a GUI and OpenCV

S

Sam Berry

Hey,

I'm fairly new to python, and have had no experience with threading.

Iv made a small GUI App using the kivy module and OpenCV, i have currently got a button that when pressed runs a function that records from my webcam for 20 seconds.

However i have two other buttons, that when pressed i want to stop the recording. However when the button to record has been pressed the App freezes until the recording function has finished.

I have read that threading can be used to run a function as a deamon? so that other functions can be ran simultaneously?

I was just wondering if this would be the way to go, or if there are alternative routes?

A snippet from my code can be seen at (http://pastebin.com/9uFRjkgV) with a failed attempt of using threading!

Any help would be appreciated.

Thanks, Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top