How to sync two ZED camera images

Hello there,

I’m using 2 ZED cameras doing SLAM related research. For current project, I need 4 image from 2 ZED all sync. However, while I tested with zed-examples/other/multi camera at master · stereolabs/zed-examples (github.com), it seems that two ZED camera are not sync with each other, they are most likely works all on their own.

So under 15fps configuration, the time gap between two cameras could be up to 10ms (Its random. Time difference can be as low as <1ms, or as large as 30ms). Therefore I have to implement additional motion compensation to fix this issue…

My question is, is there any way to sync two ZED camera?

Many thanks!

My setup
Camera: ZED2i x 2
SDK:3.7.2
USB: Camera 1 on PCIE extend card and Camera 2 on USB3.0 on motherboard (so USB transfer in parallel)
Environment: Ubuntu 20.04.4, Cuda 11.6

Hi @tian,
there’s no HW synchronization mechanism on the ZEDs.
The only way is to grab the images from the two ZEDs and put them in two queues and then take the frames with the nearest timestamp.
At 15FPS the maximum sync error is 0.5*1/FPS sec, ~33 msec at 15 FPS

Hi Myzhar,

Thanks for the reply. I’ll mark it as solution as it is what it is… Following are my findings in the past few days, in case someone also looking for solution.

As state in documents, there will be communication delay between Camera and PC. So the timestamp generate by SDK is not the exact time when camera capture the image, instead its when the image data received by PC and appear on PC memory.

According to tests done by myself, this delay vary from 10ms - 60ms, with 1080p@30Hz configuration. So even you have two cameras connected with individual USB controller to overcome bandwidth issue, there’s no way you can recover the exact timepoint of image capture. So there’s no way you can align two camera perfectly in math equation with motion compensation.

So live with it :wink:

1 Like