I will soon have two a7II's, one modified for IR and one not. That should allow a test of your thought.Oh, my (again).FWIW, for the same reasons state above I don't think FWC is FWC; I think it's a function of wavelength.
Jim
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I will soon have two a7II's, one modified for IR and one not. That should allow a test of your thought.Oh, my (again).FWIW, for the same reasons state above I don't think FWC is FWC; I think it's a function of wavelength.
Bill, do you see systematic differences between the two G and the R and B channels when you're looking at optical black data in cameras that don't do WB prescaling like the Nikons do? If you do, it can't be wavelength dependent RN.Depending on the camera there may or may not be Optical Black (OB) data.
Depending on the camera the data in the image area and/or OB may or may not be clipped.
(Sadly, even data with a non-zero Blacklevel can be clipped).
For clipped data I do fit the histogram to a normal distribution.
Hi JACS. The formula is very simple: SNR = S/N, with S the signal in DN/ADU and N total noise also in DN/ADU. S is the mean value measured by Jim in a uniform patch of, say, 400x400 pixels, N is the relative standard deviation.First, which curve are you fitting to the data? The one I have seen depends on 3 parameters? Or more? Where is the formula?
SNR varies from, say, 250 to 1. The upper portion of the SNR curve, where xf >> r^2, turns into the square root of the signal: an easy to fit straight line of known slope in log-log. The shadow portion is the critical bit, because it is not linear. But it is two orders of magnitude lower than the easy to fit straight line.To my eyes, it looks like the second fit is also better in terms of least squares as well?
The reason least squares (L^2 norm) is commonly used is mostly because it is simple. Minimizing a quadratic functional leads to a linear system that can be solved in a fast and accurate way. Another reason, sometimes, is that the quadratic functional may have some physical meaning, like energy, for example.
You are minimizing the so called L^1 norm of the error, on a log scale. That leads to a non-linear system. Is it better - depends on what you want to do. In some applications, I think tomography is one of them, it is considered better. But that really depends on what that error signifies, and what we know about the statistical nature of the error.
Another option is to put some weight there. That weight should not depend on what we think is more important but on where we think the error of the measurements might be different. Say - we have a reason to believe that highlight measurements are more accurate - put more weight there then.
Getting interesting. This is what I get from Jim's subtracted/added pair data at ISO 400:For the D810 I get read noise in DN at ISO 400 of 5.396, 4.625, 4.672, 5.210 for R, Gr, Gb, and B respectively.However a bigger question is whether it makes sense to average the four channels at ISO 64 for the D810, especially given the fact that the red and blue data in the deep shadows appear to suffer from quantization somewhere along the chain to DN, putting some unwanted play into the fit, hence into RN and FWC estimates.
I understand. But (honest question) does it though? Shouldn't random read noise be the same for all four channels at base ISO? Is it at higher ISOs? I did a quick check of the D810 at ISO400 and it appears to be (sort of). And shouldn't FWC be the same for all four channels?For your purposes (you and Jim) that probably makes sense, and it's your decision.I wonder whether at base ISO the green channel should be it, period.
For my purposes I'm satisfied with combining the channels.
I'm less interested in an exact value as in how the read noise affects a normal image.
That's why I don't subtract pairs.
And that's why, for my purposes, combining channels makes sense.



So no non-uniformity noise?Hi JACS. The formula is very simple: SNR = S/N, with S the signal in DN/ADU and N total noise also in DN/ADU. S is the mean value measured by Jim in a uniform patch of, say, 400x400 pixels, N is the relative standard deviation.First, which curve are you fitting to the data? The one I have seen depends on 3 parameters? Or more? Where is the formula?
The model is SNR = xf/sqrt(r^2+xf)
with f=FWC in e-, r=RN in e- and x the signal as a factor of full scale (1 being full, as shown in the x-axis of the earlier plots)
I do not know where the noise and the uncertainty of the measurements is worse. If you are fairly sure that the measurements in the shadows is "accurate enough", choose that optimization which matches it better for the purpose of estimating the read noise. For estimating the FWC, you should be more worried about a better fit away from the shadows. Finding the right functional to minimize is art combined with intelligent guesses.SNR varies from, say, 250 to 1. The upper portion of the SNR curve, where xf >> r^2, turns into the square root of the signal: an easy to fit straight line of known slope in log-log. The shadow portion is the critical bit, because it is not linear. But it is two orders of magnitude lower than the easy to fit straight line.To my eyes, it looks like the second fit is also better in terms of least squares as well?
The reason least squares (L^2 norm) is commonly used is mostly because it is simple. Minimizing a quadratic functional leads to a linear system that can be solved in a fast and accurate way. Another reason, sometimes, is that the quadratic functional may have some physical meaning, like energy, for example.
You are minimizing the so called L^1 norm of the error, on a log scale. That leads to a non-linear system. Is it better - depends on what you want to do. In some applications, I think tomography is one of them, it is considered better. But that really depends on what that error signifies, and what we know about the statistical nature of the error.
Another option is to put some weight there. That weight should not depend on what we think is more important but on where we think the error of the measurements might be different. Say - we have a reason to believe that highlight measurements are more accurate - put more weight there then.
What would you suggest then?
I hate this idea because I would like the world to work perfectly according to our simple theories - which assume that read noise and shot noise (and pattern/PRNU which we are ignoring for now) add in quadrature and there are no other types of noise (pattern or quantization) present.I hesitate to bring this up because I don't feel like ripping all the code apart right now, but we could use the high mu values to compute FWC, and the low mu values to compute RN, and do one-dimensional optimization for both in single ISO mode instead of two-dimensional optimization. In all-ISO mode, we could do one dimensional optimization for FWC and two dimensional optimization for preAmp RN and postAmp Rn, instead of three-dimensional optimization.
Please say you hate this idea.
No, assuming un-truncated data, by subtracting image pairs you should pretty well be left mainly with random noise, minimizing (therefore ignoring here) most sorts of pattern noise including PRNU. Divide the standard deviation resulting from the subtraction by sqrt(2) and you have the denominator. The numerator is simply the mean value before subtraction.So no non-uniformity noise?The model is SNR = xf/sqrt(r^2+xf)
with f=FWC in e-, r=RN in e- and x the signal as a factor of full scale (1 being full, as shown in the x-axis of the earlier plots)
Right. And I think as long as there is no 'quantization' ringing it works pretty well. It's when there is some ringing that it bends the curve in the shadows and shifts the straight line in the highlights the wrong way.SNR varies from, say, 250 to 1. The upper portion of the SNR curve, where xf >> r^2, turns into the square root of the signal: an easy to fit straight line of known slope in log-log. The shadow portion is the critical bit, because it is not linear. But it is two orders of magnitude lower than the easy to fit straight line.
I do not know where the noise and the uncertainty of the measurements is worse. If you are fairly sure that the measurements in the shadows is "accurate enough", choose that optimization which matches it better for the purpose of estimating the read noise. For estimating the FWC, you should be more worried about a better fit away from the shadows. Finding the right functional to minimize is art combined with intelligent guesses.What would you suggest then?
A more careful analysis would include an estimate of the stability - how the estimates of the parameters depend on small errors, etc.
More often than not LSE seems to me to be less appropriate than the proposed alternative. I am going to look into Jim's suggestion of difference of logs squared.Still, don't you get a better least square fit as well? That would be weird.
I wouldn't expect any difference.I will soon have two a7II's, one modified for IR and one not. That should allow a test of your thought.Oh, my (again).FWIW, for the same reasons state above I don't think FWC is FWC; I think it's a function of wavelength.
Not at all, this is exactly the direction I was hoping the thread would go.bclaff wrote: FWIW, for the same reasons state above I don't think FWC is FWC; I think it's a function of wavelength.Do let me know if I'm dragging the thread Off-Topic (OT)Oh, my (again).
As I said earlier, I'm not sure it's WB prescaling, it could be QE normalization.Bill, do you see systematic differences between the two G and the R and B channels when you're looking at optical black data in cameras that don't do WB prescaling like the Nikons do? If you do, it can't be wavelength dependent RN.Depending on the camera there may or may not be Optical Black (OB) data.
Depending on the camera the data in the image area and/or OB may or may not be clipped.
(Sadly, even data with a non-zero Blacklevel can be clipped).
For clipped data I do fit the histogram to a normal distribution.
Jack, I don't think the world turns upside down when the numbers get below 1. Let's compare log errors of say, 0.1 and 0.01. Their squares are 0.01 and 0.0001. The larger error contributes 100 times as much to the sum as the smaller one. Now consider errors of 100 and 10. Their squares are 10000 and 100. The larger error contributes 100 times as much to the sum as the smaller one.Thinking aloud here Jim, the log error difference is mostly a very small number, less than one. Squaring it will will make it even smaller. Will the squaring then penalize potentially bigger outlier errors, in the overall sum? What about a square root?
Jim
Yes. Out with the IR-blocking hot mirror, in with the visible blocking part.I wouldn't expect any difference.
The IR conversion is mechanical, right?
But it does change the average wavelength of the light at each photosite. I thought you said that FWC probably varied with wavelength.So it won't change the per channel conversion gain values.
This all begs for testing with the camera simulator that is built into the Matlab program. I had actually forgotten about it, it's been so long since we used it. I'm trying to fire it up but I seem to have broken it. Give me a little time. It'll be interesting to see if there are ripples when we use the camera simulator. Mebbe not; there is no dc offset in the simulator as it's currently written, and I don't want to add that until I'm confident it's working OK.I hate this idea because I would like the world to work perfectly according to our simple theories - which assume that read noise and shot noise (and pattern/PRNU which we are ignoring for now) add in quadrature and there are no other types of noise (pattern or quantization) present.I hesitate to bring this up because I don't feel like ripping all the code apart right now, but we could use the high mu values to compute FWC, and the low mu values to compute RN, and do one-dimensional optimization for both in single ISO mode instead of two-dimensional optimization. In all-ISO mode, we could do one dimensional optimization for FWC and two dimensional optimization for preAmp RN and postAmp Rn, instead of three-dimensional optimization.
Please say you hate this idea.
The simple model seems to work very well with data from image pairs (I am impressed) except at low ISOs where we get ringing in the shadows (especially red and blue which typically get less light) in ultra-clean sensors. The ringing is WAY off the model so no fitting criterion is going to work unless we can model what's causing it. I still haven't fully understood the mechanism of the ringing, let alone figure out how to do model it.
So if one wanted this level of accuracy (does one? Not necessarily) then one option would be to test for heavy deviations from the model in the shadows and in that case rely on the LSE criterion which biases for the highlights. If the shadows look well behaved, stick with the log minimization criterion which fine tunes things all along the curve. With this strategy the more and the deeper the data points in the shadows the better, so no more throwing away points with SNR<2.
Just thinking aloud.
I think FWC varies between the channels, R, B, Gr & Gb due to QE compensation built in to the conversion gains used and programmed into the firmware.Yes. Out with the IR-blocking hot mirror, in with the visible blocking part.I wouldn't expect any difference.
The IR conversion is mechanical, right?
But it does change the average wavelength of the light at each photosite. I thought you said that FWC probably varied with wavelength.So it won't change the per channel conversion gain values.
As you saw in my isolated test at ISO400 from Jim's data, read noise estimated from SNR does appear to converge when ringing is not present, as expected. The reason is that SNR does not require knowing gain (hence WB pre-conditioning), and it does not care about QE because photoelectron generation follows poisson statistics: a lower effective QE is equivalent to a lower signal, which will simply result in a proportionately lower point on the SNR plot. In theory the fitted curve should not be affected.bclaff wrote: I think FWC varies between the channels, R, B, Gr & Gb due to QE compensation built in to the conversion gains used and programmed into the firmware.
would indicate to me that red has an additional 'gain' of 1.16 and blue of 1.12, which happen to be the order of error that I see in the relative saturation count ('FWC'). For instance for the D810 graphs above at ISO400 FWC R=10824e-, G=12560e- and B=10630e-**, subtending an additional 'gain' of 1.16 for red and 1.18 for blue. Why would there be such an additional 'gain'? FWCs should all be the same, as Jim exclaimed right after we first saw these results. Photon transfer is photon transfer, and a physical pixel is a pixel, no matter what color filter it is sitting under.For the D810 I get read noise in DN at ISO 400 of 5.396, 4.625, 4.672, 5.210 for R, Gr, Gb, and B respectively.
Thank you Anders. What method would you suggest for this kind of estimation?See here
http://en.wikipedia.org/wiki/Heteroscedasticity
and here under "Weighted least squares"
http://en.wikipedia.org/wiki/Least_squares
If the estimated function is actually fully appropriate for the data, heteroscedasticity just implies that ordinary least squares (OLS) is inefficient. But if such is not the case, it may have a systematic impact on the parameter estimates as well.
I haven't thought enough about your particular problem to know what I'd try first in that specific case. But the standard solutions to heteroscedasticity are those listed under "Fixes" in the first of the two links I gave you. Essentially, the choice is between transforming the models/variables so as to make the disturbances reasonably homoscedastic (the first two points under "fixes") or apply some form of WLS (weighted least squares). As indicated, the fourth point listed under "fixes" isn't a full solution since the fitted function would be the same as with OLS. It only gives you a better idea of standard errors of the parameter estimates.Thank you Anders. What method would you suggest for this kind of estimation?See here
http://en.wikipedia.org/wiki/Heteroscedasticity
and here under "Weighted least squares"
http://en.wikipedia.org/wiki/Least_squares
If the estimated function is actually fully appropriate for the data, heteroscedasticity just implies that ordinary least squares (OLS) is inefficient. But if such is not the case, it may have a systematic impact on the parameter estimates as well.
Right.Jack,
Probably not important; just my thoughts.
1) It's generally referred to as White Balance (WB) preconditioning, probably because R and B are adjusted relative to Gr & Gb; but I don't recall any proof that this is the reason for the scaling (perhaps someone has a reference?).
So my Quantum Efficiency (QE) normalization idea seems just as valid (more so to me).
Me too. Mine is not an assumption: I am challenging a current assumption (that FWCs from different channels should be averaged) with a different hypothesis2) You may be right about Full Well Count (FWC) being identical across channels (R, B, Gr & Gb) but I'm simply challenging this as an assumption. I would love it if someone more knowledgeable would jump in.
I am no expert, but as far as I understand from Janesick (p. 38) and from a thread here a while back, for photons in the visual range allowed through by the filters to silicon, 1 converted photon = 1 valence electron of charge q, independently of the original photon energy. Happy to learn otherwise if that should not be the case.2a) We know it's a potential well not a physical well. But does it hold electrons of different energies with the same efficiency?
2b) Is charge converted to voltage with the same efficiency for different energies of electrons.