May 19, 2013, 01:12:40 AM

### Author Topic: Calculating Dynamic Range  (Read 2794 times)

#### 3kramd5

• Rebel T4i
• Posts: 173
##### Calculating Dynamic Range
« on: March 12, 2012, 09:52:15 AM »
Rather than hijack any of the existing threads on DR, I thought I'd start a new one.

I'm still struggling a little with the concept by which a few people (LetTheRightLensIn and maybe a couple others) are computing Dynamic Range.

Maybe my understanding of DR itself is faulty.

Is not DR the total range between brightest bright detail and darkest dark detail that a camera is capable of recording in a single exposure?

If so, how does having two separate exposures, one completely underexposed (body cap on stopped down fast shutter) and one completely overexposed (bright, slow shutter) aid in computing maximum potential DR?

Wouldn't you instead need a to meter at the median brightness point in a scene containing a fairly slow transition to complete dark and a fairly slow transition to complete bright (i.e. overexposed white and underexposed black existing together in a single exposure with smooth gradients towards the center) in order to determine useful DR?

I have a technical background, but I'm looking more for conceptual understanding than anything.

Thanks!
« Last Edit: March 12, 2012, 09:54:02 AM by 3kramd5 »
5D2+40D+EF 50/1.4+EF 24-70/2.8+Sigma 70-200/2.8
RIP: EF 24-105/4

#### canon rumors FORUM

##### Calculating Dynamic Range
« on: March 12, 2012, 09:52:15 AM »

#### neuroanatomist

• 1D X
• Posts: 8591
##### Re: Calculating Dynamic Range
« Reply #1 on: March 12, 2012, 10:08:30 AM »
The approach of taking a blown out frame and a completely dark frame is valid for calculating DR, but there are inherent assumptions in that calculation (equivalent response between the frames, etc.).  The calculated DR is almost always going to be greater than the 'usable DR' (i.e. what you can actually see in an image), since the bottom end of the calculated range is set by the noise floor, and regions only slightly brighter than that might not separate from the noise.

The alternate method you suggest I'd call measuring DR, as opposed to calculating it.  IMO, measuring is the better way to test DR - that gives you an actual test of the usable DR.

Practically, it's pretty easy - you just need a step wedge (like the Stouffer T2115 or T4110, they cost about \$10) and a bright, homogeneous backlight.  For example, below is a crop from the setup I use.  The T2115 is on the left, on the right is a chrome-on-glass USAF 1951-type resolution target (which I use for microscope imaging resolution testing).  You set the exposure so the transparent top part of the wedge is just at the clipping point, and see how many stops you can distinguish down to the other end (each step on the scale is 0.5 stops for the T2115).
« Last Edit: March 12, 2012, 12:14:28 PM by neuroanatomist »
EOS 1D X, EOS 7D, and lots of lenses
_____________________________
Flickr | TDP Profile/Gear List

#### Tijn

• Guest
##### Re: Calculating Dynamic Range
« Reply #2 on: March 12, 2012, 10:10:20 AM »
As I understand it, the RAW files have equal minimum and maximum (normalized) values of 'photon count' for each ISO setting. For several photos taken at the same ISO with the same camera, all overexposed, the overexposed "value" in those areas will be equal. For underexposed photos there will be more of a noise averaging process required, so it may fluctuate a bit, but only within a very small margin. Therefore comparing an underexposed photo and an overexposed photo at the same ISO value will give you a rough practical maximum of possible DR. It could in practice turn out to be even less, but it can't be much more if perfectly overexposed and underexposed areas yield that maximum DR result.
« Last Edit: March 12, 2012, 10:12:57 AM by Tijn »

#### 3kramd5

• Rebel T4i
• Posts: 173
##### Re: Calculating Dynamic Range
« Reply #3 on: March 12, 2012, 10:50:48 AM »
The approach of taking a blown out frame and a completely dark frame is valid for calculating DR, but there are inherent assumptions in that calculation (equivalent response between the frames, etc.).

Shouldn't the the inherent assumption of dark frame and white frame calculations be that everything between those two extremes can be recorded by the sensor at one time?

Correct me if I'm wrong again (probably am), it's "black" when all pixels record 0 and white when all pixels record 255, in other words there are a sum total of (2^8) brightness values per pixel that can be recorded.

But we aren't concerned with that, we're concerned with how dark it has to be to black out pixels and how bright it has to be to white out pixels... in one scene.

I can go stand my wife up to the wall next to a window on a bright day. If I expose for her, the window will be overexposed white. If I expose for the outside, she'll be underexposed black. If I expose for the median, there will be a little of each (histogram shaped like a U, I guess), and detailed brightness range between those extremes is the total DR my camera can record. Is that what you mean by usable DR?

Put another way, do these methods suggest anything about where highlight and shadow clipping begins in a high DR scene exposed for the middle tones?
5D2+40D+EF 50/1.4+EF 24-70/2.8+Sigma 70-200/2.8
RIP: EF 24-105/4

#### neuroanatomist

• 1D X
• Posts: 8591
##### Re: Calculating Dynamic Range
« Reply #4 on: March 12, 2012, 12:26:58 PM »
Another assumption, yes, but it's a pretty safe one - it's very likely that for a given ISO setting, the noise recorded with no light input will be the same from shot to shot (under a controlled temperature), and also very likely that for a given ISO setting, the number of photons required to fill a well will not vary significantly from shot to shot.  So, combining data from sequential shots is reasonable.

Your numbers are wrong (or rather, they are correct for an 8-bit capture, but not for the 14-bit ADC that's commonly used now, where the upper bound is 214-1 instead of 28-1, i.e. 16383 vs. 255 for white).

As for how dark to get black or how bright to to get white in one scene, that's going to depend on the ISO selected for that particular shot. The calculation determines the maximum possible DR for a given ISO setting (and DR decreases with increasing ISO).

In your example, if you exposed at median value, a camera with a narrow DR would give you blown highlights and blocked up shadows, while a camera with a wide DR might not clip on either end, if the DR of the camera exceeds that of the scene.

Yes, that's pretty much what I mean by 'usable' DR.  It's relative to the exposure, but wider means you can capture brighter highlights and deeper shadows in the same scene, and narrower DR means you have to choose which way to bias your exposure so you sacrifice either shadow detail or highlight detail.

An alternate way to use the step wedge, and how DPR does it IIRC, is to expose so that the middle of the wedge is exposed to 18% gray, then see how far up the wedge from there until clipping occurs and how far down the wedge from there until the difference between the steps is lost in the noise.
EOS 1D X, EOS 7D, and lots of lenses
_____________________________
Flickr | TDP Profile/Gear List

#### 3kramd5

• Rebel T4i
• Posts: 173
##### Re: Calculating Dynamic Range
« Reply #5 on: March 12, 2012, 01:56:08 PM »
Another assumption, yes, but it's a pretty safe one - it's very likely that for a given ISO setting, the noise recorded with no light input will be the same from shot to shot

What does noise have to do with the equation?

In the film world, If I take a thin negative and a thick negative, can I indeed draw any conclusions about the total range capable of being recoded on a single frame?

I guess what I'm missing is how one takes a completely dark frame and a completely white frame and figures out what happens in between.

Is there actually a brightness gradient in those frames (ie not all 0 for the unexposed an 2^14-1 for the overexposed frame) that is used to generate a curve for interpolation?

I totally get using the physical gauge (wedge block). To me that's intuitive.
5D2+40D+EF 50/1.4+EF 24-70/2.8+Sigma 70-200/2.8
RIP: EF 24-105/4

#### neuroanatomist

• 1D X
• Posts: 8591
##### Re: Calculating Dynamic Range
« Reply #6 on: March 12, 2012, 02:24:15 PM »
Noise is fundamental in determining the bottom end of the DR.  The idea is that DR is range between the highest measurable brightness and the lowest measureble darkness.  Highest measurable brightness is easy - you just fill all the wells, they have a capacity in terms of number of electrons they hold (say, 30,000 e-, for example).  But at the low end, noise is the determining factor.  Are 3 photons enough to generate a signal?  10?  30?  Depends on the noise, since electronic noise is inherent in any electronic system.  So, you measure the noise with no light input - anything above what you measure as noise must be signal, so that becomes the lowest signal you can detect.  In other words, the signal-to-noise ratio, and you take the base-2 log to convert that to stops of DR.
EOS 1D X, EOS 7D, and lots of lenses
_____________________________
Flickr | TDP Profile/Gear List

#### canon rumors FORUM

##### Re: Calculating Dynamic Range
« Reply #6 on: March 12, 2012, 02:24:15 PM »

#### dtaylor

• EOS M
• Posts: 300
##### Re: Calculating Dynamic Range
« Reply #7 on: March 12, 2012, 02:24:42 PM »
In the film world, If I take a thin negative and a thick negative, can I indeed draw any conclusions about the total range capable of being recoded on a single frame?

Nope. It's pretty simple. To test DR you shoot a transmission step wedge and count the steps. The "calculated" claims based on black and white pixels or frames are generally wrong because the test and formula are wrong to begin with.

I do enjoy watching the arguments that erupt because somebody over analyzed a black pixel and therefore concluded that the 5D3 has the same DR as the Apple QuickTake, or that Nikon cameras have 250 more stops of DR than Canon cameras. Pretty funny stuff.

#### neuroanatomist

• 1D X
• Posts: 8591
##### Re: Calculating Dynamic Range
« Reply #8 on: March 12, 2012, 02:35:47 PM »
Even when shooting a step wedge, noise is a factor - as ISO increases, the noise starts to 'blur out' the dividing lines on the step wedge, so while I can easily see the difference between steps 16 and 17 at ISO 100, both steps just look like the same noise at ISO 6400.
EOS 1D X, EOS 7D, and lots of lenses
_____________________________
Flickr | TDP Profile/Gear List

#### 3kramd5

• Rebel T4i
• Posts: 173
##### Re: Calculating Dynamic Range
« Reply #9 on: March 12, 2012, 02:56:48 PM »
Noise is fundamental in determining the bottom end of the DR.  The idea is that DR is range between the highest measurable brightness and the lowest measureble darkness.  Highest measurable brightness is easy - you just fill all the wells, they have a capacity in terms of number of electrons they hold (say, 30,000 e-, for example).  But at the low end, noise is the determining factor.  Are 3 photons enough to generate a signal?  10?  30?

Awesome. It's clicking now. Thanks.
5D2+40D+EF 50/1.4+EF 24-70/2.8+Sigma 70-200/2.8
RIP: EF 24-105/4

#### wickidwombat

• 1D X
• Posts: 3586
##### Re: Calculating Dynamic Range
« Reply #10 on: March 12, 2012, 08:00:16 PM »
I do enjoy watching the arguments that erupt because somebody over analyzed a black pixel and therefore concluded that the 5D3 has the same DR as the Apple QuickTake, or that Nikon cameras have 250 more stops of DR than Canon cameras. Pretty funny stuff.

this made me really LOL nice one!
APS-H Fanboy

#### epsiloneri

• 7D
• Posts: 330
##### Re: Calculating Dynamic Range
« Reply #11 on: March 12, 2012, 10:25:02 PM »
The "calculated" claims based on black and white pixels or frames are generally wrong because the test and formula are wrong to begin with.

I found this interesting, could you elaborate? What are the formulae, and what's wrong with them?

#### YellowJersey

• Rebel T4i
• Posts: 119
##### Re: Calculating Dynamic Range
« Reply #12 on: March 12, 2012, 10:30:33 PM »
Personally, I think it's premature to say anything definitively about the 5D3/D800 in terms of DR until the cameras are actually released and guys like DxO have had a chance to do a proper test. I'm ignoring the DR debate because it's largely speculative, and I don't think the few samples we've been given are enough to really come to any firm conclusions. If this were something to make you consider switching to Nikon, it would be prudent to wait until the cameras are released and we have more conclusive information. It's a bit premature to bail to Nikon at this point.

#### V8Beast

• 1D Mark IV
• Posts: 838
##### Re: Calculating Dynamic Range
« Reply #13 on: March 12, 2012, 10:51:16 PM »
The approach of taking a blown out frame and a completely dark frame is valid for calculating DR, but there are inherent assumptions in that calculation (equivalent response between the frames, etc.).  The calculated DR is almost always going to be greater than the 'usable DR' (i.e. what you can actually see in an image), since the bottom end of the calculated range is set by the noise floor, and regions only slightly brighter than that might not separate from the noise.

The alternate method you suggest I'd call measuring DR, as opposed to calculating it.  IMO, measuring is the better way to test DR - that gives you an actual test of the usable DR.

Practically, it's pretty easy - you just need a step wedge (like the Stouffer T2115 or T4110, they cost about \$10) and a bright, homogeneous backlight.  For example, below is a crop from the setup I use.  The T2115 is on the left, on the right is a chrome-on-glass USAF 1951-type resolution target (which I use for microscope imaging resolution testing).  You set the exposure so the transparent top part of the wedge is just at the clipping point, and see how many stops you can distinguish down to the other end (each step on the scale is 0.5 stops for the T2115).

Great info! Have you used the step wedges on your 7D and 5DII, and if so, how do their measured DR compare to their calculated DR?

#### neuroanatomist

• 1D X
• Posts: 8591
##### Re: Calculating Dynamic Range
« Reply #14 on: March 12, 2012, 11:59:32 PM »
Great info! Have you used the step wedges on your 7D and 5DII, and if so, how do their measured DR compare to their calculated DR?

I have.  Both are less than the calculated DR, in my step wedge tests coming in at about 9 stops at ISO 100 (no difference between them), and (as expected) decreasing with increasing ISO.
EOS 1D X, EOS 7D, and lots of lenses
_____________________________
Flickr | TDP Profile/Gear List

#### canon rumors FORUM

##### Re: Calculating Dynamic Range
« Reply #14 on: March 12, 2012, 11:59:32 PM »