This repository documents practical methods to estimate rolling shutter readout times.
Software such as 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)
.
Most of these items can be found on eBay, or electronics retailers like Sparkfun.
- 1x Arduino-compatible board
- 1x 80Ω (or less) resistor
- 1x LED
- 1x breadboard (not strictly required, but makes wiring easier)
- 2x 22AWG jump wires (not strictly required, but makes wiring easier)
You can upload the following code to the Arduino board and change the ledPin
variable if needed. Choose a digital output pin:
Warning
For cameras with non-Global Mechanical Shutters please try to force Electronic Shutter mode to ensure accurate readings.
- Turn on the Arduino device
- Place the camera on a stable surface close to the LED
- Take a picture of the LED using the fastest shutter speed setting available
- 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
:
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)
You can upload the following MicroPython code to the RP2040-compatible board using Thonny:
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)
- Plug in your RP2040-compatible board while holding the Bootsel button. It will show up as a removable-storage drive
- Set Thonny to use the MicroPython Interpreter under Options -> Interpreter
- Upload the latest MicroPython firmware to the RP2040-compatible board
- After the board reboots, open main.py with Thonny and save it to the RP2040-compatible board as main.py
- Same data collection procedure as above
You can use the form at https://opendronemap.github.io/RSCalibration/ to contribute to ODM's database of rolling shutter readout times.