• DepthAI-v2
  • get the frame's timestamp value in host clock on oakd-sr camera

Re OAK D SR camera TOF frames timestamp

I call frame.getTimeStamp() from tof frame, how do I convert it to host's epoch? Is OAK D SR camera's clock sync with host?

I doubt that it is sync. because I find a deficiency:

getTimeStamp() returns frame capture ts: 5 days, 23:12:04.590882, (running on June 16th)
but my host last reboot is 15 days ago: today is June 16th.
System boot time: 2025-05-29 08:40:04
Time since boot: 18 days, 8:04:27.707650

Hi,
you’re right that the clocks are not synced. getTimestampDevice() gives time since the OAK device booted (initialized dai.Device()), while getTimestamp() gives the time since host boot (dai.clock.now()).

In your case, the host has been up for 18 days, but the OAK shows 6 days which means the device was rebooted or reconnected about 6 days ago, separately from the host.

To estimate host epoch time, you can calculate the host boot time as time.time() - time.monotonic(), then add getTimestamp() to get the frame time in host epoch.

Best,

Lovro

Thanks. @lovro
One quick question, the above method you menthod, does it work for OAK POE camera where there are 3 lens.