Skip to content

OpenDroneMap/RSCalibration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RSCalibration

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:

image

image

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.

  • 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)

Schematics

image

Code

You can upload the following code to the Arduino board and change the ledPin variable if needed. Choose a digital output pin:

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:

image

No-Tinker Solution

Required Hardware

  • Raspberry Pi Pico (RP2040)-compatible board image

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:

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)

image

  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.