SkillAgentSearch skills...

RollingShutter

Compilation of rolling shutter camera sensor readout speed measurements for various cameras, plus the technique and tools used to generate it

Install / Use

/learn @horshack-dpreview/RollingShutter
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Rolling Shutter

Compilation of rolling shutter camera sensor readout speed measurements for various cameras, plus the technique and tools used to generate it

View Measurements

All sensor readout measurements can be viewed here.

How Rolling Shutters work

Most modern cameras employ image sensors with a "rolling shutter". Unlike global shutters, which capture and read light in all pixels simultaneously, a rolling shutter staggers the capture of light across the vertical rows of the sensor. It does this because the readout electronics on the sensor aren't fast enough to read the pixel values for all rows at the same time. Pixel values are read off the sensor one row at a time, or sets of rows at a time on faster implementations.

While the sensor is busy reading pixel values from a given set of rows, the other rows that haven't been read yet are still accumulating light from the ongoing exposure. This can cause uneven exposures because rows in the middle and bottom of the sensor are allowed to receive more light before their pixel values are read vs rows near the top of the sensor which are read first. To avoid this scenario, the camera employs a rolling exposure (ie, "rolling shutter"), where it staggers the initial reset of the pixel rows at the start of an exposure, so that rows in the middle and bottom of the sensor are reset later (ie, have their exposure started later in time) than rows near the top of the sensor. The exact timing of this staggered reset is equal to the amount of time it takes to read a sensor row - that way each row is guaranteed to be exposed for the precise amount of time specified in the shutter speed you set for a given exposure.

For example, let's take a 24MP sensor with 6000 x 4000 pixels that has a full-sensor readout time of 50 milliseconds (1/20 of a second). That means it takes 50ms to complete reading all 4000 rows on the sensor. That translates to 12.5us (microseconds) per row, calculated as 50,000us / 4000. This means the first row on the sensor will be read approximately 50ms earlier than the last row. To avoid an uneven exposure where the last row receives 50ms (1/20) more light than than the first row, the camera will begin the exposure by staggering the reset of each row by exactly 12.5us, so that:

  • Row #1's pixel values are reset first
  • Row #2's pixel values are reset, 12.5us after row #1's reset
  • Row #3's pixel values are reset, 12.5us after row #2's reset (and 25.0us after row #1)
  • Row #4's pixel values are reset, 12.5us after row #3's reset (and 37.5us after row #1)
  • Row #4000's pixel values are reset, 12.5us after row #3999's reset (and 49,987.5us after row #1)

After these row resets have completed, the camera will then allow the sensor to remain exposed to light for whatever duration is specified by the shutter speed. After that duration is reached, the camera will begin the process of reading out the pixel values, one row at a time (or set of rows at a time). Let's say the shutter speed configured for the exposure is 1/20, equal to the full-sensor readout time of this theoretical sensor - this means the camera will read the pixel values from the first sensor row just as the last sensor row is completing its reset. Here's what that would look like:

  • Row #1's pixel values are read, taking 12.5us to complete
  • Row #2's pixel values are read, taking 12.5us to complete (cumulative reading time 25.0us)
  • Row #3's pixel values are read, taking 12.5us to complete (cumulative reading time 37.5us)
  • Row #4's pixel values are read, taking 12.5us to complete (cumulative reading time 50.0us)
  • Row #4000 pixel values are read, taking 12.5us to complete (cumulative reading time 50,000us)

What about exposures that take longer than 1/20, ie longer than the full-sensor readout time? In those scenarios the camera simply waits longer before it starts reading the rows after completing the row resets.

What about exposures that are shorter (faster) than the full-sensor readout time, ie > 1/20? In those scenarios the camera actually starts reading rows before it has completed resetting all rows, so that the camera is reading earlier rows at the same time it's still rolling through the progressive reset of later rows. For example, here's what 1/40 (25ms) exposure would look like:

  • Row #1's pixel values are reset first
  • Row #2's pixel values are reset, 12.5us after row #1's reset
  • Row #2000 pixel values are reset, 25ms after row #1's reset
  • Row #1's pixel values are read, since it has reached its 1/40 (25ms) exposure time
  • Row #2001 pixel values are reset, 25ms+12.5us after row #1's reset
  • Row #2's pixel values are read, since it has reached its 1/40 (25ms) exposure time
  • ...
  • Row #2000's pixel values are read, just as row #4000's pixel values are being reset
  • Row #2001's pixel values are read
  • Row #2002's pixel values are read
  • ...
  • Row #4000's pixel values are read, 50ms after the "start" of the exposure on row #1

The faster the shutter speed, the shorter the interval between the reset of a row and the read of that row. The only limit to the shutter speed is the time it takes to reset and read a given row. CMOS sensors can generally reset a row very quickly, effectively instantaneously - so it's the readout rate/per row that determines the maximum shutter speed. At 12.5us/row, this theoretical sensor could support a shutter speed approaching 1/80,000, or 1,000,000us / 12.5us.

The scenario of concurrently resetting and reading different rows at the same time creates a sliding virtual exposure "slit" or window across the sensor containing a select number of rows being exposed at any moment in time. Mechanical shutters work in the same manner but their slit created by the mechanical boundary between the 1st and 2nd physical curtains. For electronic shutters the reset of sensor rows is comparable to the 1st mechanical curtain starting closed then opening, with the read of the sensor rows comparable to the 2nd mechanical curtain closing.

As you can see, the interval between the reset of each row is always the same irrespective of the shutter speed and is fixed to the sensor readout time/per-row. The interval between reads of each row is also fixed and is also a function of the sensor readout time/per-row. Only the interval between when the rows are reset and later read is altered to achieve the full range of supported supported speeds.

Rolling Shutter Issues

There is one major side effect of how rolling shutters work: while every row is exposed for the same amounts of time, they are not exposed for the same moments in time. On a sensor with a 50ms (1/20) readout rate, the last row is capturing a moment of time that's 50ms later than the first row, and that's true regardless of the shutter speed, even fast speeds like 1/8000. The shutter speed only guarantees the exposure time for each row - it makes no guarantee about the temporal relationship of exposures between rows. For many situations this isn't an issue because the scene you're capturing is mostly static, meaning it's either not moving or it's moving slowly relative to the framing/magnification, so the fact that elements in the scene might be in different positions 50ms apart in time is not noticeable in the resulting photograph.

But what about situations where a subject in the scene is moving quickly esp horizontally across the frame? Or situations where the camera is being panned during the exposure? In these scenarios the subject will be in a significantly different position in the frame at the end of the exposure vs the start, even after a short 50ms period of time. This will cause a skewing of the subject, where part of the subject is captured at one horizontal position in the frame for some rows and at a different horizontal position in the frame for rows read 50ms later. For vertically-oriented subjects like walls and light poles this will manifest as skewing, with the subject seeming to be leaning diagonally rather than standing straight up. For rotating subjects like propellers, ceiling fans, and golf clubs, this will manifest as warping of the moving elements. These effects are collectively referred to as rolling-shutter distortion.

Another situation where the time-shifted nature of rolling shutters can create noticeable image artifacts are photographs under artificial light. Although not visible to the human eye, most artificial light sources are constantly cycling between on and off illumination states, either as a consequence of the nature of alternating current that powers them or because of the circuit design within the light's electronics. Because rolling shutters capture different moments in time vertically across rows of the sensor, they can capture different states of these light cycles across those rows. This means the light source will be captured near its peak intensity on some sensor rows and at its lowest intensity (off) on other sensor rows. This manifests are light bands vertically across the frame:

<p align="center"> <img src="docs/img/Rolling_vs_Global_Shutter_Cycling_LED.png" /> </p>

The number of visible bands is a function of the cycling frequency of the light vs the full-sensor readout rate. The faster the light cycles and/or the slower the sensor readout, the greater the number of bands that will be visible in the full image. For example, a sensor with a full readout rate of 50ms (1/20) shooting a light source switching states 120 times/second (b

View on GitHub
GitHub Stars91
CategoryDevelopment
Updated4d ago
Forks3

Languages

C++

Security Score

95/100

Audited on Mar 31, 2026

No findings