ZedX Timestamps

Hi @Parv-Maheshwari,

replies to threads that have been inactive for months can easily go unnoticed, because they do not trigger the usual notifications to the support team.
I recommend always opening a new thread and adding links to the older threads that contain relevant details.

TIME_REFERENCE::IMAGE is the start of the sensor readout, which on the global shutter ZED X corresponds to the end of the exposure. The ISP buffering on the Jetson delays when the frame is available to grab(), not the timestamp value.

No subtraction is required.
In addition, ZED SDK v5.5.0 introduced TIME_REFERENCE::IMAGE_CENTER_OF_EXPOSURE, which returns the middle of each frame’s exposure, also from SVO files.
ZED SDK v5.5.1 fixed an offset of the per-frame exposure data stored in SVO2 files; files recorded with older versions keep this offset, so new recordings are required to use it.

Your reasoning is consistent with how the slave mode works: the exposure start is computed so that the exposure ends on the trigger rising edge, so each exposure is scheduled before the edge it is aligned to.
If this is the case, the one frame shift comes from the pulse to frame matching and not from the timestamp, which agrees with the answer above.

You are using ZED SDK v5.2. Can you repeat the test with ZED SDK v5.5.1, the latest ZED X Driver (v1.4.4) and the latest ZED ROS 2 Wrapper, recording a new SVO and comparing the IMAGE timestamps with the trigger edges shifted by one pulse?
ZED SDK v5.5.0 also improved the capture latency consistency of stereo GMSL cameras, which requires ZED X Driver v1.4.3 or newer.

Unfortunately, since we are in the middle of a data collection campaign, upgrading our stack with new SDKs, drivers, etc., runs the risk of newer data not following the same distribution as the old, so upgrading is not possible right now.

Regarding the trigger matching and slave mode, I did not understand your comment. Simply put. If I have a dropped trigger at T and I sent triggers at T-1 and T+1 in system time, will my corresponding dropped image be at T or T+1? Based on the ZEDX docs, which say that the camera syncs the end of exposure to the rise of an edge, it would seem that a drop at Time T results in a dropped image at T and not at T+1, but this is not what we see in the data. Can you please clarify?

Hi @Parv-Maheshwari,

Understood. The behavior described below also applies to your current setup. I still recommend upgrading once the campaign is over.

The dropped image is the one at T+1, which matches what you see in your data.

In slave mode, the camera does not start the exposure on the rising edge; it aligns the end of the exposure with the rising edge. Each rising edge is the reference used to schedule the next frame, whose exposure ends one trigger period later, on the following edge. This means:

  • the edge at T-1 generates the image whose exposure ends at T, so its IMAGE timestamp is close to T;
  • if the edge at T is missing, no frame is scheduled to end at T+1, so the image at T+1 is dropped.

Our documentation says the rising edge is synchronized with the end of the exposure phase of the CMOS sensor: ZED Link Quad GPIO Triggering. The slave-mode behavior is also covered in this thread: Understanding Slave mode on the Quad capture card. If you found a page that says the exposure starts on the rising edge, please share the link so we can correct it.

This also explains your 31.76 ms measurement. If you pair each image with the edge that scheduled it (T-1), you get an offset of about one period. If you pair it with the edge it is aligned to (T), the IMAGE timestamp falls close to the end of the exposure.

Apologies on my last post. There was a typo. I meant end of exposure is synced to Rising edge. I have updated the last post.

Also, for the future, I think adding this clarity that a trigger at T affects the image at T+1 should also be added to the docs, since the docs only say “the rising edge is synchronized with the end of the exposure phase of the CMOS sensor” .