Dynamic range and RAW file "bit depth"

Started 9 months ago | Questions
szhorvat
Forum MemberPosts: 66
Like?
Dynamic range and RAW file "bit depth"
9 months ago

Most cameras can record the sensor data with at most 14 bits of resolution.  This means that the ratio of the lowest and highest representable values is 2^14.

The dynamic range of a sensor is the ratio between the brightest and dimmest recordable light intensity (or clipping and noise floor).  I notice that DxOMark lists several sensors as having a dynamic range larger than 14 EV, e.g. the Nikon D800 has 14.4 EV, which corresponds to a ratio of 2^14.4.

How can they measure a dynamic range higher than the resolution of the sensor readout?  If the sensor response is strictly linear, this shouldn't be possible.

So is the answer that the sensor response is not linear?  Is this nonlinearity inherent to how the sensor works, or is it a designed feature aimed at increasing the dynamic range?

I'm asking this for my own edification, not because I need the information to accomplish anything.

ANSWER:
This question has not been answered yet.
xpatUSA
Senior MemberPosts: 3,537Gear list
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to szhorvat, 9 months ago

szhorvat wrote:

Most cameras can record the sensor data with at most 14 bits of resolution. This means that the ratio of the lowest and highest representable values is 2^14.

The dynamic range of a sensor is the ratio between the brightest and dimmest recordable light intensity (or clipping and noise floor). I notice that DxOMark lists several sensors as having a dynamic range larger than 14 EV, e.g. the Nikon D800 has 14.4 EV, which corresponds to a ratio of 2^14.4.

How can they measure a dynamic range higher than the resolution of the sensor readout? If the sensor response is strictly linear, this shouldn't be possible.

So is the answer that the sensor response is not linear? Is this nonlinearity inherent to how the sensor works, or is it a designed feature aimed at increasing the dynamic range?

I'm asking this for my own edification, not because I need the information to accomplish anything.

Perhaps it would be best to start at the sensor, that is to say the well capacity expressed in electrons. One of my cameras has a stated well capacity of 77,000 electrons (e-) at saturation. This is just over 16-bits worth which, as you know, is 65,536 (including 0). So my sensor could have a dynamic range of log10(77000/1)/log2 = 16.23 EV, all other things notwithstanding . . . . .

Now, suppose I throw in the stated noise floor of 70e-, then my sensor real dynamic range is more like 10 EV or so.

If I now present my sensor output with it's 10 EV range to an 8-bit ADC is the sensor dynamic range any different than if it is presented to a 14-bit ADC? My point is that ADC resolution does not affect sensor dynamic range, IMHO.

Disclaimer: I don't go to DXOMark very often.

-- hide signature --

"Engage Brain before operating Keyboard!"
Ted

 xpatUSA's gear list:xpatUSA's gear list
Sigma SD9 Sigma SD10 Sigma SD14 +2 more
Reply   Reply with quote   Complain
szhorvat
Forum MemberPosts: 66
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to xpatUSA, 9 months ago

xpatUSA wrote:

In other words, if I present my sensor output with it's theoretical 16.23 EV range to an 8-bit ADC is the sensor dynamic range any different than if it is presented to a 14-bit ADC?

Disclaimer: I don't go to DXOMark very often. And I'm not sure that I've answered the question.

I'll say: For practical purposes, yes, the dynamic range will be smaller in that case, provided that the digitization is done in a linear way.  The smallest number of electrons we could measure (by looking at the digitized signal) will be 77000/2^8 = 300.  It won't be possible to see the difference between 200 or 400 electrons, as all will be rounded to the same 300.

Unless ... we take the "dithering" done by natural noise into account.  Which I didn't think of.

Or unless the digitization is done in a nonlinear way, i.e. out of the 2^8 = 256 values, 1 will correspond to something smaller than 300 to have a higher resolution in the dim range.  So another possibility is that the sensor itself it linear but the digitization is done in a non-linear way.

Or maybe there was something else I didn't think of.  Which is why I asked the question

Thanks for taking the time to reply.

Reply   Reply with quote   Complain
completelyrandomstuff
Regular MemberPosts: 170Gear list
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to szhorvat, 9 months ago

this is an interesting though. The sensors do not record linearly. There is more data represented in highlights than in the shadows. That's why cameras with higher bit-depth resolve better in the deep shadows.

Not every charge value has to be represented by a bit. Digitization always takes a range of analogue values and lumps them together. Digitization is a measure of 'accuracy' of representation of electron charges, much like number of pixels on a screen are a measure of accuracy of representation of a real object.

 completelyrandomstuff's gear list:completelyrandomstuff's gear list
Olympus E-510 Pentax K-30 Olympus PEN E-PM2 Pentax smc DA 16-45mm F4 ED AL Sigma 10-20mm F4-5.6 EX DC HSM +1 more
Reply   Reply with quote   Complain
xpatUSA
Senior MemberPosts: 3,537Gear list
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to szhorvat, 9 months ago

szhorvat wrote:

xpatUSA wrote:

In other words, if I present my sensor output with it's theoretical 16.23 EV range to an 8-bit ADC is the sensor dynamic range any different than if it is presented to a 14-bit ADC?

Disclaimer: I don't go to DXOMark very often. And I'm not sure that I've answered the question.

I'll say: For practical purposes, yes, the dynamic range will be smaller in that case, provided that the digitization is done in a linear way. The smallest number of electrons we could measure (by looking at the digitized signal) will be 77000/2^8 = 300. It won't be possible to see the difference between 200 or 400 electrons, as all will be rounded to the same 300.

Thanks for taking the time to reply.

Sorry, I was editing while you were typing. But anyway, it's not now clear to me whether we are talking about just the sensor dynamic range, or some other dynamic range.

I interpreted the term "sensor dynamic range" to mean exactly what it says without the complication of the following ADC. Easier for me to visualize because my Foveon sensor has real analog outputs, 0-550mV (77,000 x 7.14uv/e-).

-- hide signature --

"Engage Brain before operating Keyboard!"
Ted

 xpatUSA's gear list:xpatUSA's gear list
Sigma SD9 Sigma SD10 Sigma SD14 +2 more
Reply   Reply with quote   Complain
completelyrandomstuff
Regular MemberPosts: 170Gear list
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to completelyrandomstuff, 9 months ago

And dynamic range is a little bit more finnicky definition than just the span between the top and the floor. Mostly, because the floor depends on your definition of whether information is present or not. DXOMark uses a signal to noise ratio of 1:1, other places use 1:2, yet others even higher values for delineating a high quality dynamic range.

Here's lots of good technical info on all these terms:
http://www.clarkvision.com/articles/digital.sensor.performance.summary/#full_well

 completelyrandomstuff's gear list:completelyrandomstuff's gear list
Olympus E-510 Pentax K-30 Olympus PEN E-PM2 Pentax smc DA 16-45mm F4 ED AL Sigma 10-20mm F4-5.6 EX DC HSM +1 more
Reply   Reply with quote   Complain
szhorvat
Forum MemberPosts: 66
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to completelyrandomstuff, 9 months ago

I found this  about linearity.  The plots show what you said: it's linear in the shadows and the highlights are compressed.  I wonder if this compression is engineered in some way (it would make sense to do it).

Reply   Reply with quote   Complain
completelyrandomstuff
Regular MemberPosts: 170Gear list
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to xpatUSA, 9 months ago

Two things, digitization is not done linearly. But more importnatly, I think the camera with 77000 electron capacity could have more dynamic range than 16.23EV, for example in case when the last few electrons filling in the well needed more light per electron than the previous ones. I would be surprised if it was a linear relationship, but I am not able to find the relationship between the photon flux and the well filling at a fixed exposure.

 completelyrandomstuff's gear list:completelyrandomstuff's gear list
Olympus E-510 Pentax K-30 Olympus PEN E-PM2 Pentax smc DA 16-45mm F4 ED AL Sigma 10-20mm F4-5.6 EX DC HSM +1 more
Reply   Reply with quote   Complain
szhorvat
Forum MemberPosts: 66
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to xpatUSA, 9 months ago

xpatUSA wrote:

Sorry, I was editing while you were typing. But anyway, it's not now clear to me whether we are talking about just the sensor dynamic range, or some other dynamic range.

I interpreted the term "sensor dynamic range" to mean exactly what it says without the complication of the following ADC. Easier for me to visualize because my Foveon sensor has real analog outputs, 0-550mV (77,000 x 7.14uv/e-).

I was talking about the (digital) information that's actually possible to get from the camera, not just the sensor without any ADC.  This is what's practically relevant and this is what I believe DxO uses.  I don't think they de-solder the sensors and try to use them separately.  I believe they extract information from the camera as RAW files.  I'll admit that these are all just assumptions on my part though, I do not know what their methodology is.

Reply   Reply with quote   Complain
completelyrandomstuff
Regular MemberPosts: 170Gear list
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to szhorvat, 9 months ago

That would make sense. The nonlinearity will begin the moment there are interactions between the electrons deficiency in the well. It takes more energy to remove an electron from a more negatively charged body. So that 'compression' is not necessarily engineered, I think it's a consequence of physics.

However, the way you digitize the signal, is engineered. The camera devotes the least digitization levels to lowest signals and that should, in theory compensate for the nonlinearity of the relationship between photon flux and well filling.

This is why DXO reports the  S/N ratio at 18% btw. This 18% corresponds to 50% gray.

 completelyrandomstuff's gear list:completelyrandomstuff's gear list
Olympus E-510 Pentax K-30 Olympus PEN E-PM2 Pentax smc DA 16-45mm F4 ED AL Sigma 10-20mm F4-5.6 EX DC HSM +1 more
Reply   Reply with quote   Complain
completelyrandomstuff
Regular MemberPosts: 170Gear list
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to szhorvat, 9 months ago

The digitization is not determining the dynamic range, the well filling (number of electrons one can store) and the function between the number of electrons and the number of photons hitting the photo site determines that. So I think he/she was going in the right direction, but the assumption that photon/electron filling is linear is not correct.

 completelyrandomstuff's gear list:completelyrandomstuff's gear list
Olympus E-510 Pentax K-30 Olympus PEN E-PM2 Pentax smc DA 16-45mm F4 ED AL Sigma 10-20mm F4-5.6 EX DC HSM +1 more
Reply   Reply with quote   Complain
completelyrandomstuff
Regular MemberPosts: 170Gear list
Like?
This is a really clear explanation
In reply to szhorvat, 9 months ago
 completelyrandomstuff's gear list:completelyrandomstuff's gear list
Olympus E-510 Pentax K-30 Olympus PEN E-PM2 Pentax smc DA 16-45mm F4 ED AL Sigma 10-20mm F4-5.6 EX DC HSM +1 more
Reply   Reply with quote   Complain
completelyrandomstuff
Regular MemberPosts: 170Gear list
Like?
Another good one
In reply to completelyrandomstuff, 9 months ago

this shows how different bit depths can have the same dynamic range, under 'tonal sampling'

http://www.astropix.com/GADC/SAMPLE3/SAMPLE3.HTM

 completelyrandomstuff's gear list:completelyrandomstuff's gear list
Olympus E-510 Pentax K-30 Olympus PEN E-PM2 Pentax smc DA 16-45mm F4 ED AL Sigma 10-20mm F4-5.6 EX DC HSM +1 more
Reply   Reply with quote   Complain
szhorvat
Forum MemberPosts: 66
Like?
Re: This is a really clear explanation
In reply to completelyrandomstuff, 9 months ago

completelyrandomstuff wrote:

http://www.earthboundlight.com/phototips/nikon-d300-d3-14-bit-versus-12-bit.html

That's an interesting read.  I normally keep my camera set to record 12-bit RAW to save space. Based on the article it's easier to decide in what situation it's worth changing that to 14 temporarily ...

Reply   Reply with quote   Complain
completelyrandomstuff
Regular MemberPosts: 170Gear list
Like?
Re: This is a really clear explanation
In reply to szhorvat, 9 months ago

In case you want to pull shadows, in case you want to burn/dodge heavily or drastically increase the saturation. In extreme cases you might get posterization with a lower bit detph, but more so in dark parts of the image.

I posted it because it explains the nonlinear relationship between analogue signal on the well and a number of bits per every threshold of this signal.

 completelyrandomstuff's gear list:completelyrandomstuff's gear list
Olympus E-510 Pentax K-30 Olympus PEN E-PM2 Pentax smc DA 16-45mm F4 ED AL Sigma 10-20mm F4-5.6 EX DC HSM +1 more
Reply   Reply with quote   Complain
gollywop
Veteran MemberPosts: 5,691
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to szhorvat, 9 months ago
Reply   Reply with quote   Complain
xpatUSA
Senior MemberPosts: 3,537Gear list
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to completelyrandomstuff, 9 months ago

completelyrandomstuff wrote:

The digitization is not determining the dynamic range, the well filling (number of electrons one can store) and the function between the number of electrons and the number of photons hitting the photo site determines that. So I think he/she was going in the right direction, but the assumption that photon/electron filling is linear is not correct.

Nice of you to say so, but I never actually said the sensor characteristic is linear. And, since my name is Ted, the assumption can made that I am a 'he'

My information is taken from a paper about my camera's sensor, do read on:

"Well capacity is approximately 77,000 electrons per photodiode but the usual operating point (for restricted nonlinearity) corresponds to about 45,000 electrons. Photo response non-uniformity (PRNU) is less than ±1%. Several fixed-pattern and random noise reduction techniques have been incorporated into the F7 design to realize very good noise performance for the CMOS technology. The total fixed pattern noise from all sources is less than ±1%. The primary contributor to dark noise is ktC noise from diode reset. This noise is approximately 70 electrons. It is possible to reduce this to about 40 electrons by implementing a reset-read-expose-read cycle for the frame and then subtract the first frame from the second."

-- hide signature --

"Engage Brain before operating Keyboard!"
Ted

 xpatUSA's gear list:xpatUSA's gear list
Sigma SD9 Sigma SD10 Sigma SD14 +2 more
Reply   Reply with quote   Complain
xpatUSA
Senior MemberPosts: 3,537Gear list
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to szhorvat, 9 months ago

szhorvat wrote:

xpatUSA wrote:

Sorry, I was editing while you were typing. But anyway, it's not now clear to me whether we are talking about just the sensor dynamic range, or some other dynamic range.

I interpreted the term "sensor dynamic range" to mean exactly what it says without the complication of the following ADC. Easier for me to visualize because my Foveon sensor has real analog outputs, 0-550mV (77,000 x 7.14uv/e-).

I was talking about the (digital) information that's actually possible to get from the camera, not just the sensor without any ADC. This is what's practically relevant and this is what I believe DxO uses. I don't think they de-solder the sensors and try to use them separately. I believe they extract information from the camera as RAW files. I'll admit that these are all just assumptions on my part though, I do not know what their methodology is.

Do pardon my mis-interpretation of "The dynamic range of a sensor is the ratio between the brightest and dimmest recordable light intensity". I missed the word "recordable". Tsk!

-- hide signature --

"Engage Brain before operating Keyboard!"
Ted

 xpatUSA's gear list:xpatUSA's gear list
Sigma SD9 Sigma SD10 Sigma SD14 +2 more
Reply   Reply with quote   Complain
The_Suede
Contributing MemberPosts: 584
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to szhorvat, 9 months ago

szhorvat wrote:

xpatUSA wrote:

In other words, if I present my sensor output with it's theoretical 16.23 EV range to an 8-bit ADC is the sensor dynamic range any different than if it is presented to a 14-bit ADC?

Disclaimer: I don't go to DXOMark very often. And I'm not sure that I've answered the question.

I'll say: For practical purposes, yes, the dynamic range will be smaller in that case, provided that the digitization is done in a linear way. The smallest number of electrons we could measure (by looking at the digitized signal) will be 77000/2^8 = 300. It won't be possible to see the difference between 200 or 400 electrons, as all will be rounded to the same 300.

Unless ... we take the "dithering" done by natural noise into account. Which I didn't think of.

Or unless the digitization is done in a nonlinear way, i.e. out of the 2^8 = 256 values, 1 will correspond to something smaller than 300 to have a higher resolution in the dim range. So another possibility is that the sensor itself it linear but the digitization is done in a non-linear way.

here you ask the correct question:

Or maybe there was something else I didn't think of. Which is why I asked the question

Thanks for taking the time to reply.

DR is a statistics result or value. When you have integer data only, like if you count the average amount of perfect marbles present in 1000 bowls, you can still get fraction results. Like "14.8467 marbles per bowl". Even though the base unit is by necessity only possible in whole numbers. A perfect marble is either there or not, one or zero.

This also means that if only one in maybe around five bowls contains a perfect marble, you get an average amount that is a fraction of one, like 0.195 or something. Which is both possible from an average point of view, and impossible from a practical point of view for each individual bowl. 0.195 marbles is a broken marble, which is contradictory to the counting rule we set up.

the same is true for bits and photons. If only one in five positions contains an error of "one", the average is 0.2. Lower than the lowest possible quanta of the measurement unit.

and when the average measurement error is smaller than the lowest definable step in your metric, you get an average measurement resolution that is higher than what your metric defines. Then the value tells you how often the error occurs in stead of how many errors per instance you will get.

Reply   Reply with quote   Complain
completelyrandomstuff
Regular MemberPosts: 170Gear list
Like?
Re: Dynamic range and RAW file "bit depth"
In reply to xpatUSA, 9 months ago

misread, I remembered something about 'if the digitization is linear' in that text. sorry if I offended you.

 completelyrandomstuff's gear list:completelyrandomstuff's gear list
Olympus E-510 Pentax K-30 Olympus PEN E-PM2 Pentax smc DA 16-45mm F4 ED AL Sigma 10-20mm F4-5.6 EX DC HSM +1 more
Reply   Reply with quote   Complain
Keyboard shortcuts:
FForum MMy threads