https://github.com/opendronemap/rscalibration
Docs and scripts to estimate a camera's rolling shutter readout time
https://github.com/opendronemap/rscalibration
estimation readout rolling shutter
Last synced: 11 months ago
JSON representation
Docs and scripts to estimate a camera's rolling shutter readout time
- Host: GitHub
- URL: https://github.com/opendronemap/rscalibration
- Owner: OpenDroneMap
- License: agpl-3.0
- Created: 2022-05-24T14:43:51.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-05T16:28:22.000Z (over 3 years ago)
- Last Synced: 2025-06-21T21:34:31.735Z (12 months ago)
- Topics: estimation, readout, rolling, shutter
- Language: HTML
- Homepage: https://opendronemap.github.io/RSCalibration/
- Size: 53.7 KB
- Stars: 8
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RSCalibration
This repository documents practical methods to estimate [rolling shutter](https://en.wikipedia.org/wiki/Rolling_shutter) readout times.
Software such as [ODM](https://github.com/OpenDroneMap/ODM) can compensate for the rolling shutter effect when a set of photos is captured in motion, but knowledge of the sensor readout time is necessary to perform this correction.
We present below an inexpensive method to build a reader device using an Arduino:


The idea is to blink an LED at ~2khz, capture a photo using a fast shutter speed and count the number of lines in the result. Each line will represent ~1ms of time, thus the total readout time will be close to: `number of lines ~= readout time (ms)`.
## Required hardware
Most of these items can be found on eBay, or electronics retailers like Sparkfun.
- [x] 1x Arduino-compatible board
- [x] 1x 80Ω (or less) resistor
- [x] 1x LED
- [x] 1x breadboard (not strictly required, but makes wiring easier)
- [x] 2x 22AWG jump wires (not strictly required, but makes wiring easier)
## Schematics

## Code
You can upload the following code to the Arduino board and change the `ledPin` variable if needed. Choose a digital output pin:
- [blink.ino](https://github.com/OpenDroneMap/RSCalibration/blob/main/blink.ino)
## Procedure
> **Warning**
> For cameras with non-Global Mechanical Shutters please try to force Electronic Shutter mode to ensure accurate readings.
1. Turn on the Arduino device
2. Place the camera on a stable surface close to the LED
3. Take a picture of the LED using the **fastest shutter speed setting available**
4. Examine the picture and count the total number of lines (both dark and colored lines). For example, the picture below has ~25 lines and the estimated readout time is thus `25ms`:

## No-Tinker Solution
### Required Hardware
- [x] Raspberry Pi Pico (RP2040)-compatible board

### Schematics
You will only need to connect your RP2040 board to your computer for programming using whatever cable/interface your board has (microUSB, Type-C, etc)
### Code
You can upload the following MicroPython code to the RP2040-compatible board using Thonny:
- [main.py](https://github.com/OpenDroneMap/RSCalibration/blob/main/main.py)
```python
from machine import Pin, Timer
led = Pin(25, Pin.OUT)
timer = Timer()
def blink(timer):
led.toggle()
timer.init(freq=1000, mode=Timer.PERIODIC, callback=blink)
```

1. Plug in your RP2040-compatible board while holding the Bootsel button. It will show up as a removable-storage drive
2. Set Thonny to use the MicroPython Interpreter under Options -> Interpreter
3. Upload the latest MicroPython firmware to the RP2040-compatible board
4. After the board reboots, open main.py with Thonny and save it to the RP2040-compatible board as main.py
### Procedure
1. Same data collection procedure as above
## Contribute to ODM
You can use the form at https://opendronemap.github.io/RSCalibration/ to contribute to [ODM's database of rolling shutter readout times](https://github.com/OpenDroneMap/ODM/blob/master/opendm/rollingshutter.py).