ZedX Timestamps

ZED X SVO timestamps — end of exposure or host receive time?

Hi, following up on this thread with concrete measurements from a ZED X in hardware-triggered slave mode at 30 Hz.

Setup

  • ZED X (SN 40735594), slave mode, triggered by Teensy 4.1 (PTP-synced, 30 Hz)
  • Recorded to SVO2 using zed-ros2-wrapper (SDK 5.2, Jetson AGX Orin)
  • Trigger timestamps recorded via Jetson HTE (hardware timestamping engine)

How we read the SVO timestamps

import pyzed.sl as sl

cam = sl.Camera()
init = sl.InitParameters()
init.set_from_svo_file("zed.svo2")
init.svo_real_time_mode = False
init.depth_mode = sl.DEPTH_MODE.NONE
cam.open(init)

timestamps_ns = []
while True:
    err = cam.grab(sl.RuntimeParameters())
    if err == sl.ERROR_CODE.END_OF_SVOFILE_REACHED:
        break
    if err == sl.ERROR_CODE.SUCCESS:
        ts = cam.get_timestamp(sl.TIME_REFERENCE.IMAGE)
        timestamps_ns.append(ts.get_nanoseconds())
cam.close()

Alignment to trigger

We embed a 13-bit sync pattern in the trigger signal (selectively dropping pulses) at the start and end of each recording. This lets us unambiguously match trigger pulses to camera frames without relying on clock synchronization. Results:

  • 2 sync sequences detected, both at 100% confidence
  • Zero dropped frames (3918 valid frames)
  • Tick spans match exactly between trigger and ZED

Result

After accounting for a small clock drift between the timestamping clocks (HTE vs SYSTEM_CLOCK), the constant offset between the SVO timestamp and the trigger edge is 31.76 ms (~0.95 frame periods), with 340 us jitter.

This is very close to exactly one frame period (33.33 ms). This is consistent with the timestamp being assigned when the frame is available on the host (after GMSL transfer + ISP), not at end of exposure (which should align with the trigger rising edge to within ~15 us per the slave mode docs).

Question

Does camera.get_timestamp(sl.TIME_REFERENCE.IMAGE) return:

  1. End of exposure time — i.e. when the sensor finished integrating, synchronized to the trigger edge, or
  2. Host receive time — i.e. when the frame arrived on the Jetson after GMSL transfer and ISP processing (~1 frame later)?

Our measurement of 31.76 ms offset (nearly one frame period) suggests it is (2). If so, is there a way to get the actual exposure timestamp from the SVO, or should we subtract one frame period to approximate it?

Reproduction

Files (SVO, trigger timestamps, extraction scripts, plots): Google Drive