Thursday, November 19, 2009

Let's talk about A/Ds and ISO

An A/D is, if you don't remember, an Analog to Digital converter. The part of your camera that turns your pixel signal into bits and bytes.

In a typical camera you have:

1: A sensor--for this post, one with 10.000.000 pixels (10MP) that collect the photoelectrons light knocks out of the silicon that the sensor is made from.

2--the sensor readout electronics--depending on the number of photoelectrons held in the pixel this produces a voltage that ranges from a few hundred micro volts (no light, just noise, black--black) to 1 volts (full to the top with photoelectrons, about to saturate and bloom, white-white)

3--the sensor post amplifier--this turns on when you change your ISO gain. At the lowest ISO (50, 100, or 200 depending on what ISO number the marketing folks decide will sell the most cameras this year) there is 1 to 1 amplification. This is the true and only ISO value. With film ISO differences are real. With digital it's just jack up the volume-- in steps. 1to1 at ISO 100 up to 16:1 at ISO 1600.

4--the A/D--without getting into the fine points of digital arithmetic a typical 12 bit A/D takes your post amplifier voltage and give it a number that ranges from 0 to 4195. This number take up (surprise, surprise) 12 bit on your memory cards. Which isn't much until you remember you have to store 10,000,000 of these byte and a half for each uncompressed RAW in your memory card

Over the relatively few years (7) since I first bought my first digital camera. I've handled or owned cameras where the A/D s have gone from 8 to 14 bits (x64), the megapixels from about 250,000 (cheap web cams) to 18,000,000 (my friend's 300D) (X72) and memory cards from 16,000,000 bytes (came with the first camera) to 8,000,000,000 (X500)

These improvements are not random--without all of them taken together we would be looking at serious problems in digiphoto land.

5--And finally all the digital stuff--hardware, firmware and software-- ultimately turns those A/D numbers into bright or dark pixels on your computer monitor or wide screen TV

First little secret you won't find in your camera manual. Every digital sensor ever made has a RAW mode. If they didn't camera engineers wouldn't be able to even start designing a camera. Whether or not you find RAW mode in the camera menu is another matter.

My first camera, an Olympus 3020 ($600), didn't have it in the menu. At first I didn't care since I didn't know RAW modes existed. Then I began reverse engineering my 3020, got weird blue sky noise numbers that were too low and went on to the forums to ask the experts what I was doing wrong. The experts had a stack of reasons why my noise readings could be too high, but no one had a convincing argument why they was so low. Except that I wasn't using my nonexistent RAW mode. something they claimed gave accurate noise numbers.

Since buying a new and expensive camera with RAW mode to settle an Internet argument wasn't in the budget. So I worked out a method of correcting my jpeg numbers. That procedure brought my measured dark shadow noise numbers much closer to theory but didn't do anything to explain my too-good-to-be-true blue sky noise numbers.

My reverse engineering project would have ended on that mystery if six month later I had run across a posting about a Russian hacker who'd worked out the procedure and written the DOS program need to unlock RAW on the 3020. With baited breath and some expectation, I redid my test images only to get numbers that closely matched my corrected jpeg numbers.

Using RAW was not the magic solution although it was satisfying to see jpeg fudge factors were correct. Would still be a mystery if I hadn't discovered the 3020 sensor spec sheet which explained all. Be worth another blog posting once I find the hard disk for the computer I was using then and rig it up so I can take off my copy of the data sheet. A Japanese version might be still around but the English version disappeared from the sensor manufacturer's (Sony) website years ago.

Back to this posting. Since my 12 bit A/D has 4000 levels (4196 to be exact but lets keep the math easy). If I take a perfectly exposed shot where the pixels of the brightest highlights has 64000 photoelectrons in them--the capacity of our imaginary camera--my voltage at the A/D is 1 volt and my output is 4000 levels. To fit everything in I must assign 16 photoelectrons to each level.

If I didn't have a sensor post amp, and if I upped the stutter speed to underexposed a stop (how the sensor sees ISO 200) I would end up with 1/2 volts and be using only 2000 of the 4000 A/D levels. And so on until at ISO 1600 I have 1/16 of a volt and 256 levels.

At first glance this may look may look OK. Monitors have 256 levels so each display level gets its own photoelectron- a good fit.

Don't work out that way. Everything starting with the demosaicing firmware in the camera that calculates the red, green and blue channel for the colors on out to the noise reduction routine in the RAW converter needs far more levels to make their digital calculations accurately. Remembers beyond the A/D your signal is only bits and bytes and everything now is accurate calculation.

How much more accurate? When I want to end up with a truly polished image I work with 16 bit arithmetic when I do the RAW conversions.

So that is what ISO does. It fills more levels in the A/D so the rest of the system, in camera and out of camera, has the data needed to do its calculation. No less. And no more.

No comments:

Post a Comment