Jump to content

Film vs Digital - Dynamic Range


Recommended Posts

<p>To all: As Max's example illustrates the limiting effect that I am trying to describe rather than refuting it, please feel free to re-do it to show your version of how a 4-bit ADC can represent more than a 16:1 dynamic range. I think that it is worth showing.</p>

<p>Best,<br>

Helen</p>

Link to comment
Share on other sites

  • Replies 900
  • Created
  • Last Reply

Top Posters In This Topic

<p>Well, there's been a lot of activity since I have last been here. Couple of points:<br>

Helen, thanks for taking over the front-line fight.<br>

Max, thanks for chipping in, but if you are going to just lob in and pick a side, please read the full thread first. Your example (I will give you credit for giving an example, as only Rishi had previously given a proper example), is basically the same as Rishi's example from earlier. I have rebutted this example 2 times now, and no one has suggested my rebuttal was wrong. But for your benefit I will restate what I have said about it: You example isn't reflected in REALITY. NO one is denying that it COULD be this way if we wanted it to be. But the fact is, that in most dslr's, it ISN'T this way. There is a DIRECT linear relationship between light input and binary output. When you halve exposure, you halve the output. Plain and simple. I suspect if a few more people in this thread had actually studied linear raw data, we wouldn't be having this argument.<br>

This debate now seems to be either going over old-ground or is getting bogged down in this question of whether 0 can be the lower bound of a dynamic range. This question is undoubtedly interesting, but it isn't relevant for the real world of photography, as noise is the lower bound. But even if we argue this from a theoretical level and accept that 0 is the lower bound, it still doesn't change the fact that the number of stops (for this is what this argument REALLY started about - just for the benefit of those who lobbed in late and didn't read the entire thread) that can be ACCURATELY (as opposed to <em>precisely</em> - which many want to argue about (for those that do, there is no argument about the precision question. We are all in agreement)) represented in a digital file, is limited to the bit-depth of the ADC (if we assume that the photosite saturates at the upper limit of the ADC). I showed this in my last post on 9th of December 5.45am, and no one responded to it. So for the benefit of keeping this discussion based in the real world I will post what I wrote and hope that someone can address it:</p>

 

<blockquote>

<p>I'll do an example - 8 stop scene; 4 bit converter; max ADC voltage 1024 (for no particular reason); and let's exclude noise from the calc:<br>

Input : Output<br />1024 : 16<br />512 : 8<br />256 : 4<br />128 : 2<br />64 : 1<br />32 : 1<br />16 : 0<br />8 : 0<br />and so on....<br>

So in this example, in the absence of noise, with an 8 stop scene you could only record 4 stops accurately, and the 5th stop inaccurately, and all other stops with ZERO accuracy.</p>

 

</blockquote>

<p>So to repeat what I was on about, the theoretical dynamic range of 8 bits may very well be infinity if we accept that 0 is the lower bound, but the number of stops that can be represented ACCURATELY by a 4 bit converter is only 4 stops (and this is the crux of what the argument was about from the begining). </p>

<p>Can someone please address this point (and preferably with an example too). Cheers.</p>

 

Link to comment
Share on other sites

<p>Rob,</p>

<p>That's right. I was mapping the ADC output values to what they might represent.</p>

<p>I'm not really imposing anything - I'm just trying to present the consequences of applying the various transforms and algorithms that appear to have been implemented in most digital cameras. Give me a moment (or three) to finish the almost real world re-work of Max's example, and it may be easier to discuss.</p>

<p>Best,<br>

Helen</p>

Link to comment
Share on other sites

<p>I've just noticed something in my example. My output range is from 0 - 16. Clearly this needs to be either 0-15 or 1-16. Let's change it to 0-15 for the sake of the zero lower bound argument. What do we get:<br>

1024 => 15<br>

512 => 8<br>

256 => 4<br>

128 => 2<br>

64 => 1<br>

32 => 0<br>

16 => 0<br>

8 => 0<br>

4 => 0<br>

and so on... (if you want to assume that scene dynamic range and photodetector dynamic range is infinity).</p>

<p>Still 4 stops accurately (close enough) recorded, and every stop from then on recorded with ZERO accuracy. Thoughts?</p>

Link to comment
Share on other sites

<p>So, a 4-bit converter only has enough resolution to distinguish among 4 stops. I'm still not sure what your definition of 'ACCURATE' is. For photographic purposes, I wouldn't say the 4 stops (let alone 8 stops) would be very accurately described with a 4-bit converter.</p>
Link to comment
Share on other sites

<p>Rob, 'accurate' means that a halving of input luminance is more-or-less matched by a halving of output digital histogram value. This occurs for the first 4 stops, but after that, all subsequent stops no longer result in a halving of the output results, because the output result is INTEGER and has no value BETWEEN 0 and 1. So the mapping of input to output after 4 stops must go to either 1 or 0. If you use a normal rounding proceedure, you get 4 stops accurate, then every stop after that to infinity maps to the same brightness value in the image.</p>
Link to comment
Share on other sites

<blockquote>

<p>I wouldn't say the 4 stops (let alone 8 stops) would be very accurately described with a 4-bit converter</p>

 

</blockquote>

<p>Rob, what you really mean, I think, is <em>precision. </em>The precision of a 4 bit converter would be low when compared to a higher bit converter.</p>

Link to comment
Share on other sites

<p><em>Rob: She was mapping ADC output values (0-255) to what they might represent.</em><br>

<br /> I thought that is what I was doing as well:<br /> <br /> >0 = 0 (value greater than 0 reads out 0)<br /> >391 = 1 (value greater than 391 reads out 1)<br>

<br /> But maybe I should have been more precise about it:<br>

<br /> Signal ADC output<br /> 0 < v_i < 391: 0<br /> 391 < v_i < 781: 1<br>

<br /> and so on.</p>

<p>The point I was making is that there are comparators that compare signal voltage to preset values; these comparators are not at the average of a range (like at 195 mv for a 0 to 391 mv range) but at the endpoints of the range, i.e, at 0 mV (or whatever the noise threshold of the ADC analog part is, by design significantly smaller than the noise floor of the transducer that drives the ADC's input - low noise ADCs have their noise floor in the nanovolt range), 391 mV etc.<br>

<br /> So for the purposes of calculation of dynamic range, we can't take the average values of a range like Helen did with Rob's example; we have to take smallest signal voltage that will make the first threshold trip for the min of the dynamic range; and the largest signal voltage that will not cause an overflow (i.e., if there was an n+1th bit, the largest voltage that won't trip that threshold) as the max of the dynamic range.<br>

<br /> So lets say we have this table for 2 bit ADC:<br /> <br /> 1 uV - 255 mV : 0 (yes, that is 1 microvolt - a possible noise floor of the <em>ADC</em> )<br /> 256 mV - 511 mV : 1<br /> 512 mV - 767 mV : 2<br /> 768 mV - 1023 mV : 3<br /> <br /> Now an ADC will have one more output (at least) that indicates that the signal is within the range that the ADC can handle. Below 1 uV and over 1023 mV, this signal will be negated to indicate that the input is out of conversion range. When this signal is negated, the value output of the ADC is considered "don't care", i.e, the bit meanings are undefined.<br /> <br /> Now assume that we have a variable DC voltage source that is connected to the input of this ADC; at the beginning this voltage source puts out 0 V (say because a switch is open). This will cause the ADC to negate its "in range" signal indicating that the input voltage range is out of range. Then, as you turn the voltage knob of the source up, as soon as the voltage hits 1 uV, the first threshold of the ADC will be met, it will assert its "in range" signal and put out the value 0.<br /> <br /> As you keep increasing the voltage, when it hits the next threshold, you get the next value and so on. When you hit the final threshold of 768 mV, the ADC reads out 3. But you can still keep increasing the input voltage until you hit 1023 mV. At this point the ADC negates its "in range" signal.<br /> <br /> The reason this is done here (and not at the previous threshold or middle of the range etc) is because if you had an 3 bit ADC that could accept upto 2047 mV, 1024 mV would have been its threshold to move to the next higher value (4).<br /> <br /> Thus, your range is 1 uV - 1023 mV. Express this as a ratio or an ordered pair, or however you like.<br>

<br /> Now if we move to a 3-bit ADC with the same input range, the table looks like:<br /> <br /> 1 uV - 127 mV : 0<br /> 128 mV - 255 mV : 1<br /> 256 mV - 383 mV : 2<br /> 384 mV - 511 mV : 3<br /> 512 mV - 639 mV : 4<br /> 640 mV - 767 mV : 5<br /> 768 mV - 895 mV : 6<br /> 896 mV - 1023 mV : 7<br /> <br /> Once again, the minimum is 1 uV and the maximum is 1023 mV, with the exact same DR. Please note here that although I indicated ranges like 384 - 511 mV and 512 mV - 639 mV for the next range, in reality there is just one threshold at 512 mV. A very tiny voltage above it (slightly larger than the noise floor of the ADC itself) will trigger it to generate the next higher value. Thus the ranges should properly be expressed thus:<br /> <br /> 128 mV - 256 mV : 1<br /> 256 mV - 384 mV : 2<br /> <br /> etcetera.<br>

<br /> Also please note that the noise floor of the ADC will be significantly lower than that of the transducer that drives it. This will be done by design so that the ADC's noise doesn't limit the transducer's performance. There are ADCs with a noise floor well in the nanovolt region. Also note that I chose a nonzero noise floor for the ADC's input, but nothing changes (except that the ADC now has in infinite input DR, and becomes a strictly theoretical construct. The ADCs I described can actually be built.)<br>

<br /> Hopefully this sheds some light on how to calculate the dynamic range of an ADC's analog input.</p>

Link to comment
Share on other sites

<p>A reference from Texas Instruments: <a title="Sensor to ADC design" href="http://focus.ti.com/download/trng/docs/seminar/sigcond_3.pdf;jsessionid=XG21WFR5BWBURQC1JAVB3KQ" title="Sensor to ADC design">Sensor to ADC design example</a> . Go through it if you want the engineering nitty gritty.</p>

<p>I'll post some more references about the design of ADCs later.</p>

Link to comment
Share on other sites

<p>Vijay,</p>

<p><em>"Thus, your range is 1 uV - 1023 mV. Express this as a ratio or an ordered pair, or however you like.<br /> <br /> Now if we move to a 3-bit ADC with the same input range, the table looks like:<br /> <br /> 1 uV - 127 mV : 0<br /> 128 mV - 255 mV : 1<br /> 256 mV - 383 mV : 2<br /> 384 mV - 511 mV : 3<br /> 512 mV - 639 mV : 4<br /> 640 mV - 767 mV : 5<br /> 768 mV - 895 mV : 6<br /> 896 mV - 1023 mV : 7<br /> <br /> Once again, the minimum is 1 uV and the maximum is 1023 mV, with the exact same DR."</em></p>

<p>No arguments there, except for one small point. Every input value at or below 127 mV is output as 0; every input value of 896 mV or above is output as 7. We agree on that. The dynamic range of the ADC is 896/127 = 7. Call it 8 if you want. That's all it is. The dynamic range of the signal it accepts may be much higher, but it can't do anything with it.</p>

<p>If that was connected to a sensor with a 750 mV/lux s response, then any exposure below 0.17 lux s would record as featureless black and any exposure above 1.19 lux s would record as featureless white. That is still a 7:1 ratio, of course.</p>

<p>Best,<br>

Helen</p>

Link to comment
Share on other sites

Luminous Landscape and similar sites have dozens of test showing that a high-end full-frame DSLR will outresolve 35mm film by a considerable margin and resolve roughly equal to MF film. Not sure about DR, but comparing 35mm film to something other than a full-size sensor is stacking the deck against digital. Why not compare the film to a camera phone?
Link to comment
Share on other sites

<p><em>No arguments there, except for one small point. Every input value at or below 127 mV is output as 0; every input value of 896 mV or above is output as 7. We agree on that. The dynamic range of the ADC is 896/127 = 7. Call it 8 if you want. That's all it is. The dynamic range of the signal it accepts may be much higher, but it can't do anything with it.</em> <br /> <br /> I disagree. I already discussed why the comparator threshold points are taken as the endpoints. You need to do so to ensure <em>extensibility</em> : if you doubled the max voltage that could be handled, and doubled the bit depth, but still fed in a signal of magnitude 1023 mV, you'd be using half the dynamic range, not the ratio of 896/127.<br>

<br /> Maybe this is a convention; but if we did what you say, then a 4-bit ADC that could handle 2047 mV would have two discrete dynamic ranges: one from 127 mV to 896 mV and the other from 1151 mV to 2043 mV, with a "dead zone" in the middle.<br /> <br /> Then why stop at 2 discrete ranges? Why not four? Why not eight?<br /> <br /> Ranges need to be defined such that they are extensible; thus the startpoint of one has to be the endpoint of the previous and so on.<br /> <br /> Also, the ADC can't distinguish between 1 uV and 127 mV, but that doesn't mean it can't recognize 1 uV, so you really can't use 127 uV as the min of the range. Similarly it may not be able to distinguish between 896 mV and 1023 mV, but that doesn't mean that it doesn't recognize that the 1023 mV is just below its "out of range" threshold.<br /> <br /> Finally, the engineering methodology is straightforward - the threshold points as I described.</p>

Link to comment
Share on other sites

<p>Vijay, I think the critical point Helen is trying to make is this statement of hers:</p>

<blockquote>

<p>No arguments there, except for one small point. Every input value at or below 127 mV is output as 0; every input value of 896 mV or above is output as 7.</p>

 

</blockquote>

<p>This is the crucial point of both our arguments. Now I know Helen wants to take you on the issue of the bounds of dynamic range, but to both of you I will say again, this isn't important in this argument (other than for interest's sake). What matter's is how inputs are mapped to outputs. I've explained this again in my latest posts and no one has made a comment (I know you are probably ignoring me Vijay, but for the sake of everyone who reads this thread, or jumps in at a later date, you should touch on these issues. Let me say that if you promise to stop being condescending, I will stop taking cheap shots at you. What do you say?). Should I assume I am right and the argument is over?</p>

Link to comment
Share on other sites

<p>Bernie, I already explained why you can't take 127 mV and 896 mV for the range; it creates discontinuous ranges if extended.</p>

<p>I did show exactly how inputs are mapped to outputs for an ADC. I don't want to get into the photodiode aspect of it, because depending on photodiode biasing one can get linear or nonlinear results. If you merely assume that the photodiode is perfectly linear, and its noise floor is exactly the same as that of the ADC (choose a higher noise floor than 1 uV if you want) then I could simply deal with the ADC without getting into the photodiode operation.</p>

<p>And I'm not ignoring you, which is evidenced by this post. I was never condescending with you or anyone else. If I'm explaining simple things, then it is because I believe there are other readers who may not know any of this stuff, and I'd rather not appear arrogant and elitist to them. Also I don't know your background, so I don't know what level of math or complexity I can go to before you accuse me of hiding behind "technical mumbo jumbo" (and if I recall correctly, that has been done). So take my word for it: I'm not being condescending, nor was I ever.</p>

<p>The argument is almost over, just waiting to see if you and Helen agree with the usual (and mine as well) view of choosing range endpoints.</p>

Link to comment
Share on other sites

<blockquote>

<p>Bernie, I already explained why you can't take 127 mV and 896 mV for the range; it creates discontinuous ranges if extended.</p>

 

</blockquote>

<p>Not sure what your saying. I don't really care about the ranges as such, it's what they map to that's important. I agree that there are a lot of stops of info that could be recorded between 127mV and 1uv, but it can't be output in an accurate way.</p>

Link to comment
Share on other sites

<p>Vijay,<br /> <br /> You can call dynamic range what you wish - you are happy to have zero as one of the bounds. The main problem I have with using 1 µV as the lower range is that this cannot be implemented in camera systems: it wouldn't work as a camera ADC like that - it would lead to parts of pictures that were not in range with no pixel value returned. You have to use a CCD-PGA-ADC (or CMOS) that never gives up like that and negates the in-range signal at either the upper or lower end. As I mentioned earlier, the noise will probably prevent that anyway.<br /> <br /> In summary, a camera can't go 'out of range' - something has to prevent that along the CCD-PGA-ADC path. Therefore there will be an input value below which everything will be black, and an input value above which everything will be white. In the example you gave for the 3-bit ADC, those limits will be 127 mV and 896 mV.<br /> <br /> Even if it was realistic to say that the lowest output value represented 1 µV to 127 mV, I would be wary of calling that a lower bound of 1 µV unless I worked in the Marketing Department. I'd be happier to take the mid point as a realistic end for the dynamic range, and happier still to disregard the 1 µV value and just use the 127 mV value. It all depends what you are using the dynamic range for - practical purposes or selling to the unwary.<br /> <br /> Best,<br /> Helen</p>
Link to comment
Share on other sites

<blockquote>

<p>I agree that there are a lot of stops of info that could be recorded between 127mV and 1uv, but it can't be output in an accurate way.</p>

 

</blockquote>

<p>You can never have perfect accuracy with any quantized system anyway - there is always quantization error (since an input <em>range </em> maps to only one value; e.g., 128 mv - 255 mV = 2 or whatever). You are throwing away information, even at the higher values. At lower stop values, you are throwing away more information relative to the signal itself, sometimes multiples of the signal. Therefore, you have to define dynamic range in a meaningful way with a system that takes a line and approximates it with a series of steps.</p>

<p>The meaningful way follows if you define the two values (min and max) meaningfully, given that several different signal values get compressed to one step. The standard methodology for this is to consider the "start point of the lowest step" and the "end point of the highest step" as referred to the continuous, analog input.</p>

<p>Not doing so creates discontinuities in the ranges, and that is obviously erroneous.</p>

Link to comment
Share on other sites

<p>Helen, that was an example of just the ADC. In fact, the ADC's noise floor will be significantly lower than that of the photodiode, amplifier etc. The overall system noise floor will be the sum of them all, which could and will be higher. I'm not in marketing, so I can't even begin to speculate on what they do to prey on naive customers.</p>

<p>I'm not calling dynamic range what I wish - I'm just sticking to the strict engineering definition. But lets go with what you say; what happens when we go from say 14 bits to 16 bits? The upper bound changes from 1022.9375 mV to 1022.984 mV; hardly what you would call a significant difference from 1023.</p>

<p>Thus even by your definition (which is quite nonstandard, and even erroneous because of the range discontinuities problem) there is no significant change going from 14 to 16 bits. The critical point is you are within the error margin imposed by the quantization process.</p>

<p>Quantization introduces an error - what you are doing is highlighting that error. Nobody is arguing with that, or that changing bit depth will have an effect on the quantization error. That is a given, but based on the standard definition, the dynamic range of the input signal that can be handled by an ADC is independent of its bit depth.</p>

<p>Please don't keep dismissing this as if it were my opinion. It isn't an opinion, and it isn't mine. It is the standard definition.</p>

Link to comment
Share on other sites

<p>Can we please stop talking about <em>engineering</em> dynamic range and talk about dynamic range that is relevant to photography. That is, <em>stops</em>. When we talk about dynamic range in photography we are talking about how many stops of brightness the system can handle/use. There is no point discussing dynamic range in the context of photography without it centring around the issue of exposure stops. Engineering definitions of dynamic range are surely interesting, but without relating it to stops, it is largely irrelavent to photography. As this is a photography forum, and the OP was about the dynamic range in STOPS of ektar vs 40D, can we please focus on exposure stops? If you think that we shouldn't be talking about stops, then can you please explain why.</p>
Link to comment
Share on other sites

<blockquote>

<p>You can never have perfect accuracy with any quantized system anyway</p>

</blockquote>

<p>I agree, but I am talking about ZERO accuracy. Once the ADC maps an output to 0, anything below the input which caused that mapping, will also map to 0. That is, you have totall loss of accuracy below that point. That is an important distinction. I would like to hear you or Ryan specifically address this point:</p>

<p><strong>How can an image file represent the stops of a scene that occur below the ADC output of 1, specifically addressing the reality that we generally see in dslrs - that is, linear relationship between input and output?</strong></p>

Link to comment
Share on other sites

<p>Vijay,</p>

<p><em>"But lets go with what you say; what happens when we go from say 14 bits to 16 bits? The upper bound changes from 1022.9375 mV to 1022.984 mV; hardly what you would call a significant difference from 1023.</em> <br /> <em>Thus even by your definition (which is quite nonstandard, and even erroneous because of the range discontinuities problem) there is no significant change going from 14 to 16 bits. The critical point is you are within the error margin imposed by the quantization process."</em><br>

<em><br /> </em><br>

Where do you get this from? I really wish that you would stop arguing against me by fabricating stuff and claiming that I have said it. You keep doing this, and then wonder why I get hostile.</p>

<p>Best,<br /> Helen</p>

Link to comment
Share on other sites

<p>Bernie, lets stop talking about ADCs and photodiodes then. They are the product of some pretty sophisticated electronics engineering; so any detailed discussion of these devices has to stick to some norms; as I understand, there is only one set of norms for these devices, and these are engineering norms.</p>

<p>Stops are just a log2 unit; the reality doesn't change if you use log2 units (stops) or log10 units (dB) or just a simple ratio. It doesn't matter that we in the US use miles and in Europe they use kilometers when referring to distances.</p>

<p>Photography as an end application doesn't change the way the devices behave; the photodiodes or ADC don't know or care that they are part of an imaging chain or of something else. If you want my opinion, we have been discussing engineering for a long time now in this thread, not photography.</p>

<p>As a photographer I am least concerned about, for instance <em>why </em> my camera has 8 stops of DR. All that matters is that it <em>does</em> , and how I can work with it to create images that are visually appealing. As a photographer, it is of no interest to me to know that film has 14 stops of dynamic range if I can't use it in my workflow.</p>

<p>No, we are deep into the engineering realm here.</p>

<p> </p>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...