Monday, December 11, 2006

Does the Number of Bits (in Digitization) Matter?

When Pentax always talk about the Analog to Digital Convertor of K10D has 1024 times more tonal levels recorded when compared against conventional/typical DSLRs, what does this actually mean? And, what're the benefits? Practically, how significant this would be and does this really useful, or not?

First of all, as I have included in the Introduction part of my Homepage the following links, these two (great, clear and useful) articles are something that must be read for anyone who are interested in the topic of digital tonality (and anything related to this topic):-

With a few of the basic concepts in mind, assuming the CCD and ADC combo is calibrated for a full (dynamic) range of 4 EVs for all the digitized tonal levels, i.e., from Zone III to Zone VII (-2EV to +2EV respectively, with 0EV at Zone V, which is the middle of the range), I summarize the relationship between the Number of Bits in Digitization and the Distribution of Recordable Tonal Levels along the Brightness Histogram, as follows (linear response curve within the ADC is also assumed):-

Now that just like what Mr. Norman Koren and Mr. Michael Reichmann have illustrated in their respective articles, it should be noted again most of the recorded/recordable tonal levels are "condensed" at the brighter side or the "right" side (of a histogram). It can be noted also when the brightness levels is doubled, the (sub-)total number of tonal levels within the brightness range is doubled and ditto when halved.

Do note that if the ADC with the CCD is to be calibrated for more Zones, then the distribution of recorded tonal levels will be even drifted more to the right side of the histogram (while the total number remains the same). Nonetheless, the assumption of -2EV to +2EV is fair and practical enough for a traditional light recording media like slide film which has more or less the same (narrow) latitude in exposure as digital imagers.

So, with reference to the figures in my above table, the total number of tonal levels is calculated by 2 to the power of (the number of bits). It can be seen that the total number of tonal levels for a 22-bit digitization device is a tremendous figure. By dividing the 4,194,304 (which is the theoretical figure for a 22-bit device) with 4,096 (which is the figure for a 12-bit device), the difference is 1024 times. This is what Pentax emphasize on and here is how it comes.

However, as explained in my last article about the ADC of the K10D, the highly oversampled bit rate (which I would say it is overkilled) will be downsampled to 12-bit *shortly* after the digital data are passing out of the DBE (Digital Back End) of the ADC. This number of bit is what a RAW file of the K10D can give. And again, as what Pentax have also told, at the same time, but not explicitly, it is only 1/1024th of the original data of the 22-bit ADC! (just because the K10D RAW files are *also* in 12-bit, as against 22-bit).

The good thing here (about the K10D) is that a linear curve is not mandatory for the ADC of the K10D (again, see my last article, remember the "knee" points function?) so oversampling can provide more data for adjustment and correction. For the bad thing(s), I shall talk in the following paragraphs.

So, how important is this "number of bits" figure on the image quality and the tonal response (smoothness in transition, etc.)? It is very trivial that the more levels it records, the smoother the tonal quality and response it would be. However, it is the main weakness of *any* digital camera that the number of tonal levels at the shadow areas are much less than those counted at the brighter parts, i.e. the highlights, owing to the primitive nature of CCD/CMOS imager, which is a linear square law detector.

As such, assuming *perfectly* ideal exposure which means that an evenly spread histogram is obtained, *at* the time of picture taking, then most of the tonal levels are recorded as *useful image data*. In contrast, if underexposure happened or just that the highlights part of the picture are out of interest by the photographer, then the limited number of tonal levels at the shadow, say, only 273 nos. for a 12-bit RAW, at the darkest quarter of 0-63, then this limited number of tonal level steps, as recorded in the RAW file, will be "stretched" to re-build the whole picture, resulting in visible noise and lack of smoothness of tone transition.

So, in short, the number of bits from the DBE (actually it is also what the RAW file could contain) is very crucial for what later on the user can tweak a picture or how the IPU (Image Processing Unit) of the DSLR can process the image, for a better looking one.

Well, at this point, what I must emphasize (again, as always) is that an accurate metering and exposure system of the DSLR is of prime importance than anything else, given that the number of bits of the RAW file is the identical. In contrast, if the RAW file has more bits, then this will open up significant more room for post processing of the RAW, just see the 14-bit example of the Fuji S3 Pro in the above summary table. It has four times more tonal levels even at the darkest quad of the histogram.

Nonetheless, for a properly exposed digital image which requires little adjustment of the levels, the number of bits will then become insignificant. The fact is that most output format and devices have only 8-bit per channel (24 bits for all colors), these include JPEG files (which Fuji Frontier Laser Photo Printing Machines accept as standard format for printing) as well as the latest PC DVI interface (which is 24-bit only for its TMDS transmission protocol):-

In fact, most cheaper LCD panels/monitors are of 6-bit per pixel only and by dithering tricks of four pixels to form one, they can yield a maximum of 16.2M colors in the published specifications (instead of 16.77 million colors for true 8-bit panels). My current LCD monitor used at my home is an EIZO / FlexScan S1961 which has a true 8-bit per pixel panel and an internal 10-bit signal processor which is already very good in tonal and color reproduction.

Indeed, I always find that EIZO products are designed and built *very* accurately, for my experience with their various models over years. To compare, previously I also bought a Samsung 770P top-of-the-line (also) true 8-bit LCD monitor but which IMHO by no means can match with the EIZO, in terms of color and tonal accuracy, despite the published specs are quite similar. This story strongly reminds me again that sometimes specifications don't tell much but only the actual performance as well as the level of accuracy of a product are the true important things that really count.

So, in the end, you need a high bit *output* device to output your high bit pictures, if any. Actually, DVI cannot give more than 8-bit (the transmitted data are in 10-bit, but the remaining two bits is for the transmission protocol, but not contain any picture data). HDMI can have more bits in 12 numbers, but currently very few PC display cards as well as monitors support this. Of course, one would argue that why not use CRT displays which has more colors? My humble opinion is simply that to set up an accurate analog color output system is not for non-professionals nor most home users! Even more, to maintain and calibrate such a carefully set up system is again not an trivial job!

Last but not least, if you still have some unresolved puzzles about the basic concept(s) in your mind after reading all these here and even after reading the above two provided (important) articles written by Norman Koren and Michael Reichmann, you may wish to read also my article, "How Lights are Mapped into Levels" (contained also in the "Links" section of this Blog), which I hope I have written in an "easier" way.


Anonymous said...

This is perhaps the 6th time I've seen this post in my RSS feed. Are you reposting it over and over?

RiceHigh said...

I have updated my article for several times for adding new information as well as for making some corrections, for the grammatical mistakes and for a few minor errors on the technical contents.

Sorry for the inconvenience caused but this would be unavoidable when the RSS feed function is activated, which is mostly useful but in similar cases as above, it may cause some annoyance instead :-)

Anonymous said...

Some comments:

"oversampling" is a time domain characteristic. Merely having a large number of bits in converting from analog (CCD) to digital doesn't imply any oversampling.

A good engineering reason I would see for using a 22b ADC, even if it is greater than the CCD DR (at a particular "ISO" setting), would be to allow the front end amplifier gain to be fixed, enabling easier control, manufacture etc. I.e. the analog front end amplifier is always set to maximum gain (corresponding to the highest "ISO" setting} and bit shifting is done in the processing unit to select which 12b window to output to the RAW file.

RiceHigh said...

Thank you for your interesting reply.

> "oversampling" is a time domain characteristic. Merely having a large number of bits in converting from analog (CCD) to digital doesn't imply any oversampling.

Yes, I agree with you for the general interpretation of the term. Sampling is simply a time domain thing. Actually, I simply cloned the word "oversampling" from NuCore's technical catalogue which I think NuCore specially mean for the sampling density for the signal amplitude, instead of the density in time.

> A good engineering reason I would see for using a 22b ADC, even if it is greater than the CCD DR (at a particular "ISO" setting),

But practically, the lower bits will be full of signal noise which is limited by the photon noise which is somehow quite closely related to the pixel pitch size. For more read, see:-

> would be to allow the front end amplifier gain to be fixed, enabling easier control, manufacture etc. I.e. the analog front end amplifier is always set to maximum gain (corresponding to the highest "ISO" setting} and bit shifting is done in the processing unit to select which 12b window to output to the RAW file.

This would be really interesting. However, I just wonder if the moving window for capturing the *real* picture data could be easily determined or not, e.g. there are (a lot of) noise at lower bits. Moreover, I guess the gain of the AFE should be fixed and calibrated for most cases such that the ADC could know how the analog input signal level should be converted into the corresponding Data Number (DN, for representing the digital Levels), e.g. under a particular calibration, a certain largest possible input analog signal should be corresponding to the highest DN after digitization. Again, this (chosen) "full" signal, which is the basis of the calibration, is closely related to the DR spec of the CCD and will also be limited by the electicial noise of the amplifying circuitry. Similarly, for the lowest analog signal which is corresponding to the lowest DN, i.e. 0, I think it should be the CCD dark current/voltage signal.

In short, under my this supposition, the full DN level range will be corresponding to the full DR range for the CCD/Amp/ADC combo.

P.S. This is a very complicated issue which involves many techicial knowledge with uncertainty of different design approaches, afterall. If there are any true CCD/CMOS experts read here (I'm surely not an electronic(s) engineer specialised in this field), please kindly let us have some of your expert views and inputs here! I think many of us here will be much glad to learn more about all these and I will be much grateful for all your replies, too!

Post a Comment

Related Posts

Creative Commons License
RiceHigh's Pentax Blog by RiceHigh is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.