# Rolling-Shutter Calibration

> How to measure a rolling-shutter camera's line delay and readout time: from file metadata and the Android camera API, with a flashing or strobing LED, with sequenced LED strips, or from video of a moving target with Kalibr; how to check the result; and how reconstruction pipelines use per-pixel capture times.

Page: https://egocam.ai/calibration/rolling-shutter-calibration/

Current head-worn capture rigs avoid the problem for their geometry cameras: RoboCap, Ego-OSCAR and the 12 rig cameras of Ego-1K are all global shutter (see [Global vs Rolling Shutter](https://egocam.ai/hardware/global-vs-rolling-shutter/#which-shutter-public-rigs-use)). Rolling-shutter sensors remain in two places. Hybrid headsets and glasses pair global-shutter tracking cameras with a rolling-shutter RGB camera; the Quest 3 inside the Ego-1K rig records "two forward-facing rolling-shutter RGB cameras" ([Lee et al., 2026](https://arxiv.org/abs/2603.13741)), and Project Aria's RGB camera is rolling shutter too. Action cameras and phones are rolling shutter throughout.

Any of these cameras used for geometry, tracking or 3D reconstruction needs its readout timing calibrated. This page covers how to measure it and how to use it. What a rolling shutter is, published readout times, and when a rolling shutter is good enough are on [Global vs Rolling Shutter](https://egocam.ai/hardware/global-vs-rolling-shutter/); what it does to an ordinary calibration is on [Lens Effects That Break a Calibration](https://egocam.ai/lens-physics/lens-effects-that-break-calibration/#rolling-shutter-and-global-shutter).

## What is calibrated

| Quantity | Meaning |
|---|---|
| Line delay `d` (row time) | The time between the start of exposure of one row and the next. Kalibr stores it as `line_delay`, in seconds per row |
| Readout time | Line delay times the number of rows: the time from the first row to the last |
| Scan direction | Which way readout runs across the image. A sensor mounted at 90° reads out along image columns |
| Reference row | Which row the frame timestamp refers to: usually the first, sometimes the middle |
| Pixel time `t(u)` | The capture time of pixel u: frame time plus row index × line delay |

> **Diagram:** Exposure timing, row by row. A global shutter exposes every row over the same interval. A rolling shutter starts each row a row time (t_row) after the one above, so the last row is read a whole readout time (t_row × number of rows) after the first. Exposure time sets blur within a row; readout time sets skew across the frame, so a short exposure does not fix a rolling shutter.

Two properties of the line delay shape every method below:

- **It belongs to a sensor mode, not a camera.** Resolution, crop, binning and frame rate change it. Charmant, measuring a webcam, notes that scaling the image down keeps the same timing but "Cropping will change the scan time as there really are less pixels to read out" ([Charmant, 2015](https://joancharmant.com/blog/measuring-rolling-shutter-with-a-strobing-led/)). Calibrate each mode you record in.
- **It has an upper bound.** In continuous video the readout of one frame cannot take longer than the frame period, so `d ≤ 1 / (fps × rows)`. Oth et al. start their estimate exactly there: they "assume a zero frame-delay to initialise the line delay" as d0 = 1 / (fps · NR), with NR the number of sensor rows ([Oth et al., 2013](https://openaccess.thecvf.com/content_cvpr_2013/html/Oth_Rolling_Shutter_Camera_2013_CVPR_paper.html)). A measured line delay above that bound is wrong.

Oth et al.'s phone results show how close real cameras come to the bound (Table 3):

| Phone, mode | Measured line delay | Readout (rows × d) | Frame period at 30 fps |
|---|---|---|---|
| iPhone 3GS, 640 × 480 | 64.41 µs (σ 0.11) | 30.9 ms | 33.3 ms |
| iPhone 4S, 1920 × 1080 | 24.12 µs (σ 0.52) | 26.0 ms | 33.3 ms |
| Galaxy S3, 1920 × 1080 | 30.25 µs (σ 0.68) | 32.7 ms | 33.3 ms |

The readout column is our multiplication of the paper's line delays by the row counts.

## Method 1: read it from the camera

Check first whether the camera already reports its timing.

- **GoPro.** The GPMF metadata track carries `SROT`, "Sensor Read Out Time", logged per frame on HERO7, after which "this moves to a global value in HERO8" ([gpmf-parser](https://github.com/gopro/gpmf-parser)). Divide by the number of rows of the mode for the line delay. GoPro settings for capture are on [Action Cameras](https://egocam.ai/hardware/action-cameras/).
- **Android phones.** The Camera2 API reports `SENSOR_ROLLING_SHUTTER_SKEW` in each capture result, the "Duration between the start of exposure for the first row of the image sensor, and the start of exposure for one past the last row of the image sensor" ([Android CaptureResult reference](https://developer.android.com/reference/android/hardware/camera2/CaptureResult)). Whether a given phone fills it in accurately is worth checking with one of the methods below. Recording apps and phone settings are on [Smartphones for Capture](https://egocam.ai/hardware/smartphones-for-capture/).
- **Research glasses.** Project Aria records its sensors "on a common clock at nanosecond resolution", and Lv et al. give its full-resolution RGB camera "a readout time of approximately 16 ms" ([Lv et al., 2025](https://arxiv.org/abs/2506.04444)).

## Method 2: a short flash, measured as a stripe

Charmant's method uses one short flash per frame. An Arduino flashes an LED behind a diffuser, timed so that "exactly one flash happens for each captured frame". Only the rows that are exposing while the flash is on catch it, so the flash appears as a lit stripe. "We limit the flash duration to reduce the stripe of rows catching it, and we measure the height of the stripe in pixels."

A row catches the flash if its exposure window overlaps the flash at all, so the stripe spans the exposure time plus the flash duration:

```text
line delay = (exposure + flash duration) / stripe height in rows
```

Practical points from the write-up:

- Set the shortest exposure the camera allows: "300 µs on the Logitech C920".
- Tune the flash interval until the stripe stops moving. The camera's real frame rate is not exactly nominal: "The stripe stabilized when I settled on 33376 µs", against 33333 µs for 30 fps.
- Light the whole row evenly, with a large LED and a diffuser close to the lens, so the stripe edges are sharp.
- Repeat with several flash durations. Charmant used 500, 1000 and 2000 µs and averaged about 56.6 µs per row, which for the 800 × 600 mode gives "a 34 ms lag between the top and bottom rows" ([Charmant, 2015](https://joancharmant.com/blog/measuring-rolling-shutter-with-a-strobing-led/)).

The method needs the exposure time to be known accurately, which is not always true of cheap cameras. The write-up notes that a driver's exposure property "does not always map precisely to the firmware values".

## Method 3: a blinking LED, counted as bands

A light blinking much faster than the frame rate leaves alternating bright and dark bands; with a known frequency, counting bands gives the readout time ([Gyroflow](https://old-docs.gyroflow.xyz/tech/rollingshutter/)). The arithmetic, with a worked example, is on [Global vs Rolling Shutter](https://egocam.ai/hardware/global-vs-rolling-shutter/#worked-example-counting-led-bands).

> **Diagram:** Counting LED bands to measure a rolling shutter. Rows are read one t_row apart, so an LED blinking at a known frequency f paints alternating bands down the frame; k cycles across Δy rows gives t_row = k ÷ (f × Δy), and the readout time is t_row times the row count. The numbers are the invented worked example on Global vs Rolling Shutter. Use the shortest exposure, so the bands stay sharp.

OpenDroneMap's [rscalibration](https://github.com/OpenDroneMap/rscalibration) packages this as a kit. Its Raspberry Pi Pico version toggles the LED from a hardware timer, `timer.init(freq=1000, mode=Timer.PERIODIC, callback=blink)`, so each bright or dark band lasts 1 ms: "Each line will represent ~1ms of time", and the number of lines, dark and lit together, approximates the readout time in milliseconds. The README's example image has about 25 lines, for about 25 ms. Its camera advice: use the "fastest shutter speed setting available", and "For cameras with non-Global Mechanical Shutters please try to force Electronic Shutter mode to ensure accurate readings."

The bands only resolve if the exposure is short compared with the blink period. Fill the full height of the frame with light, or count over a measured span of rows and scale up.

## Method 4: sequenced LED strips

When several rolling-shutter cameras must be synchronised to well below a frame, one LED is not enough. Nazarenus et al. built a board for three GoPro Hero 13 Black cameras at 400 Hz ([Nazarenus et al., 2026](https://arxiv.org/abs/2511.22459)):

- An ESP32 microcontroller drives 21 output pins: five switch LED strips in sequence, sixteen drive a frame counter.
- The counter shows the frame number on 15 white LEDs "in Gray code", in which only one bit changes from one frame to the next, plus one LED "to resolve the inherent ambiguity of the Gray code".
- Where a strip switches on or off partway down the frame, the boundary row gives the time. The precision is the boundary-detection accuracy times the row time: for a row time of about 3 µs and a boundary found to within 5 px, about 15 µs.

For their setup the authors observed a row readout time of 2.85 µs. Using the board for camera-to-camera sync is covered on [Software and Visual Sync](https://egocam.ai/sync/software-and-visual-sync/#led-and-light-flash-sync).

## Method 5: from video of a moving target

No extra hardware: move the camera in front of a calibration target and let the solver find the line delay that makes the target's corners line up. [Oth et al. (2013)](https://openaccess.thecvf.com/content_cvpr_2013/html/Oth_Rolling_Shutter_Camera_2013_CVPR_paper.html) introduced the method ([paper PDF](https://openaccess.thecvf.com/content_cvpr_2013/papers/Oth_Rolling_Shutter_Camera_2013_CVPR_paper.pdf)), and Kalibr implements it as `kalibr_calibrate_rs_cameras`.

**The model.** A corner at row v of a frame with timestamp t̄ was captured at t = t̄ + v·d. The camera's trajectory is a continuous-time B-spline, so its pose can be evaluated at every corner's own time. Oth et al. use "a 4th order B-spline as it is the first form which describes a continuous, jump-less motion" and solve for the spline and d together.

**The procedure in the paper.** Intrinsics and distortion come first, from still images with an ordinary calibration: "To prevent RS distortions, the camera was kept still but not mounted to a fixed stand." The line delay is then estimated from 30–60 s videos of the camera moving in front of the pattern.

**Knots matter.** The spline's flexibility is set by its number of knots. Too few cannot follow the motion; too many fit noise, and the line delay goes with it. In their test, "the line delay estimate stabilises between 600 and 1000 knots but then begins to diverge as more knots allow the curve to over fit." The paper's fix adds knots only where needed: start with too few, and split a spline segment when its cost Jⱼ exceeds twice its number of error terms Nⱼ, which is what whitened residuals would sum to if the motion were fully explained.

**How accurate.** On a machine-vision camera whose line delay could be computed from its datasheet, they calibrated at four pixel-clock settings against the strobing-LED method of Geyer et al. (Table 1):

| Pixel clock | Nominal line delay | Target method, median (σ) | LED method, median (σ) |
|---|---|---|---|
| 12 MHz | 137.5 µs | 137.7 µs (0.56) | 136.86 µs (3.12) |
| 20 MHz | 82.5 µs | 82.55 µs (0.15) | 83.54 µs (1.23) |
| 32 MHz | 51.56 µs | 51.35 µs (0.19) | 51.48 µs (1.70) |
| 40 MHz | 41.25 µs | 41.14 µs (0.21) | 41.09 µs (0.82) |

Both agree with the nominal values; the target method repeats several times more tightly. For phones, which "typically have large exposure times", the authors suggest circle patterns, because blob detection is more robust to motion blur than chessboard corners.

**In Kalibr.** The wiki describes the tool as providing "full intrinsic calibration (projection, distortion and shutter parameters)", with the models `pinhole-radtan-rs`, `pinhole-equi-rs` and `omni-radtan-rs`, and a `--frame-rate` option for the "Approximate framerate of the camera." Its limits: "The codebase currently only supports a single camera, and cannot calibrate an IMU alongside it" ([Kalibr wiki](https://github.com/ethz-asl/kalibr/wiki/Rolling-Shutter-Camera-calibration)). The result's `line_delay` field is described on the [Kalibr file reference](https://egocam.ai/kalibr/kalibr-file-reference/#line_delay).

**Motion.** The line delay is only observable while the image moves across the rows; a still camera gives no information about it. Oth et al. note that their error model can become degenerate for fast motion along the scan direction, though "This does not occur in practice", and they leave a full study of the best motion "for future research".

## Checking the result

- **Against the bound.** `line_delay × rows` must be less than the frame period of the mode.
- **Across methods.** A file or API value and an LED or target measurement should agree. A disagreement usually means a different mode, crop or binning from the one assumed.
- **Across settings.** Where the sensor's timing is known to scale with a setting, the measured delays should follow it. Oth et al. fitted line delay against pixel timing and got a slope of 1650.02 against a nominal 1650 for their target method, and 1642.54 for the LED method (Table 2).
- **In the images.** After correction, straight vertical edges filmed during a fast pan should be straight.

## Using the calibration downstream

**Per-pixel time after undistortion.** On the raw image, a pixel's time is linear in its row. Most pipelines undistort fisheye images first, and then it is not: "After image rectifiction, the linear relationship for each pixel respect to their row number will not hold" ([Lv et al., 2025](https://arxiv.org/abs/2506.04444)). Their fix is a lookup image ℛ(u) giving, for each rectified pixel, its original row as a fraction of the image height, so that t(u) = t(0) + ℛ(u) × readout time. They rectify Aria's 2880 × 2880 RGB images to 2400 × 2400 pinhole images with a focal length of 1200 px, and store the map as an 8-bit image "with 1 represent the first row, and 255 represent the last row in original image", using 0 for pixels outside the original view. Build the map from the same undistortion you apply to the images.

**How many poses per frame.** Lv et al. choose the number of poses sampled across the readout from the scene's motion: they pick the time step "that ensures half of the reprojected pixels have fewer than 1 pixel reprojection error", which for the 16 ms readout gave "an average of eight motion samples within the readout time". Their results are on [Global vs Rolling Shutter](https://egocam.ai/hardware/global-vs-rolling-shutter/#what-an-uncorrected-rolling-shutter-does-downstream).

**Moving objects.** The lookup gives the time of a static point. A point that itself moves across the image while the rows sweep past is caught earlier or later. Nazarenus et al. linearise both the delay map and the point's image motion and get t = t(p₀) / (1 − ∇t · v), with ∇t the change of delay per pixel and v the image velocity in pixels per second. For their camera (2.85 µs per row, 400 Hz), a maximum image motion of 50 px per frame gives ∇t · v ≈ 5.5 × 10⁻², small enough to use t(p₀) directly ([Nazarenus et al., 2026](https://arxiv.org/abs/2511.22459)). The same check for an Aria-like RGB camera:

```text
row time = 16 ms / 2880 rows ≈ 5.6 µs per row
point moving 500 px/s along the readout direction:  ∇t·v = 5.6e-6 × 500  ≈ 0.003
point moving 2000 px/s:                              ∇t·v = 5.6e-6 × 2000 ≈ 0.011
```

The image speeds are assumptions for the example. Even fast image motion changes the capture time by about 1%, so the first-order correction matters less than knowing t(p₀) in the first place.

**Trackers.** Visual-inertial trackers use the line delay through per-feature pose interpolation or a middle-row approximation with a time-varying camera–IMU offset; the approaches are compared on [Global vs Rolling Shutter](https://egocam.ai/hardware/global-vs-rolling-shutter/#how-tools-model-a-rolling-shutter), and the time-offset side on [Camera–IMU Time Offset](https://egocam.ai/calibration/camera-imu-time-offset/#when-the-offset-changes-during-a-recording).

**Stabilisation off.** On-device electronic stabilisation warps each frame and breaks the fixed link between image rows and readout time; turn it off for any footage used for geometry ([Lens Effects That Break a Calibration](https://egocam.ai/lens-physics/lens-effects-that-break-calibration/)).

**What it cannot fix.** The calibration corrects the camera's own motion against a static scene. Hands move on their own, and two rolling-shutter cameras see the same moving point at different times; that is why the multi-view rigs above use global shutter ([Global vs Rolling Shutter](https://egocam.ai/hardware/global-vs-rolling-shutter/#why-multi-view-manipulation-rigs-choose-global-shutter)).

## Prompts you can give an AI

```text
I filmed one short LED flash per frame with my camera at its shortest exposure. Exposure is
0.3 ms; flashes of 0.5, 1.0 and 2.0 ms gave lit stripes of H1, H2 and H3 rows in a 1080-row
frame at 30 fps. Compute the line delay from each, their mean and spread, the readout time,
and check it against the bound line_delay <= 1 / (fps x rows). Then write the Kalibr
line_delay value in seconds per row.
```

```text
Write a Python script with OpenCV and NumPy that builds the rectified row-index map R(u) for
a fisheye rolling-shutter camera: given K and D of the raw fisheye model, the raw image size
and a target pinhole K and size, map every rectified pixel back to its raw row, store
row / height as float32 (or -1 outside the raw image), and also save it as an 8-bit image
with 1 for the first row, 255 for the last and 0 for invalid pixels.
```

```text
I want to calibrate one rolling-shutter camera with kalibr_calibrate_rs_cameras and an
Aprilgrid. Give me the command for a pinhole-equi-rs model, a recording checklist (lighting,
exposure, how to move so the line delay is observable, length), and how to sanity-check the
resulting line_delay against the frame rate and row count.
```

## Sources

- [Rolling Shutter Camera Calibration](https://openaccess.thecvf.com/content_cvpr_2013/html/Oth_Rolling_Shutter_Camera_2013_CVPR_paper.html) ([PDF](https://openaccess.thecvf.com/content_cvpr_2013/papers/Oth_Rolling_Shutter_Camera_2013_CVPR_paper.pdf)) — Oth, Furgale, Kneip and Siegwart, CVPR 2013.
- [Kalibr wiki: Rolling Shutter Camera calibration](https://github.com/ethz-asl/kalibr/wiki/Rolling-Shutter-Camera-calibration) — ETH Zurich ASL.
- [Measuring rolling shutter with a strobing LED](https://joancharmant.com/blog/measuring-rolling-shutter-with-a-strobing-led/) — Charmant, 2015.
- [Gyroflow: Rolling Shutter](https://old-docs.gyroflow.xyz/tech/rollingshutter/) — Gyroflow documentation.
- [rscalibration](https://github.com/OpenDroneMap/rscalibration) — OpenDroneMap.
- [Gaussians on Fire: High-Frequency Reconstruction of Flames](https://arxiv.org/abs/2511.22459) — Nazarenus et al., ECCV 2026.
- [Photoreal Scene Reconstruction from an Egocentric Device](https://arxiv.org/abs/2506.04444) — Lv et al., SIGGRAPH 2025.
- [Ego-1K – A Large-Scale Multiview Video Dataset for Egocentric Vision](https://arxiv.org/abs/2603.13741) — Lee et al., CVPR 2026.
- [GoPro gpmf-parser](https://github.com/gopro/gpmf-parser) — GoPro.
- [Android CaptureResult reference](https://developer.android.com/reference/android/hardware/camera2/CaptureResult) — Android Developers.
