# Camera-IMU Time Offset

> Why camera and IMU timestamps disagree even on hardware-synchronised rigs, the measured sizes of the offset and their causes, how Kalibr estimates it offline and visual-inertial trackers online, and what to do when it drifts.

Page: https://egocam.ai/calibration/camera-imu-time-offset/

The **camera–IMU time offset** (`t_d`, or `timeshift_cam_imu` in Kalibr) is the number you add to a camera timestamp to get the same physical instant on the IMU's clock. Every camera–IMU rig has one. Current head-worn rigs make it small and stable in hardware and then calibrate what is left: [RoboCap](https://arxiv.org/abs/2610.07217) identifies its camera–IMU offset per device by continuous-time calibration to a residual of at most 3 ms, and the open-hardware [Ego-OSCAR](https://arxiv.org/abs/2608.08285) uses a microcontroller that "bridges the camera and inertial clock domains to a residual of 700 microseconds". Rigs without shared timing, such as phones and many off-the-shelf sensors, can have offsets of tens to hundreds of milliseconds.

This page covers where the offset comes from and how large it gets, how it is estimated offline and online, and what to do when it changes. Clocks, drift and exposure midpoints in general are on [Why Sync Matters](https://egocam.ai/sync/why-sync-matters/); the Kalibr output field and its sign are on the [Kalibr file reference](https://egocam.ai/kalibr/kalibr-file-reference/#timeshift_cam_imu); motion-based sync between devices is on [Software and Visual Sync](https://egocam.ai/sync/software-and-visual-sync/#motion-based-sync).

## Terms used on this page

For the field guide's terms in one place, grouped by topic, see the [glossary](https://egocam.ai/reference/glossary/).

| Term | Meaning |
|---|---|
| Time offset `t_d` | The shift that makes camera and IMU timestamps agree: t_imu = t_cam + t_d |
| Latency | A fixed delay between a sample being taken and being timestamped; it looks exactly like an offset |
| Exposure midpoint | The middle of a frame's exposure, the instant that best represents it for motion |
| Clock skew (drift) | Two clocks running at slightly different rates, so the offset grows over time |
| Offline calibration | Estimating `t_d` once, from a dedicated recording, usually with a calibration target |
| Online calibration | Estimating `t_d` inside the tracker, from every recording |

## The sign convention

Kalibr defines the shift as "timeshift between camera and IMU timestamps in seconds (t_imu = t_cam + shift)" ([Kalibr YAML formats](https://github.com/ethz-asl/kalibr/wiki/yaml-formats); [Kalibr file reference](https://egocam.ai/kalibr/kalibr-file-reference/#timeshift_cam_imu)). Qin and Shen use the same direction: `t_d` "is the amount of time by which we should shift the camera timestamps so that the camera and IMU data streams became temporally consistent" ([Qin and Shen, 2018](https://arxiv.org/abs/1808.00692v1)).

> **Diagram:** timeshift_cam_imu is the number of seconds to add to a camera timestamp to get the same instant on the IMU clock: t_imu = t_cam + shift. A negative value means the image's true IMU-clock time is earlier than its camera timestamp.

From that definition:

- If camera timestamps are late relative to the IMU's (the camera's path to its timestamp is slower), `t_d` is negative.
- If IMU timestamps are late (heavy IMU filtering, or a camera stamped at the start of exposure), `t_d` is positive.

Other tools may use the opposite sign. Applied with the wrong sign, the error doubles instead of cancelling, so check the convention of every tool the number passes through.

## Where the offset comes from

Each stage between a physical event and its timestamp adds delay, and the camera and IMU paths differ. The published measurements:

| Cause | Measured effect | Source |
|---|---|---|
| IMU readout delay, on a rig where one microcontroller triggers the cameras and reads the IMU | A constant 5.3 ms (TUM VI); "a constant offset of 4.77 milliseconds" (TUM-VIE) | [Schubert et al., 2018](https://arxiv.org/abs/1804.06120); [Klenk et al., 2021](https://arxiv.org/pdf/2108.07329) |
| IMU digital filter setting | Kalibr offsets of 1.55, 5.26 and 19.95 ms for Bartlett filter widths B = 0, 2 and 4 on the same ADIS16448 IMU | [Tschopp et al., 2020](https://arxiv.org/abs/1912.02469v1), Table II |
| Image timestamped at start of exposure | Offset grew with exposure time, fitted slope 0.498, as "fixed communication and filter delays plus half the exposure time" | [Furgale, Rehder and Siegwart, 2013](https://doi.org/10.1109/IROS.2013.6696514) |
| Commercial sensor, default SDK timestamps | Intel RealSense ZR300: "the temporal offset evolves linearly with the exposure time with a slope around 0.5"; 12.74 ms in a handheld recording | [Qin and Shen, 2018](https://arxiv.org/abs/1808.00692v1) |
| Commercial sensor, frames sometimes misassigned | Intel RealSense T265: 9.88 ms mean, 5.98 ms standard deviation, "a bi-modal distribution delimited by half the inter-frame time" | [Tschopp et al., 2020](https://arxiv.org/abs/1912.02469v1) |
| USB transport to a host computer | ±5 ms of jitter on the raw clock residual; ±0.2 ms after filtering the clock mapping | [Tschopp et al., 2020](https://arxiv.org/abs/1912.02469v1) |
| Phone, no hardware sync | In 2 of 20 Samsung Galaxy S8 test sequences, offsets "larger than 100 ms" made initialisation fail | [Ling et al., 2018](https://arxiv.org/pdf/1810.05456) |

Three lessons follow from the table.

**The IMU filter is part of the calibration.** VersaVIS's authors wrote that "time offset is highly dependent on the imu filter configuration", and their 1.55 ms became 19.95 ms when only the filter width changed. A firmware change to the IMU's output rate or filter invalidates the calibrated offset.

**Exposure moves the offset unless frames are stamped at mid-exposure.** If the timestamp marks the start of exposure, the representative instant is half an exposure later. If it marks the end, it is half an exposure earlier. RoboCap states that "Frames are timestamped at exposure completion on the device clock", with auto-exposure bounded at 10 ms; the paper does not say how exposure enters its timestamps. The fixes:

- stamp at mid-exposure in the firmware or driver, as TUM-VIE does ("we define the timestamp of an image as mid-exposure point");
- shift each trigger by half the exposure so midpoints stay periodic, VersaVIS's scheme, which "is to trigger the camera for a periodic mid-exposure timestamp by starting exposure half the exposure" time early ([Tschopp et al., 2020](https://arxiv.org/abs/1912.02469v1));
- or log every frame's exposure time and correct the stamps afterwards.

Without one of these, auto-exposure changes the offset during a recording. Walking from a dim room into daylight:

```text
start-of-exposure stamps, exposure drops from 20 ms to 1 ms
change in offset = 0.5 × (20 − 1) ms = 9.5 ms
```

**Commercial "synchronised" sensors still need checking.** On the ZR300, Qin and Shen found: "The manufacturer claimed that sensors are well synchronized. In practice, we find out there is an apparent time offset between the fisheye camera and IMU got from default SDK, which is affected by exposure time."

## How much offset a tracker tolerates

Visual-inertial odometry (VIO) uses the IMU to predict motion between frames. An unmodelled offset makes that prediction disagree with the images, and the error grows with how fast the head turns. Qin and Shen shifted the IMU timestamps of the EuRoC benchmark artificially and ran VINS-Mono without temporal calibration: "The performance deteriorates dramatically when the time offset increases. The tolerance interval is only within 6 milliseconds." OKVIS, also without temporal calibration, degraded the same way (Table II):

| Sequence | Offset | OKVIS RMSE (no calibration) | VINS-Mono with online calibration: estimated offset, RMSE |
|---|---|---|---|
| MH_03 | 5 ms | 0.284 m | 4.99 ms, 0.194 m |
| MH_03 | 15 ms | 0.451 m | 15.02 ms, 0.194 m |
| MH_03 | 30 ms | 2.805 m | 29.99 ms, 0.195 m |
| V1_03 | 30 ms | 1.817 m | 29.90 ms, 0.189 m |

With online calibration, accuracy did not depend on the offset ([Qin and Shen, 2018](https://arxiv.org/abs/1808.00692v1)). At still larger offsets, around 60 to 90 ms, Ling et al. found that trackers fail; the quote is on [Why Sync Matters](https://egocam.ai/sync/why-sync-matters/#what-timing-errors-do-to-tracking-and-3d).

## Offline estimation with Kalibr

`kalibr_calibrate_imu_camera` estimates the offset together with the camera-to-IMU transform, following [Furgale, Rehder and Siegwart (2013)](https://doi.org/10.1109/IROS.2013.6696514). It represents the IMU's trajectory and biases as B-splines, continuous functions of time. A spline can be evaluated at any instant, so moving the image timestamps by a candidate `t_d` needs no re-integration of the IMU data, and the offset becomes one more unknown in a single batch estimate. The estimate covers the gravity direction, the camera–IMU transform, the offset, and the time-varying IMU pose and biases.

Doing it in one estimate matters ([Furgale, Rehder and Siegwart, 2013](https://doi.org/10.1109/IROS.2013.6696514)). On 40 real datasets, the RMS timing errors were "0.054ms, 0.344ms, 0.165ms and 0.572ms" for the joint calibration, a separate time-delay estimate, gyroscope only and accelerometer only. Their recording protocol (about 90 s per dataset, about 55°/s of rotation) is on the [targets page](https://egocam.ai/calibration/targets-and-calibration-sequences/#reference-numbers-from-the-kalibr-paper), and the Kalibr steps on the [Kalibr workflow](https://egocam.ai/kalibr/kalibr-workflow/#8-calibrate-camera-to-imu).

For the time offset in particular:

- **Record with production IMU settings.** Same output rate, same filter registers. The VersaVIS results above show why.
- **Hold exposure fixed and short**, or stamp at mid-exposure, so the offset does not change during the recording.
- **Keep the refinement window wide enough.** Kalibr first guesses the offset by cross-correlating camera and IMU angular rates, then refines it; `--timeoffset-padding` (0.03 s by default) bounds only how far the refinement may move from that guess, not the total offset. The [Kalibr wiki](https://github.com/ethz-asl/kalibr/wiki/Multi-IMU-and-IMU-intrinsic-calibration): "an initial guess for the temporal offset is obtained from correlating absolute angular velocities as perceived independently by camera and IMU. Hence, this padding should not reflect the estimated temporal offset but merely a guess for the bounds within which this offsets will vary during calibration." The guess is made in [`IccSensors.py`](https://github.com/ethz-asl/kalibr/blob/1f60227442d25e36365ef5f72cd80b9666d73467/aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccSensors.py#L208-L271). An offset that runs into its bound points to a poor first guess or bad data ([Kalibr workflow](https://egocam.ai/kalibr/kalibr-workflow/#common-failures)).
- **Measure the exposure slope once.** Calibrate at several fixed exposure times and fit the offset against exposure. A slope near +0.5 means start-of-exposure stamps, near −0.5 end-of-exposure stamps, near 0 mid-exposure stamps. Furgale's slope of 0.498 and Qin and Shen's "around 0.5" are both start-of-exposure cases.
- **Repeat it.** Furgale's estimates stayed "within a domain of ±0.2 ms" across datasets ([Furgale, Rehder and Siegwart, 2013](https://doi.org/10.1109/IROS.2013.6696514)). Qin and Shen's online estimates on the ZR300 had standard deviations of 0.071–0.16 ms per exposure setting, against 0.13–0.27 ms for Kalibr on the same data.

## Online estimation in visual-inertial trackers

An offline number goes stale if the rig reboots into a different buffering delay, the exposure changes, or the clocks drift. Modern trackers therefore keep `t_d` in their state and refine it while running.

**It can be estimated.** [Li and Mourikis (2014)](https://doi.org/10.1177/0278364913515286) added the offset to an EKF's state and proved it "is locally identifiable, except in a small number of degenerate motion cases". Those cases "are either (i) cases known to cause loss of observability even when" no offset exists, "or (ii) cases that are unlikely to occur in practice."

**Rotation drives it.** Ling et al. watched the estimates converge: "the convergence of time offsets is the same as the convergence of gyroscope biases. This means that, time offsets are calibrated mainly by aligning relative rotations from visual constraints and from gyroscope integrations" ([Ling et al., 2018](https://arxiv.org/pdf/1810.05456)). Head rotation, which egocentric recordings have plenty of, is what makes the offset observable.

The three published ways to put `t_d` into a tracker:

| Approach | How `t_d` enters | Published behaviour |
|---|---|---|
| Filter state, as in OpenVINS | `t_d` is part of the EKF state and is updated with each measurement | In 20-run simulations started from bad calibration values, online calibration gave 0.218° and 0.139 m average error, against 5.432° and 508.719 m without it ([Geneva et al., 2020](https://udel.edu/~pgeneva/downloads/papers/c10.pdf), Table I) |
| Feature velocity, as in VINS-Mono | Each feature's image position is shifted by `t_d` times its velocity on the image, so the IMU terms need not be recomputed | Converges "quickly within a few seconds" on EuRoC; large initial offsets are compensated "from coarse to fine gradually" ([Qin and Shen, 2018](https://arxiv.org/abs/1808.00692v1)) |
| Pose interpolation | The IMU pose is moved to the shifted time using the estimated velocity and angular velocity | Works with any feature tracker; slower to settle, "because the system velocity can only gradually converge to the accurate value" ([Fan et al., 2025](https://arxiv.org/pdf/2501.01788)) |

Fan et al. built the third approach because the feature-velocity method "is highly influenced by the precision of optical flow and is not feasible for VINS with different tracking frontends." In their simulation with noisy image observations and initial offsets of 20, 40 and 60 ms, their method averaged 19.86, 39.74 and 59.73 ms, while two VINS-Mono variants averaged 12.28–16.30, 30.51–35.53 and 48.16–53.88 ms (Table III). On clean EuRoC data, VINS-Mono's original method was the more precise, which the authors state.

OpenVINS also showed that leaving online calibration on costs nothing when the starting values are already right: 0.212° and 0.134 m with it, 0.200° and 0.128 m without, from the true calibration ([Geneva et al., 2020](https://udel.edu/~pgeneva/downloads/papers/c10.pdf)). The [IMU calibration guide](https://egocam.ai/calibration/imu-calibration/#keeping-it-calibrated-while-recording) covers what else these trackers calibrate online.

## When the offset changes during a recording

Kalibr and the trackers above assume one offset per recording, or one that changes slowly. Three things break that.

**Restarts.** Without a shared clock, Furgale et al. warned, "the time offset may be different from start up to start up and subject to drift over longer periods of time" ([Furgale, Rehder and Siegwart, 2013](https://doi.org/10.1109/IROS.2013.6696514)). Calibrate per session, or estimate online.

**Load and rolling shutter.** On phones, Ling et al. note that "time offsets change over time due to the variation of the system processing payload and sensor jitter". They give every frame its own offset, modelled as a slowly varying random walk, which also absorbs the timing error of treating a rolling-shutter frame as if it were taken at its middle row. To keep this affordable, they cache partial IMU integrations in a per-frame table "implemented as a red-black tree"; each optimisation took 70 ± 10 ms on the phone. The rolling-shutter side is on [Rolling-Shutter Calibration](https://egocam.ai/calibration/rolling-shutter-calibration/).

**Separate clocks.** If the camera and IMU are timed by different oscillators, the offset grows steadily with time, and a constant-offset estimate cannot keep up. Qin and Shen are blunt about such hardware: "In some worse cases, sensors are collected with different clocks and the time offset drifts along with the time. This kind of sensors is unqualified for sensor fusion." Measured drift rates, from microcontrollers to consumer headsets, are collected on [Why Sync Matters](https://egocam.ai/sync/why-sync-matters/#measured-drift-on-real-devices). For scale, "2 ms per minute", the figure Shu et al. give for consumer devices against motion capture, adds up to 20 ms in a 10-minute recording, beyond Qin and Shen's 6 ms tolerance.

The hardware answer is one clock for every sensor. RoboCap's device clock is a 24 MHz temperature-compensated crystal oscillator (TCXO) with a worst-case budget of ±1.81 ppm, about ±6.5 ms per hour against true time, and "Because all sensors share this clock, that drift affects the absolute timeline only and not inter-sensor synchronization" ([Ali et al., 2026](https://arxiv.org/abs/2610.07217)).

When two independent clocks have to be aligned after the fact, for example a headset against a motion-capture room, Shu et al. start from the shift that maximises the cross-correlation of the two angular-velocity signals, then model the offset itself as a linear spline over time: "In our implementation, we adopted a 20-second interval, which ensures optimization convergence and precise estimation of clock drift" ([Shu et al., 2025](https://arxiv.org/pdf/2512.07221)).

## Checklist

1. **Find out what the timestamps mark.** Start of exposure, mid-exposure or end of readout, for the camera; sample time or arrival time, for the IMU. Correct to mid-exposure if you can.
2. **Freeze the IMU configuration** before calibrating: output rate and filter settings.
3. **Calibrate offline** with Kalibr at a fixed, short exposure; repeat the recording and compare the two offsets.
4. **Enable online estimation** in the tracker, starting from the Kalibr value, and check the tracker's sign convention against Kalibr's.
5. **Look for drift.** Compare the online estimate at the start and end of a long recording. An offset that changes steadily is the signature of separate clocks, described above; it needs a shared clock or a drift model, not a better constant.

## Prompts you can give an AI

```text
Write a Python script that reads several Kalibr camchain-imucam.yaml files recorded at different
fixed exposure times, fits timeshift_cam_imu against exposure time, and reports the slope and
intercept. Explain what a slope of about +0.5, 0 or -0.5 says about where the camera timestamps
sit in the exposure, and write the function that moves raw timestamps to mid-exposure.
```

```text
Write a Python script with NumPy and SciPy that takes camera orientations (timestamp, qw, qx, qy,
qz) from visual odometry and raw gyroscope samples (timestamp, gx, gy, gz), computes angular-speed
signals for both, resamples them to 1 kHz, and cross-correlates them in 20-second windows to
estimate the camera-IMU offset in each window and any linear drift in ms per minute and ppm.
```

```text
I pass Kalibr's timeshift_cam_imu (t_imu = t_cam + shift) into my VIO configuration. Here are its
config files. Find the parameter that holds the camera-IMU time offset, state its sign convention
from the code or documentation, and tell me whether I must flip the sign.
```

## Sources

- [Unified temporal and spatial calibration for multi-sensor systems](https://doi.org/10.1109/IROS.2013.6696514) — Furgale, Rehder and Siegwart, IROS 2013.
- [Online Temporal Calibration for Monocular Visual-Inertial Systems](https://arxiv.org/abs/1808.00692v1) — Qin and Shen, IROS 2018.
- [Online temporal calibration for camera–IMU systems: Theory and algorithms](https://doi.org/10.1177/0278364913515286) — Li and Mourikis, IJRR 2014.
- [Modeling Varying Camera-IMU Time Offset in Optimization-Based Visual-Inertial Odometry](https://arxiv.org/pdf/1810.05456) — Ling et al., ECCV 2018.
- [Universal Online Temporal Calibration for Optimization-based Visual-Inertial Navigation Systems](https://arxiv.org/pdf/2501.01788) — Fan et al., 2025.
- [Kalibr wiki: YAML formats](https://github.com/ethz-asl/kalibr/wiki/yaml-formats) — ETH Zurich ASL.
- [Kalibr wiki: Multi-IMU and IMU intrinsic calibration](https://github.com/ethz-asl/kalibr/wiki/Multi-IMU-and-IMU-intrinsic-calibration) and [`IccSensors.py`](https://github.com/ethz-asl/kalibr/blob/1f60227442d25e36365ef5f72cd80b9666d73467/aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccSensors.py) — ETH Zurich ASL.
- [OpenVINS: A Research Platform for Visual-Inertial Estimation](https://udel.edu/~pgeneva/downloads/papers/c10.pdf) — Geneva et al., ICRA 2020.
- [VersaVIS: An Open Versatile Multi-Camera Visual-Inertial Sensor Suite](https://arxiv.org/abs/1912.02469v1) — Tschopp et al., Sensors 2020.
- [The TUM VI Benchmark for Evaluating Visual-Inertial Odometry](https://arxiv.org/abs/1804.06120) — Schubert et al., IROS 2018.
- [TUM-VIE: The TUM Stereo Visual-Inertial Event Dataset](https://arxiv.org/pdf/2108.07329) — Klenk et al., IROS 2021.
- [Spatiotemporal Calibration and Ground Truth Estimation for High-Precision SLAM Benchmarking in Extended Reality](https://arxiv.org/pdf/2512.07221) — Shu et al., 2025.
- [RoboCap: A New Platform for Egocentric Robot Learning](https://arxiv.org/abs/2610.07217) — Ali et al., 2026.
- [Ego-OSCAR: Egocentric Open source Stereo CAptuRe System](https://arxiv.org/abs/2608.08285) — Palanisamy et al., 2026.
