Pages: [1]   Go Down

Author Topic: Bit depth and DR  (Read 4140 times)

bdosserman

  • Full Member
  • ***
  • Offline Offline
  • Posts: 120
Bit depth and DR
« on: April 01, 2012, 01:02:06 am »

Hi,
   Sorry if this has been hashed out before, but I've seen some people saying that if a camera has only (eg) 14 stops of (engineering) DR, then it doesn't make sense to record more than 14 bits of data. I don't understand this assertion, and I'd like some clarification.
   Specifically, if I understand correctly, the 14 bits of DR (on a per sensel basis, let's say) implies that if the sensor records 16 bits of data, and if the first 14 bits are zero, then the last two bits are just noise. But why isn't it plausible that the extra two bits are useful at higher exposures? Eg, that having 2^15 versus 2^13 options for recording the top F-stop allows for extra data which is signal rather than noise?
   Or am I missing something basic and the assertion is actually based on a more detailed analysis of SNR at different saturations, or some such?

   Thanks,

Brian 
Logged

Ajoy Roy

  • Full Member
  • ***
  • Offline Offline
  • Posts: 117
Re: Bit depth and DR
« Reply #1 on: April 13, 2012, 04:20:24 am »

The way I look at it is as follows

1. DR gives the dynamic range of the sensor. This figure is the ratio of the brightest to the darkest level the sensor can detect. The sensor is an analog device. The figure may be 3 stops, 5 stops 8 stops or 25 stops, all depends on the sensor!

2. The A-D converts the analog signal to digital. Depending on the speed and accuracy of the A-D you convert the analog levels into a number of digital bits of data.

Now for the number of bits that are relevant to the data. If the full well capacity is say 64K electrons, and the noise is 1 electron, then you can have an A-D of 16 bits. In contrast if the noise is 4 electrons, then there is no use in going beyond 14 bits. Conversely if the full well capacity is 1M electrons and the noise is 4 electrons then we have 1M/4 = 256K or 18 bits possible. So ultimately the number of bits that you can extract from the data is dependent on the ratio of the maximum signal and the noise.

In summary the number of bits of data in a digital camera depends on the full well capacity of the sensor and the associated noise. The Dynamic Range, has nothing as such to do with the number of bits, as you can have 8 bits of data spanning 10 stops image, and conversely have 24 bits spanning 6 stops image.

Logged
Ajoy Roy, image processing

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Bit depth and DR
« Reply #2 on: April 13, 2012, 09:01:45 am »

In summary the number of bits of data in a digital camera depends on the full well capacity of the sensor and the associated noise. The Dynamic Range, has nothing as such to do with the number of bits, as you can have 8 bits of data spanning 10 stops image, and conversely have 24 bits spanning 6 stops image.

An excellent analysis except for the last statement. Current digital cameras use linear integer encoding and this does place an absolute limit on DR. With 14 bit encoding, the maximum data number is 16383 and the minimum is 1, giving a DR of 16381:1 or 14 f/stops (log base 2 of 16383 = 14). However, this allows only one level in the darkest f/stop whereas at least 8 levels are needed to be useful (that is an arbitrary choice, but the one chosen by Norman Koren in his discussion of DR), further reducing the useful DR to 11 stops. DR may be limited by quantization or noise and the latter predominates with current sensors as you indicate. Noise dithers the image and can complete mask posterization as shown by Emil Martinec in his discussion of noise, DR and bit depth.

Linear encoding is inefficient, since it devotes much of its range to the brighter f/stops (one half of the range is taken up by the brightest f/stop). Gamma encoding redistributes some of the range to the darker f/stops and increases the useful DR as Mr. Koren demonstrates in his graphic which is shown on the referenced web site. Floating point and log encoding can improve quantization in the darker f/stops further as discussed by Greg Ward in his discussion of high dynamic range encoding.

DR has been compared to a staircase, where the height of the case is the DR and the bit depth is the number of steps in the case. This implies that for a given number of bits one can encode a large DR with large steps or a smaller DR with smaller steps.  However, for linear encoding the size of the steps is fixed. I hope this helps.

Regards,

Bill

Logged

Kitty

  • Full Member
  • ***
  • Offline Offline
  • Posts: 126
    • http://
Re: Bit depth and DR
« Reply #3 on: April 13, 2012, 09:11:46 am »

Could someone translate all the above message to human English please? I don't understand any single word. ^_^;
Logged

BernardLanguillier

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 13983
    • http://www.flickr.com/photos/bernardlanguillier/sets/
Re: Bit depth and DR
« Reply #4 on: April 13, 2012, 09:43:05 am »

Could someone translate all the above message to human English please? I don't understand any single word. ^_^;

Are you saying that this topic is not interesting enough to get a 5 years engineering degree in signal processing?

Be careful, you are going to hurt someone's feeling here! :-)

In essence it means that 14 bits is not enough to handle more than 11 stops of photographic DR, but even that appears to be sufficient for all the commercially available sensors.

Cheers,
Bernard

madmanchan

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2115
    • Web
Re: Bit depth and DR
« Reply #5 on: April 13, 2012, 09:43:53 am »

The bit depth of a linear recording device (like a modern camera sensor) places an upper limit on the dynamic range that can be recorded in a single capture.  For example, if the sensor has a 14-bit A/D converter, that means it cannot record more than 14 stops of DR.

(I've chosen the above words very carefully.  Note, in particular, it does not mean that if you have a 14-bit A/D that you are guaranteed to be able to record 14 stops of DR.)
Logged
Eric Chan

Kitty

  • Full Member
  • ***
  • Offline Offline
  • Posts: 126
    • http://
Re: Bit depth and DR
« Reply #6 on: April 13, 2012, 10:17:25 am »

Thanks Bernard and Eric for the simple explanation. :D

I am really interested in DR. I don't know any about technical.
14 F stop is incredible wide. Print should look good? or dull?  ???

I still feel outdoor photography with negative film has smoother gradation than Digital. While digital has more color accuracy.
I never did scientific test. By the theory film has more narrow latitude.
But on Negative print always looks better under bright sunlight. While Digital looks better in the studio or dark scene.

Is it because of the bit depth and DR?

Kitty
Logged

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Bit depth and DR
« Reply #7 on: April 13, 2012, 10:31:53 am »

Could someone translate all the above message to human English please? I don't understand any single word. ^_^;

From your post I infer that you are not technically inclined and are not interested in mathematical analysis (no offense intended). The engineers who design digital cameras are not stupid, and (AFAIK) they have provided sufficient bit depth to take advantage of the capabilities of their sensors. Bit depth has also been used for marketing purposes. The dSLRs that initially offered 14 bits couldn't really take advantage of that bit depth, but it made good marketing. Similarly, many MFDBs offer 16 bits, but their sensors can't make full use of them. That does not prevent the marketing folks from trumpeting that "advantage" over dSLRs. With these factors in mind, I would recommend that you ignore bit depth and go out and take some pictures.

If you are using in camera JPEGs, the bit depth is 8 in a gamma (approx) 2.2 space. This fine for most purposes if you get the exposure and other camera settings right, but there is limited headroom for post-exposure editing. If you use raw files, there is the additional possibility of highlight recovery, and, with the latest cameras, considerable underexposure can be tolerated. If you get the settings in the raw converter correct, 8 bits in sRGB or AdobeRGB is sufficient for most purposes. 16 bit images in Photoshop do offer considerably greater editing possibilities, and 16 bits are recommended if you use ProPhotoRGB. This is all you really need to know for practical photography.

Regards,

Bill
Logged

Kitty

  • Full Member
  • ***
  • Offline Offline
  • Posts: 126
    • http://
Re: Bit depth and DR
« Reply #8 on: April 15, 2012, 04:08:58 am »

Thanks Bill. Yes, my math is really bad. That is why I choose photography.  ;D
And I don't think I am able nor interested to learn math now.
How to check the DR? It seems modern DSLR use more intelligence processor to increase sharpness.
Is it able to increase the DR too?

kitty
Logged

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Re: Bit depth and DR
« Reply #9 on: April 15, 2012, 05:06:34 am »

Hi!

DR is not particularly easy to measure. One way to detect DR is probably to make an exposure series, like underexpose 1, 2, 3, 4, 5, 6, 7, 8 stops and see what is the minimum exposure where you can extract decent detail using extreme controls in raw development. A camera that handles underexposure better has better DR. The amount over overexposure a sensor can take is pretty much given in the ISO standard, as far as I understand.

The correct way to measure DR is to photograph an evenly illuminated Stouffer Wedge, expose so the brightest step on the wedge is just below clipping, do a linear raw conversion and evaluate the wedge using Imatest, RawAnalyser or something similar.

Camera electronics cannot improve DR but they can cheat a bit. What they essentially do is averaging several pixels to get a better noise signal ratio. I actually guess that they would use a median filter, to be correct. Noise reduction on raw images is probably a very bad idea, as much better algorithms are probably possible on computers which have more CPU-power.

Best regards
Erik



How to check the DR? It seems modern DSLR use more intelligence processor to increase sharpness.
Is it able to increase the DR too?

kitty
Logged
Erik Kaffehr
 

bwana

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 309
Re: Bit depth and DR
« Reply #10 on: April 18, 2012, 09:00:48 am »

tnx all for your explanation of DR and helping distinguish the analog and the digital part. so, when a nikon can store 14 bits or 12 bits, how does one decide? does 14 bits allow more tones in the image, really? or is the noise overwhelming the added information at the lower steps of the staircase-so that it doesnt make a difference?

also, does that sensor actually capture 12 stops of DR?
Logged

digitaldog

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 20651
  • Andrew Rodney
    • http://www.digitaldog.net/
Re: Bit depth and DR
« Reply #11 on: April 18, 2012, 09:44:04 am »

Bit depth has also been used for marketing purposes.

Ain’t that the truth!

Quote
DR is not particularly easy to measure.

Yup, considering someone first has to (or should) define at what point the data is useful and past a level of noise that isn’t useful data. Between the two statements above, no wonder this discussion goes on and on. It was true in the old scanner days too.
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

Doug Peterson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4210
    • http://www.doug-peterson.com
Re: Bit depth and DR
« Reply #12 on: April 18, 2012, 12:41:29 pm »

Yup, considering someone first has to (or should) define at what point the data is useful and past a level of noise that isn’t useful data. Between the two statements above, no wonder this discussion goes on and on. It was true in the old scanner days too.

Especially when the answer cannot be represented fully by a single number when comparing very different systems.

The aesthetic quality of noise is only sort-of related to it's pure mathematical level (as represented by a number like S/N).

In other words these two are not of the same use to a photographer:
 - gaussian film-like grain with uniform characteristics and apparent smoothness of tonality going from shadows to quarter tones
 - blotchy pastes of color with irregular shape and strange posterized transitions from shadows to quarter tones
 
Both of those can have the same signal to noise ratio as measured mathematically.

Some of these characteristics comes from the sensors, some from the supporting hardware, some from firmware, some from software.

The aesthetics and math become even less tightly related when you add software noise-reduction into the fray. Software can do wonders to reduce/remove/make-more-pleasant noise which it can profile well. For instance if you've ever done audio recording you'll know that some kinds of noise are very hard to remove/reduce in post (e.g. sporadic voices in the background) while others are very easy to remove/reduce (high pitched squeaking in the background) even when they are the same mathematical volume. Furthermore when software knows the characteristics of the noise a particular device produces it can do a better job of reducing it or making it less aesthetically intrusive.

Anyway I'm rambling now. But the point is a sensor does not make a picture, a photographer does - and the sensor is only a small part of the system the photographer will use. It's not really relevant to compare anything besides the end product. And even then it's really only relevant to compare the end product the way YOU would use it (e.g. what lighting sources, what length exposures, what ISOs, what software, etc).

bdosserman

  • Full Member
  • ***
  • Offline Offline
  • Posts: 120
Re: Bit depth and DR
« Reply #13 on: April 18, 2012, 11:32:55 pm »

Especially when the answer cannot be represented fully by a single number when comparing very different systems.

The aesthetic quality of noise is only sort-of related to it's pure mathematical level (as represented by a number like S/N).

In other words these two are not of the same use to a photographer:
 - gaussian film-like grain with uniform characteristics and apparent smoothness of tonality going from shadows to quarter tones
 - blotchy pastes of color with irregular shape and strange posterized transitions from shadows to quarter tones
 
Both of those can have the same signal to noise ratio as measured mathematically.
use it (e.g. what lighting sources, what length exposures, what ISOs, what software, etc).

Thanks everyone for your replies -- I feel I understand it somewhat better now, although some day I should lock an engineer
in a room and get a more detailed explanation of how certain concepts are defined (I come from a theoretical math
background, and don't know squat about the real world, so to speak). I like Emil Martinec's article linked above, although am
still mulling through the consequences.

Specifically regarding the above comment, has anyone done any work on how one might mathematically model/measure
different kinds of noise? I guess it's easy enough to address chroma noise versus luminance noise, but it also seems like
it should be within the realm of established theory to distinguish between random-looking noise and pattern noise.

Brian
Logged
Pages: [1]   Go Up