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
Sync NN meta with depth(x,y,z), sync previewout & metaout #157
Conversation
LGTM |
Tested with 8 different networks and they all performed great - I've even got feeling that some tracker is attached to my face with LGTM, great to have this @alex-luxonis ! |
Thanks @VanDavv for testing and sorry @alex-luxonis that I've been so far behind on testing. Trying this now. |
This works insanely well @alex-luxonis ! I agree with Lukasz comment of it feeling glued to you. I ran See the quick video below: |
Sync NN meta with depth(x,y,z), sync previewout & metaout
Change name of libarchive for better compatiblity with Hunter's packages
Sync NN metadata with depth frames for X,Y,Z calculation, based on camera capture timestamps.
As RGB and Mono cameras are not synchronized, another problem we saw was a slow drift, 1 frame every 80 seconds at 30fps. To circumvent this, a software-sync method is implemented: based on RGB-Mono timestamp diff, a control loop is adjusting the RGB frame interval, in small amounts by up to ± 0.2ms. During startup, it may take few seconds (up to 10), until RGB and Mono get in close sync together (this could be further improved). Until then, then max timestamp diff between RGB-Mono is no larger than half frametime (that is 16.6ms at 30fps).
Note: for this mechanism to work well, if the RGB and Mono FPS are modified from the default of 30 (using
-rgbf
and-monof
arguments), they should be set to the same value.Add an option to improve the synchronization of NN metadata overlay on the previewout stream, by aligning the packets sent from device:
Note: for this to work well, the NN FPS should not be slower than camera FPS. To improve on this (for some NN models), run NN with 2 NCEs and more Shaves, or reduce RGB and Mono FPS, for example:
./depthai.py -nce 2 -sh 10 -cmx 10 -sync
./depthai.py -rgbf 24 -monof 24 -sync