Closed vin-ni closed 5 years ago
Yes, it is described here: https://github.com/jeeliz/jeelizFaceFilter#miscellaneous-methods
is it reset_inputTexture()
?
toggle_pause
also stops the video.
I don't know how to check if the analyzing code is running in the background.
Ok I see what you mean. There is currently no way to do this because the video texture is refreshed just before the detection. So if you pause the loop you pause the video texture updating too. What is the purpose of this? Is it to free computing resources for the other parts of the application ?
Yes, there will be some interim time, where I'm not tracking anything and just display the video stream. I figured it would be good pause the tracking during that time and turn it back on when I go back to tracking.
Is there a line that triggers the detection that I could put into a if / else logic?
There was a small bug on the library, I correct it and push so please use the next version otherwise it won't work :). You can do what you want be launching:
JEEFACEFILTERAPI.set_scanSettings({nDetectsPerLoop: 0})
It set the number of neural net detection by rendering loop to 0. So the video will keep updating. Then if you want to restart detection and tracking:
JEEFACEFILTERAPI.set_scanSettings({nDetectsPerLoop: -1})
-1
is for adaptative mode: it process as many detections per second as possible (depending on device capabilities, with a maximum of 5 because it is useless to do more).
Thank you so much!
Is there a way of pausing the tracking but keeping the camera stream running?