Electronic Rolling Shutter

From ElphelWiki
Revision as of 17:27, 30 June 2010 by Polto (talk | contribs) (Hardware "margins")
Jump to: navigation, search


Most CMOS image sensors (to save one transistor per cell compared to a true "snapshot" shutter) use Electronic Rolling Shutter. Basically it implements two pointers to sensor pixels, both proceeding in the same line-scan order across the sensor,

One is erase pointer, the other one - readout. Erase pointer runs ahead discharging each photosensitive cell, then follows the readout one. Each pixel sees (and accumulates) the light for the same exposure time (from the moment erase pointer passes it till it is read out), but that happens at different time.

If you will make an image of a fast passing car with ERS with short exposure - it will all be sharp (no blurring), but the car will seem to lean backwards. The roof will be captured at earlier time than the wheels and this time difference across the frame can be as long as 1/15 of a second for the full frame of the MT9P001 5MPix sensor (it is equal to the frame readout time that is equal to 1 sec divided by the frame rate in most circumstances).

Exposure control

Exposure in ERS mode is defined by the time delay between the erase and readout pointer and is usually programmed to the sensor as a number of scan lines between the two. For obvious reasons that time can not exceed the frame period, so the maximal exposure is achieved when each pixel is erased immediately after being readout, this exposure is equal to the frame period.

Virtual frame

Sometimes when the lighting conditions are poor even the full frame exposure is not enough, for that most sensors have means to increase the frame time. Different manufacturers call it differently, it is sometimes called "virtual frame" or horizontal and vertical blanking. With the virtual frame the readout timing is as if the sensor was much bigger than in reality and instead of nonexistent pixels zero values are fed to the output. But "as if" reading nonexistent pixels in each row (horizontal blanking) and rows of pixels (vertical blanking) takes the same time as real ones, it allows to extend frame readout and increase exposure time.

But even those "imaginative" frames are not infinite - different sensors have different bit widths of the corresponding counters, you can see them overflow in the Elphel cameras (with the current software) as a horizontal border in the image separating different brightness areas if exposure is too high (depending on the resolution/size it can be about a second).

Hardware "margins"

Total frame readout time can never be as small as the pixel readout time multiplied by the total number of pixels, all sensors (what I know of) need some extra time in each line and some extra time for each frame. You may consider it as a some kind of hardware margins (as those fro printers), and usually these margins are much bigger in horizontally than vertically. Practically that means that if you make sensor capture a narrow horizontal band you can get to much higher frame rate than if you try to cut vertical column. You may find particular calculations of the frame timing in the Aptina (Micron) MT9P001 sensor datasheet, linked here.

ERS-built CMOS sensors with "global" shutter

Some CMOS sensors have "global shutter" function mentioned in the specs but it is usually far from the real snapshot ones (as in the modern CCD-based camcorders). Such mode has simultaneous erase of all pixels, but the end of exposure is still determined by the it readout, so exposure time for each pixel will be different - pixels in the bottom of the frame will be exposed longer by the exposure time. Such mode is useful with the flash lamp, when it is triggered after all the pixels are erased but before the readout starts, but usually quite useless without such lamp (or external shutter of some kind - i.e. mechanical or LCD).