A Site for Photographers by Photographers

Home > Learn About Photography > Dynamic Range

Featured Equipment Deals

Portrait Photography - Part I (Video Tutorial) Read More

Portrait Photography - Part I (Video Tutorial)

Learn the basics of Portrait Photography, specifically the ideal equipment, composition considerations, and location settings for this type of photography.

Latest Equipment Articles

Triggertrap Mobile Review Read More

Triggertrap Mobile Review

Triggertrap is a great alternative to a camera remote that will turn your smartphone into a sophisticated shutter release. Read more about its many triggering modes!

Latest Learning Articles

Portrait Photography: Fixes and Tips in Lightroom (Video Tutorial) Read More

Portrait Photography: Fixes and Tips in Lightroom (Video Tutorial)

This video tutorial teaches you how to use the tools in Lightroom to enhance a portrait while also ensuring your subject still looks natural.


Dynamic Range

(or Lies, Damned lies, Statistics and Scanner Specs - with apologies to Benjamin Disreali) by Bob Atkins, 2003


One of the most discussed, most important but least understood parameters which describe the performance of a scanner "dynamic range". If you read the manufacturer's spec sheets you'll see numbers like "a dynamic range of 3.6" or "a dynamic range of 4.8". So what exactly does "dynamic range" mean, and why is it important?


A Definition

A workable definition of dynamic range is the ratio of the highest (lightest) signal which a scanner can record to the lowest (darkest) signal. The lightest signal would correspond to the brightest highlights in an image, the darkest signal to the deepest shadows. The units used for this measurement are density units (D) and the scale is logarithmic. The formula is:

D = log (Io/I)

where Io is the intensity of the light falling on the slide (or negative) and
          I is the intensity of the light transmitted by the slide (or negative).

So let's say light of 1000 "intensity units" is used to illuminate the slide, and let's say in the highlights 95% of the light is transmitted (950 units), while in the shadows only 5% of the light is transmitted (50 units).

% of light transmitted Density (D)
50 0.3
25 0.6
10 1
1 2
0.1 3
0.01 4

The density of the highlights would be log(1000/950) = 0.02D and the density of the shadows would be log(1000/50) = 1.3. The Dmax (maximum value of D) for this slide would be 1.3 and the Dmin (minimum value of D) would be 0.02

The ratio of logarithmic values is the difference between them (Dmax-Dmin), so the dynamic range of this slide would be (1.3)-(0.02) = 1.28. You can also just take the log of the ratio if you don't need (or know) the D values of the signals, so the dynamic range is log (950/50) = 1.28.


Analog and Digital

Though we think of film scanners as digital devices, that only really applies to their output. The actual sensor is an analog device. It sends out a voltage or a current which is proportional to the intensity of the light that falls on it. This analog signal is converted into a digital signal by an analog to digital converter, also known as an A/D converter.

Digital Basics

Digital signals are made up of "1"s and "0"s. If you have 1 digit - or 1 "bit", it can have a value of 0 or 1 and that's all. Two values, not much of a range! If you have 2 digits - or 2 "bits" you can have values of 00, 01, 10 or 11 so now you have 4 values instead of two. With 3 bits you can have 000, 001, 010, 011, 100, 101,110 or 111 that's 8 values. Obviously we can go on increasing the number of bits and so expanding the range of values a digital number can represent.

With 8 bits there are 256 possible values corresponding to decimal numbers from 0 to 255. So with an 8 bit A/D converter you can take a range of analog numbers and convert them into a digital number with a range from 0-255. Now let's ask the question "what's the dynamic range of an 8 bit A/D converter?".

Well, it's the ratio of the smallest signal it can record to the largest signal. The smallest signal is "1" and the largest signal is "255", so the dynamic range is log(255/1) = 2.4.

Black and white images just need one signal channel (one A/D) but color images use three channels (red, green and blue), so they use 3x the number of bits that a B&W image does. However the dynamic range of a color signal is that of each channel, so when you read about "24-bit" color, it's really 3 "8-bit" channels not one "24-bit" channel and the dynamic range is determined by those 8 bits.

Here's a table which shows the maximum theoretical dynamic range an "n-bit" signal can have, where "n" is 8, 10, 12, 14 or 16 (the most common values found in scanners).

Number of Bits (color) Maximum dynamic range
8 (24) 2.4
10 (30) 3.0
12 (36) 3.6
14 (42) 4.2
16 (48) 4.8

Something that's very important to note here is this is the maximum theoretical dynamic range the A/D converters can output, assuming perfect operation and no noise. If you feed them an analog signal with a dynamic range of 2.0, each of them will output a digital signal with a dynamic range of 2.0, no matter how many bits are involved. If you feed an 8-bit A/D with a signal which has a dynamic range of 3.2, all you get out is a signal with a dynamic range of 2.4, since that's the best an 8-bit A/D can do. However if you feed 16-bit A/D with a signal which has a dynamic range of 3.2 all you get out is a digital signal with a dynamic range of 3.2, not the 4.8 which the A/D is theoretically capable of.


Scanners

The dynamic range of a scanner is simply the ratio of the brightest signal it can record to the darkest signal it can detect. Recording bright signals isn't much of a trick. It's fairly easy to set things up so that with no slide in the scanner it generates a signal just below the maximum possible output signal. For an 8-bit system that would typically be around 250 (remember 8 bit signals can have values from 0 to 255). Recording weak dark signals is more difficult. All sensors generate noise, so if you increase the gain of an amplifier attached to the sensor so as to try to read very low signals, you amplify both noise and signal. Thus there is an intrinsic minimum  signal level that the sensor can measure and that's related to how much noise it generates.

The type of detector which generates the least noise (and which can therefore detect the weakest signals) is called a photomultiplier tube or "PMT". PMTs are actually vacuum tubes and operate with voltages around 1000-1500v. The lowest noise PMTs are actively cooled below room temperature to further reduce noise. PMTs are used in scanners, but only in large, expensive, commercial drum scanners. Such scanners may weigh 150lbs and cost $50,000.

Desktop scanners typically use solid state detectors (CCD or CMOS) which are uncooled. They generate significantly more noise than PMTs and so they cannot detect the weak signals which PMTs can. Weak signals come from the most optically dense parts of the scanned image (i.e. the deepest shadows) and so desktop CCD scanners don't "see" as much deep shadow detail as PMT based drum scanners.  Another way to say this is that PMT drum scanners have a higher dynamic range than desktop CCD scanners - see, we're back to dynamic range at last!

The higher the dynamic range, the more information you can get from the darkest areas of the slide, so high dynamic range is a good and desirable property of a scanner. Below is a graphic example of what I'm talking about

dmax3.jpg (37244 bytes)

The upper image represents a scale running from white to black. The lower two images represent what you might get if you scanned the upper image with two scanners, one with high dynamic range and high Dmax, the other with lower dynamic range and Dmax. Neither fully record all the detail in the original image, but the scanner with the higher Dmax and dynamic range records more. The effects here are exaggerated for clarity


What Dmax do you need?

Well. most properly exposed, properly developed negatives of typical subjects don't have a Dmax higher than about 1.5 and even overexposed negatives rarely go higher than about 2.0, so a dynamic range of 2.0 would probably take care of just about any negative you are likely to come across. This should be well within the capabilities of most film scanners.

The same applies to scanning prints (though you'll need a flatbed scanner, not a film scanner to do this). The Dmax of the blackest ink or photographic print is probably somewhere around 2.0, so again this shouldn't tax the capabilities of any decent scanner.

However slide film is a different story. Dmax of typical slide films can reach maybe 3.5 and Velvia is said to be able to hit 4.0 in the deepest blacks. This would tax even the best scanners.


Scanner Specs

Besides resolution, one of the parameters specified by scanner manufacturers is dynamic range, since it's a pretty important facor in determining final image quality for scanned slides. For example this is from the specs on the Minolta Dimage Scan Dual III Film Scanner:

  • "With 16-bit A/D conversion and a 4.8 dynamic range, the DiMAGE Scan Dual III will reproduce the rich variations in tone and color of the original film image. 16-bit A/D conversion is able to distinguish 65,536 tonal gradations for each color channel. The ability to capture the depth and subtly of the original film image is breathtaking. The scanner's dynamic range is 4.8"
    What does that mean? Does it really have a dynamic range of 4.8? Well, no it doesn't. It has a 16-bit A/D, which means that theoretically the A/D could have a dynamic range as high as 4.8, but as I said earlier, if you feed such a D/A with a signal that has a lower dynamic range, all you get out of the D/A is that lower dynamic range. Since the dynamic range of solid state detectors is limited to something like 3.4-3.6, that's all you get. The better the sensor and the better the electronics, the better the dynamic range, so it could be anywhere from 2.8 to 3.6. You just don't know because the manufacturers don't publish measured numbers, just "theoretical maximum" numbers based on a perfect noise free sensor and perfect D/A converter - which of course don't exist!
  • Nikon Coolscan IV ED has a 12 bit conversion (36 bit color) and claims a dynamic range of 3.6.For the Nikon Super Coolscan8000ED the specs are 14 bit conversion and a dynamic range of 4.2. Does all this sound familiar (see the table above)
  • Canon spec their Canoscan FS4000US with a dynamic range of 4.2 and....you guessed it, it has a 14 bit (42 bit color) A/D converter.

Anyone else start seeing a bit of a pattern here?

The best PMT based drum scanners have a measured dynamic range of around 4.0. That's about the limit. It's enough since few slides or negatives will come close to a density of 4.0D so there's no real incentive to go for a larger dynamic range. The best desktop solid state sensor scanners might possibly have a dynamic range as high as 3.6, though I may be being a bit optimistic here. You'd want a 14 bit A/D to properly handle this since it's right on the limit of 12 bits and a little headroom never hurts! 16 bits would be fine too, but probably not really needed.

So the final conclusion is to ignore manufacturers claims on dynamic range. They are just plain silly. Nothing more than marketing hype. That doesn't mean there aren't good, better and best scanners when it comes to dynamic range, just that you can't tell anything from reading the spec sheets with regard to dynamic range or bit conversion depth. 16-bit isn't necessarily any better than 14 bit. I'd much rather have a 12 bit scanner with an excellent low noise sensor than a 16 bit scanner with an average "off the shelf" sensor with significant noise. You do need at least 12 bits though, since with  less than that the A/D could be limiting rather than the sensor.

Given marketing tricks, I wouldn't be totally amazed to see scanners with 18-bit (56 bit color) converters next year claiming a dynamic range of 5.6, if there was any way of actually getting the info into an image (48 bits is the limit for a tiff file) -   though even that may not stop them!


All material (C) Copyright 2003 Robert M. Atkins   All Rights Reserved

 

 

Article created 2003

Readers' Comments


Add a comment



Bob Atkins , March 18, 2003; 11:12 A.M.

S/R is indeed an important factor. Poor S/N not only results in a noisy image in the dark areas you can resolve, but it's the cause of reduced dynamic range. For example if you have a system with a 14-bit A/D (theoretical DR=4.2), but the bottom 4 bits are simply swamped by noise from the sensor and electronics, you effectively have only a 10-bit system and a theoretical maximum DR of 3.0.

Darron Spohn , March 18, 2003; 03:47 P.M.

Excellent article Bob. I've had a seat-of-the-pants knowledge of this issue for several years, and it is good to see someone with the engineering background explain this.

One additional point, though. The most important specification in any scanner is the signal to noise ratio. Unfortunately, as with dynamic range, there is no standard method for measuring S/N, and none of the desktop scanner manufacturers publishes S/N specs. If they did, they'd probably be just as imaginary as dynamic range specs.

The best way to test a scanner is to get one of your favorite slides drum scanned, then go to a store that sells scanners and compare the desktop scanner with your reference drum scan. None of the desktop scanners will be as good, but you'll have a baseline for comparing them and can then decide how much quality you can afford.

Craig Cooper , March 20, 2003; 10:08 A.M.

Firstly, congradulations Bob on pulling together such a concise tutorial on an often miss understood topic.

Although really a separate issue but very inter-twined with this topic is the actual importance of the bit-depth itself. DR will always be limited by the A/D bit depth, however, once the end-points are established, regardless of how short they fall of the full range, the ability to divide the extracted data into increments finer than 255 levels is a necessity for any serious manipulation.

Another thought: Given I dont usually consider DR in my day-to-day thoughts as I know how to handle most of the scanning issues I face, seeing this information presented the way it has been has potentially answered a scanning peculiarity:

Using a film scanner with a marketing number of 4.2 - 14-bit A/D - and scanning print film it becomes almost impossible from an unadjusted raw scan to get anywhere near a full range scan in the highlights. However, if print film can be fully represented in a DR of about 2, and if the scanner will support a DMAX of say ~3.2 then the densest part of the negative (the highlights) should be fully captured well before the scanner's DMAX was reached leaving the impression on the histogram that this information WASNT captured. And, any point where the highlights blow out (negative's shadows block up) should be the characteristics of the film itself and how it was exposed rather than limitations on the scanner hardware.

Bob Atkins , March 20, 2003; 10:17 P.M.

A couple of points. I

First, it's certainly true that you can get better tonal gradations if you manipulate 16 bit images rather than 8 bit images, though that doesn't directly relate to dynamic range. It avoids "posterization" after severe gamma (curve) or level corrections, but again this is different from dynamic range.

As an example you can take a 16bit image which represents a dynamic range of 4.0 and convert it to an 8 bit image which represents the same 4.0 dynamic range, but the 8 bit image will have only 255 levels and the 16 bit image will have 65536 levels. Since a DR of 4.0 is a ratio of 10000:1, each step in an 8 bit image will represent 39 "units" of linear brightness - or 0.015 density units, while each step in the 16 bit image represents 0.15 "units" of linear brightness or 0.00006 density units.

Second, on thinking more I'm not sure gamma is a factor in dynamic range. Gamma is a display funtion, not a data collection function. In general CCDs are fairly linear in output, so the dynamic range is indeed as described in the article. The output of the CCD does undergo a gamma adjustment for display, but this doesn't shift the dynamic range of the original conversion. It distorts the values, but only for the purposes of display. It's directly related to the way a RAW file (which is raw,linear, CCD ouput) is converted to a display optimized image. So while a signal level of 1 may convert to a level of 20 after gamma conversion, that signal level still represents the same D value, and it's the D value which defines dynamic range, not the luminance value of the pixel used to display that level.

Gordon Richardson , March 21, 2003; 12:20 P.M.

Since it is easy to become confused when discussion these issues, it is worth defining terms and laying out exactly what processes and system parameters affect the results when doing so. Many of the scenarios may not apply to your combination of scanner, image-editor, data bit-depth, and output device. All of them are relevant in some combination or other which is why this subject is so complex (and controversial).

Sorry for the use of headers, but my response is hard to read otherwise.

A/D Converting and Data Types
The ouput from an A/D converter with a linear input (voltage) is best stored as an integer. It could conceivably be stored as floating point, although I don't know any package that does this (it isn't convenient for image editing and requires more bits to store). Converting an analog signal into a digital value is called quantisation (only whole number values can be chosen), and there is an inherent loss of precision in the process (no matter how good the scanner).

Computer Systems, Colourspaces, Monitors and Printers
The most commonly used image formats like Jpeg don't have any embedded colourspace, but assume an implicit gamma to compensate for the non-linearity of CRT monitor phosphors. This gamma value is typically 1.8 or 2.2 depending on which system you are using. Attempts to use a linear colourspace (gamma=1.0) are controversial, and have not been adopted by the mainstream. Monitors are not perfectly linear and cannot accurately display a full 256:1 ratio of brightness levels (badly calibrated ones in bright ambient light show even less useful range). Printed paper has quite a low range (less than 50:1).

Human Visual Perpection
The human visual system is non-linear and is roughly logarithmic over large ranges in brightness. An object in shade might seem "almost" as light as the same thing in sunlight, but an exposure meter might show 2.3 stops less light (5 times darker). The typical range of brightness levels of adjacent areas that can be distinguished by eye is about 100:1 (with dark areas being swamped by bright areas). The human visual system has a very large dynamic range, but limited precision within that range.

Scanned Images and Human Perception
Scanning and image editing process are designed to be viewed by humans (either displayed on a monitor or printed on paper). The majority of these output devices can only handle 8-bit values (AFAIK). If all data were used and stored as 16-bit values this thread would be a lot shorter. Given that there are a limited number of ways in which 256 values can be stored in 8 bits, there is a tradeoff between precision and dynamic range. The real question is how to store that 8-bit data in a way that maximises both the dynamic range, while discarding data that do not cause perceptible errors.

Integer Precision and Brightness Ratios
The arithmetic difference between between 1/255 and 2/255 is the same as that between 254/255 and 255/255. However that ratio between them is completely different, in the first case being 2:1 (which is a large range in brightness) and the second being 255:254 (which is barely detectable). In a linear colourspace (gamma=1.0) the differences would be shifted to the other end of the range, since the linear values have to be gamma coreected before they can be displayed on a normal monitor.

Gamma Encoding and Dynamic Range
Gamma encoding spreads the data and shifts the results towards the more sensitive end of the human visual range. The stages are first to convert the analog signal to a 10-bit or higher internal values (depending on the hardware), then apply the gamma function to these values, before finally rounding down to 8-bits (if this is required). This preserves much of the dynamic range, and minimises the perceptible quantisation errors in 8-bit values. If both the input and outout are 16-bit values there would be no need to do corrections at scan stage (raw output). If by contrast a linear colourspace (gamma=1.0) was analysed (it has seldom been used in practice), many of these arguments would be the different (the "gaps" in the scale would be reversed).

Dynamic Range and Bit-Depth
Converting a high-quality scan into an 8-bit linear (gamma=1.0) space value would truncate the dynamic range, since it is physically impossible to store more than DMax 2.4 in an 8-bit integer. However after using gamma encoding it is theoretically possible to store a dynamic range of (log(255^2.2))=5.30. In reality the "sparse" data in the lower extreme of any 8-bit non-linear (gamma encoded) space considerably limits it's useful range.

Gamma Adjustments and Dynamic Range
High dynamic ranges are mostly relevant when scanning dense slides, but the resulting image needs to be adjusted with a gamma correction if it is to be used (rather than just stored as a raw scan). It should be clear from this discussion that gamma corrections should be done as early in the process as possible, and certainly before quantisation down to 8-bits. Large gamma adjustments once an image has been converted to 8-bit values can affect the dynamic range, but only at the cost of significant quantisation errors (posterisation).

Noise and Artefacts
Signal to noise ratios do not directly affect the dynamic range, but do they limit the effective range (an exact definition seems to be out of reach). Since dynamic range is logarithmic, the effect in low bit-depth images might be small compared to the quantisation errors. The subsequent introduction of artefacts converting to Jpeg (which has it's own quantisation) would further degrade the quality. By this stage the dynamic range of an image ceases to have any meaningful value.

Flatbed Scanners and Web Images
I would not trust values below 5/255 that had come from a flatbed scanner with a typical S/N ratio. Fortunately most users cannot distinguish these levels (either because of their limiations in vision and/or display monitors). As a result the combination produces acceptable results in spite of having a seemingly limited dynamic range.

Pros and Cons
Taking high bit scans and converting them to 8-bit output before correcting brightness or doing a gamma adjustment (levels or curves) would seem to be a waste of time and money (no matter how good the S/N ratio). Conversely using a scanner with a high dynamic range (number of bits) rather than a good S/N ratio, in the hope that it will produce better 8-bit output would seem to be of limited value. Some very old scanner internals could not offer internal gamma adjustment (which was a liming factor), but since almost all modern scanners have this option (sometimes via 3rd party software) arguing about it has become redundant.

Final thoughts
It might be useful for manufacturers to publish S/N ratios in addition to DMax values, but there is no evidence that average person could understand nor make informed use of this information. Everyone knows that DMax is not particularly meaningful, but the values are unlikely to be removed from marketing literature anytime soon. Perhaps they will eventually become irrelevant and be ignored (like shrink-wrapped software licences).

Gordon Richardson , March 21, 2003; 12:24 P.M.

I agree that S/N ratios are relevant, but something even more important is that scanning is a non-linear process. Unless you are working a linear colour-space with gamma=1.0, there will have to be some adjustment to convert to gamma=1.8 (or 2.2 depending on your system and applications).

The gamma function = input ^ (1/exponent)
has a very steep curve, and small values get magnified considerably. In a gamma space of 2.2 an input value of 1/255 gets converted to 21/255. So if your S/N ratio at input is 1/255 your dynamic range may get squeezed a lot smaller than than you think! (This is one reason for using 16-bit editing).

A 10-bit (low-end) scanner with a theoretical dynamic range of log(1024)=3.0, would squeezed to log(1024^(1/2.2))=log(23)=1.37 dynamic range after gamma adjustment of 2.20. Starting with a 12-bit A/D converter gives you a better chance of an acceptable dynamic range after major gamma adjustments.

I don't know the exact S/N ratio of a low-end scanner, but most will agree that it is hard to get one close to a dynamic range of 2.0 without noise. I think the problem is worse than you indicate (never mind the theoretical limit of 3.0!), though they can work well for some applications.

Gamma (contrast) also applies to different films, which is why negatives are easier to deal with on low-end scanners than slides, which have a higher density range (the noise is also negative just to complicate things). Unless you are scanning physical objects (leaves or coins), gamma applies to both sides of the process, so you can't talk about each as if they exist in isolation (I think Scott Eaton has made this point repeatedly). The dynamic range of paper is much less than that of film, so something often has to be squeezed out. Match your scanner to you input medium and output requirements.

CRT display monitors also have an implicit gamma due to the nature of the phosphors, so in principle your eyes should see the full range of the original image (neither real-world CRT's nor LCD's display all 256 levels of brightness).

When scanning I cater for differces in subject matter by varing the gamma of from 1.4 to 2.2 to expand or contract the dynamic range as needed. The process is very complex, and lots happens to your pixels along the way.

There were threads in the archives like "36 bits in a 24 bit world" and "Density range for film scanners & Kodak Photo CD". Reading replies from 1997 is quite an eye-opener, and this is not exactly a new issue!

Note: Some of the above points have been superseded and elaborated below. I have left this as is (for the moment) to preserve the continuity of the responses.

Bob Atkins , March 21, 2003; 03:18 P.M.

Gordon. I still don't think gamma corrections change dynamic range. They just change the value of the steps within that range.

Think about it. DR is Dmax - Dmin. The lightest area is Dmin and let's say it's 0.0 and is represented by an A/D value of 254. The darkest area able to be resolved is Dmax. Let's say it's 3.0 and is given by an A/D value of "1". Now tweak the linear range to a gamma of 2.2 and that value of "1" becaomes "21". HOWEVER - it still represents a Dmax of 3.0, and Dmax-Dmin will still be 3.0

Now the size of the steps in the dark areas has increased and you may see this as posterization, but the dynamic range of the system has not changed. The only change is in the way that dynamic range is mapped. The question of how, and how well, deep shadow areas are mapped onto a monitor screen or print does not affect the dynamic range of the scanner. It's a totally seperate issue, that of how to visually represent the input signal.

Bob Atkins , March 21, 2003; 07:00 P.M.

Gordon - you are absolutely correct. Gamma issues make the problem worse. The specs are ludicrous for gamma=1, for gamma >1 they are even worse!

[I though this over and changed my mind! See below]

Editing this comment has moved it from where it actually belongs (further up in the thread) to here, where it looks completely illogical. Sorry about that but at the moment there's nothing I can do about it.

Gordon Richardson , March 22, 2003; 08:25 A.M.

The article assumes a linear scale (gamma=1.0), which is appropriate for the internal scanner data. However computer images and applications are gamma encoded (used in every image even if you weren't aware of it). This gamma encoding changes the equivalence between input values and output values when scanning. The dynamic range of a scanner can be approximated by it's internal bit-depth, but has no correlation with it's output bit-depth (unless it is raw scanner data).

The dynamic range of an image can be considerably compressed, and it is actually possible to compress a density range of more than 4.0 into 8-bit data, provided the conversion is done internal to the scanner, and a large gamma correction is applied to lighten the image (in addition to the system gamma). Also note that in a gamma encoded value 128 is not twice as bright as 64, it is 4.6 times as bright (assuming a gamma of 2.20). This is contrary to the common assumption that integer scales are linear (the eye is easily fooled by the gamma encoding).

Another possible coding method is logartithmic, where values correspond to equal brightness RATIOS (rather than arithmetic differences or levels). An 8-bit log scale with brightness increments of 0.01 (the lowest that the eye can perceive) would have a dynamic range of 1.01^256=12.8 (equivalent to DMax=1.10). To achieve a dynamic range of 2.40 with logarithmic encoding the brightness ratios would have to be 256^(1/256)=1.022 which would be perceptible as "posterisation" to the eye.

The only way to achieve high precision and dynamic range with limited bit depth is to use gamma coded integer scale. The small steps at the top end of the scale and large steps at the lower end of the gamma coded integer scale are both imperceptible to the human eye when displayed on a normal monitor.

Gordon Richardson , March 22, 2003; 08:48 A.M.


Grey-gradient in gamma encoded linear space

Perhaps a diagram may convey this information in a more visual way. Note that this is a simulation only, since I can't change the colour-space of your display with a Gif image. If you can't see all the details in the image your monitor might need calibration (though that's not the purpose of this excercise).

In the centre (C) is a grey-scale (created in my photo editor), which ranges from 0 to 255 in equal steps. It is stored as linear integer, but the gamma decoding at display stage makes it correspond closely to the logarithmic scale of the human eye. It has range and precision (quality).

On the far left (A) is the original data (C) after an inverse gamma of (1/2.2). This simulates the data a linear colourspace as if displayed without gamma correction. I has a very large dynamic range, but most of the range appears very dark on a normal monitor.

On the far right (E) is the original (C) with a positive gamma of 2.2, which is rougly equivalent to logarithmic coding. It has very high precision (small step size) but most of the scale appears very bright on a normal monitor (it lacks dynamic range).

Neither A nor E is of much use for real world use, since each shifts the midtones to extremes of the scale. However when the applicable gamma corrections are made the results approximate the normal visual scale (B and D).

However there has been a significant loss in precision which reduces the quality. In B the values at the dark end of the scale show posterisation, and in D the values at the bright end of the scale show posterisation. Clearly the best way to store both image precision and dynamic range is to use gamma encoding which matches human visual perception.

Bob Atkins , March 22, 2003; 03:57 P.M.

Gordon

Once again, the dynamic range of a scanner has nothing to do with gamma. Data DISPLAY certain DOES involve gamma.

Dynanic range is DR=Dmax-Dmin. It doesn't matter how you display the range from Dmax to Dmin (i.e. what gamma you use). If your system has a Dmin of D=0 and it shows that D=3.3 is lighter than D=3.4, but D3.4 is the same as D=3.5 and larger, your Dmax is 3.3. Therefore your DR = 3.3-0 = 3.3

How you display that data doesn't matter as far as dynamic range goes. From a visual perspective it's obviously better if it's a 16 bit signal with the correct gamma, but if you display it as an 8 bit signal with the wrong gamma, the scanner still has a dynamic range of 3.3.

Dynamic range is simply the difference between the Density of the least dense region which can be measured (usually close to D=0) and the Density of the most dense region which can be measured - and which still generates some signal greater than that given by infinte density - which for most desktop consumer scanners will be somewhere in the range of 3.0 +/- 0.3. All gamma does is change the way this data is mapped (usually to a visual display).

We are talking here about scanner dynamic range, not visual display dynamic range. A print has a visual dynamic range of 2.0 or less, even though it can represent data with a dynamic range of 4.0 or more). Just because the print has a DR of 2, doesn't mean that data that it displays does.

Manuel Rincon , April 02, 2003; 02:40 A.M.

Thanks for the very precise and accurate explanations. But in digital cameras, things are different. Response is not linear, meaning that number of bits does not say anything. Cameras like Fuji 700 have a very wide dynamic range with 8 bits, much wider than SLRs with 12 bits. It is very difficult to measure, since actual DR is very dependant on the amount of light and white. Moreover, manufacturers look very little interested, since a comparison with film would kill many of the potential buyers. But at some point, the fight will stop in the megapixels arena and will start in the DR sphere. Manuel.

William Bloodworth , April 08, 2003; 01:22 A.M.

Bob's right.

The dynamic range of capture is determined by the D-min and D-max of the capture device. While the gamma function applied in image coding does "stretch" and "squeeze" (compress) portions of that range within those parameters, it doesn't change the parameters themselves. It is these parameters, determined by the D-min and D-max of the capture device that establish the maximum possible range or intensity ratio that can be captured by a given device, and what the resulting black and white points correlate to as far as intensity range or contrast ratio in the original scene.

If a hypothetical device with dynamic range of 0-4 Density units is presented with a scene or film original with at least that much range, it records values for its whole range - a 10,000:1 intensity range. Whether recorded linearly or with a gamma function, the range recorded is still 10,000:1. That is it is representative of what was a 10,000:1 ratio in the original scene presented to the capture device. If the bit depth is insufficient to render that great of a range with total precision, then some of the detail will be lost between the highlight and the shadow, but the parameters remain. Similarly, if gamma encoded, some of the range will essentially be stretched (be assigned more levels) and some will be compressed (assigned fewer levels), but this is all taking place between the black point and white point. The black point and white point remain representative of a 10,000:1 range. When the image is output, it is of course going to be rendered within the dynamic range of the output method of choice.

Olivier Gallen , June 12, 2003; 12:51 P.M.

Very interesting article, and reactions. I think, then, that I have to add some more points... : )

Let's talk to a CCD for some time... (CCD= the CCD is speaking / US= That's us)

"CCD= Turn off the light, please. US= What do you see? CCD= I can still see something! Oh... that s my NOISE !"

"US= I will increase slowly the light. Tell me when you see some real light. CCD= Now! US= Sure? That s not your noise? CCD= Sure! US= Ok, that's 0.1 lux (or whatever...).

"US= Now, I will increase the light and you tell me when you can t see any more change. - - - CCD= Now! Max for me." [ok... 100 lux (or whatever...), I continue to increase the light to check any reaction] "CCD= It doesn t change anymore. And stop it: It hurts!!!"

So, now I know that my particular friend CCD has a useful Dynamic Range = log(100/0.1) = 3. This is relative to the min/max light it can handle correctly, and means something only for the analog part of the scanner.

Let s have a look at the A/D converter...

A/D#1 is very poor, and is 1 bit only (0 or 1). You teach him to say "0" under 65 volts, and "1" above 65 volts (or whatever...).

A/D#2 is very rich, and can handle 16 bits. You teach him to say "0" from 0 to 0.004 volt, "1" from 0.004 to 0.006 volts .... "65535" above 131 volts (or whatever...).

My friend CCD with the rich A/D#2 will have a Dynamic Range of 3.

My friend CCD with the poor A/D#1 will also have a Dynamic Range of ...3.

The point is: Dynamic Range (on light) is not at all related to the bit depth of the A/D converter. The bit depth of the A/D just gives the number of steps to go from "Black" to "White" (2 for poor A/D#1, 65536 for A/D#2) = tonal gradations.

More points:

- For negatives, high A/D bit depth is useful (Neg = low DR, strong internal tonal adjustment).

- For slides, a high Dynamic Range is very important. You need a good CCD with low noise.

Olivier Gallen , June 12, 2003; 03:47 P.M.

I continue...

A slide is able to record up to 6 f-stops (level 1 to 64) of the scene, and exposition is crucial in order to keep the right information. This image is then displayed on the slide with a Dynamic Range of 4 (level 1 to 10000). [increase in contrast].

If I use my CCD, with DR=3, I know that I will not be able to record everything. I will lose information in the shadows (sensitivity&noise) AND IN THE HIGHLIGHTS (in order to use the CCD at its optimum). Of course, if you have a scanner with a true DR above 4, you are in wonderland.

How many bit-depth do you need in this situation? 6 (cf f-stops)? 10 (2^10 for D=3)? 14 (for D=4)?

Because the slide was properly exposed, we can say that the image scanned is still properly exposed (If the slide was not properly exposed, go back on site and take another picture : )

If you want to use the image with a media that is able to show less than 3x8bits (TV, Monitors, Prints, Magazine... nearly everything), you will have plenty with a 8-bits A/D converter (and file format). But if you really want more (lot of tonal tweaking, research...), go for it.

A color negative is able to record up to 10 f-stops (1 to 1024) of the scene, and has a Dynamic Range of 2 (1 to 100) [=>low contrast]. My usual CCD, with DR=3, will be able to record the whole range of intensity, with less noise and less loss of higlights - compared to a slide. Great !

But because of this, I will not use the full capacity of the A/D converter (designed for DR=3, not 2): I will have 10 times less gradation in the digital output (10^2/10^3). This represent a loss of about 3-4 bits depth.

If we want to use the image with a media that is able to show 3x8bits or less (usual), we will need a 12 bits A/D converter in order to really get the full 3x8 bits range in the image (and in the 3x8 bits file format). If you want to edit the tonal range (really useful with negatives), you will need more bit-depth: 2 or 4 will probably be enough (14 or 16 bits A/D converter).

Another interesting thing: with negatives, in order to fully get advantage of a 3x16 bits file format (Tiff, Jpeg2000) you will need a 20 bits A/D converter (even more, if your negative has a low DR and your scanner a high DR). : )

My findings, here :

If you are after the max quality: shoot slides, scan them with a high-end scanner of Dynamic Range about 4 (+ if you can change the light intensity, you will be able to optimize the use of the CCD). A 16 bits A/D converter is great, but a 8 bits A/D converter will also be fine (except special needs).

But for 95% of persons, it is probably best (=cheaper) to scan negatives in a good desktop scanner with a 14 bits A/D converter. You can also scan your slides in a VERY good desktop scanner (low noise, high quality CCD...) with just a 8 bits A/D converter, but you will probably loose more...

Please note that those findings are for discussion purpose only. DON'T TAKE THEM AS GRANTED.

In particular, I must point out that Bob Atkins' explanation doesn t support this (cf "If you feed an 8-bit A/D with a signal which has a dynamic range of 3.2, all you get out is a signal with a dynamic range of 2.4, since that's the best an 8-bit A/D can do."). And most of the links below support his explanation.

But still... I agree with myself : )

Olivier Gallen , June 30, 2003; 01:19 P.M.

Well, my comments were for discussion purposes... And the discussion continued here. To make it short: Random noise is always added to the "good" signal, thus it makes this signal unaccurate by an amount = sigma(noise). It is useless to measure this signal with steps narrower than the sigma(noise). The number of those 'smallest useful' steps corresponds to a certain amount of useful bit-depth converter. Then, we meet again the "theoritical" Dynamic-Range of the A/D converter - ie: 12 bits would be enough up to DR=3.6. Perhaps the new Minolta Elite 5400 (annouced with a 'real' DR=3.8) may take advantage of more bits (wait for real measurements, though...)

Qiang Lin , August 28, 2003; 04:44 P.M.

Actually there are two contributors in noise - thermal noise and quantization noise. In order to lower the thermal noise, you have to use the best and cooled sensor. To lower the quantization noise, you have to use more bits. It's about 6dB SNR for each bit, but there are some other imperfectness in A/D converters. For example, an 8-bit A/D should have 6x8=48dB dynamic range, but usually you can only get somewhere around 40dB. The trick to improve the scaner's dynamic range is to balance all these noise sources. When there is nothing much you can do with the thermal noise, and noise from A/D is close to the thermal noise, adding more bits in A/D can bring down its part, hence you get lower overall noise level and improve the dynamic range a little bit. I'm not sure about the thermal noise in sensors, but I guess Minolta had a good reason to use 16-bit A/D in their scaners. But what Bob said was true, there is no way to get the Dmax numbers as the vendors claimed.

Dan Colvin , February 10, 2005; 02:55 P.M.

In a lot of Discussions about Dynamic range I often see people talk in terms of bit depth. while the two are related they are quite differnt. A good descripter I heard once was that the height of the ladder is its dynamic range, the number of steps on the ladder is the bit depth. You can capture a very wide dynamic range with 8 bit data space, given proper dithering. With reguards to sensors in scanners and cameras, the specific dynamic range is very important to know because it will give you the upper limit of how much information about brightness and shadow from your scene/scanning target will end up in the digital file. This is especially important with digital cameras . While most scanner companies give a dmax, dmin rating on there equipment specs, none of the camera companies or camera reviewers seem to mention the specifics of dynamic range in their camera chips. As a photgrapher I need to know how many stops above gray and below gray I can capture detail in. Then I can measure the values in the scene and know what I'm dealing with and come up with an exposure plan. When digital camera's exceed the same dynamic range as color negative film (not the C print, but whats on the neg,) then we are entering very exciting territory. Does anybody know what the specific dynamic range for the new canon CMOS sensor in the 1ds mark II might happen to be? I can't seem to find this data anywhere.


Add a comment



Notify me of comments