luxonis / depthai-experiments

Experimental projects we've done with DepthAI.
MIT License
809 stars 362 forks source link

Added device-side timestamp syncing example #391

Closed Erol444 closed 2 years ago

Erol444 commented 2 years ago

Current results:

[14442C1001615ED700] [1.1] [637.092] [Script(7)] [warning] disp, ts: 0:10:37.061913, seq 22
[14442C1001615ED700] [1.1] [637.093] [Script(7)] [warning] left, ts: 0:10:37.061894, seq 22
[14442C1001615ED700] [1.1] [637.094] [Script(7)] [warning] right, ts: 0:10:37.061913, seq 22
[14442C1001615ED700] [1.1] [637.094] [Script(7)] [warning] rgb, ts: 0:10:37.066541, seq 24

[1661421967.9777915] Stream disp fps 17.413351470700785, timestamp: 20:33:44.726435, seq: 22
[1661421967.9787707] Stream left fps 17.400112803402646, timestamp: 20:33:44.726416, seq: 22
[1661421967.9797888] Stream right fps 17.38672189911775, timestamp: 20:33:44.726435, seq: 22
[1661421967.9817886] Stream rgb fps 17.373817795427325, timestamp: 20:33:44.731063, seq: 24

We are using 20FPS for all streams, and left/right/disparity streams are 5ms ahead of color stream, which means they are still in sycn. You can also see that each frame takes about 1ms to arrive from the script node to the host computer, and this number would increase if we didn't encode the streams beforehand. image