GCV time.sleep()
3 posts
• Page 1 of 1
GCV time.sleep()
Hi,
I've made a gcv script (python) and operations related to time don't seem to work.
Even a simple
def process(self, frame):
time.sleep(10)
doesn't work.
Is there some kind of multi-threading/multiprocess in GCVWorker (or gtuner) when I start computer vision processing ?
Thanks for any reply.
I've made a gcv script (python) and operations related to time don't seem to work.
Even a simple
def process(self, frame):
time.sleep(10)
doesn't work.
Is there some kind of multi-threading/multiprocess in GCVWorker (or gtuner) when I start computer vision processing ?
Thanks for any reply.
-
Scoonix - Staff Sergeant
- Posts: 14
- Joined: Sun Jul 26, 2020 2:51 pm
Re: GCV time.sleep()
it is like using main {} in gpc.. using any kind of sleep or while(1) loop in process() is a bad idea.
not 100% correct but it works something like that:
when you get 60fps in gtuner computer vision the gcv scripts "process(self, frame)" get called around each 16-18ms (every new frame) and returns image/gcvdata back to gtuner.
when you want to run something every n time or n process function calls only then add some manual time tracking code
not 100% correct but it works something like that:
when you get 60fps in gtuner computer vision the gcv scripts "process(self, frame)" get called around each 16-18ms (every new frame) and returns image/gcvdata back to gtuner.
when you want to run something every n time or n process function calls only then add some manual time tracking code
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: GCV time.sleep()
Thanks for the explaination about how preccess() is called.
I just used time.sleep() to make basics tests about what's working or not when executing a python script via gtuner (as I might load some rnn-lstm that take some time to initialize).
Now I that have a better understanding of the procees and I know how to synchronize everything.
Kind regards,
scoonix
I just used time.sleep() to make basics tests about what's working or not when executing a python script via gtuner (as I might load some rnn-lstm that take some time to initialize).
Now I that have a better understanding of the procees and I know how to synchronize everything.
Kind regards,
scoonix
-
Scoonix - Staff Sergeant
- Posts: 14
- Joined: Sun Jul 26, 2020 2:51 pm
3 posts
• Page 1 of 1
Return to Gtuner Computer Vision
Who is online
Users browsing this forum: No registered users and 62 guests