Pages: 1 ... 8 9 [10]   Go Down

### AuthorTopic: Computing Unity Gain ISO from a single exposure  (Read 103761 times)

#### Jack Hogan

• Sr. Member
• Offline
• Posts: 551
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #180 on: April 02, 2013, 12:31:56 PM »

That looks like it would be pretty easy to fit the two-stage read noise model to. But now look at the RX-1:

There are two big problems here. The first is that, with the exception of the ISO 100 point, the read noise component on the output side of the amplifier is darned close to zero. The second is that the read noise goes down as the ISO is increased from 100 to 200. With the two-stage model, that shouldn't happen.

Yeah, funny that, as if it were getting less light.

Quote
I'm scratching my head right now. I'm also having trouble figuring out how to estimate the standard deviations of the portion of the read noise referred to the output of the amplifier in the cases where the base gain is only a stop or two away from unity gain.

Well, if you have been buying my dithering snake oil you could just pretend that you have a large enough sample...
Logged

#### Jack Hogan

• Sr. Member
• Offline
• Posts: 551
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #181 on: April 02, 2013, 12:52:14 PM »

I built a two-stage read noise model for the D4. Here's a plot of the mean and mean+standard deviation for the measured and the modeled values:

You are on a roll, Jim!  I assume that you used Poisson distribution for photoelectrons from the sensors in quadrature with a gaussian read noise for the pre/sensor, followed in quadrature again by gaussian read noise in the analog amplifier, followed by an ideal noiseless  ADC?

Quote

That's more noise at the lower ISOs than I'm seeing on the real camera. Some possibilities are: a) one-electron test shots were made at 1/8000 sec exposure, where read noise test shots were made at 1/30, b) there's some ACR processing going on that's making a difference, c) there were some artifacts in the read noise test shots like the read smear in the ISO 640 one-electron shot.

The vertical axis is ADUs, correct?  That's pretty good agreement on the mean, as we would expect. Where does ACR come into the picture?  If you are using it, it could well be the culprit as it's well known that it messes arbitrarily with curves at various ISOs.  Or perhaps the relative read noises are incorrect.  How did you calculate them?

I think I can see in the real camera M+S data the two slopes: the amplifier limited one at low ISOs and that of the amplified sensor once it becomes dominant at 800 and above.  I don't see the same knee in the modelled curve.

Jack
Logged

#### Jim Kasson

• Sr. Member
• Offline
• Posts: 1420
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #182 on: April 02, 2013, 02:19:24 PM »

I assume that you used Poisson distribution for photoelectrons from the sensors in quadrature with a gaussian read noise for the pre/sensor, followed in quadrature again by gaussian read noise in the analog amplifier, followed by an ideal noiseless  ADC?

When you're simulating on a per-pixel level, this quadrature stuff doesn't apply. I take the signal, multiply that by the PRNU image (with the sensitivity of each sensel, populated by a Gaussian distribution centered on one), use Poisson for the shot noise to form an image and add that in, quantize to integer electrons, add the preamp read noise image (generated with Gaussian statistics), multiply by the gain, add the postamp read noise image, and quantize to the number of bits in a perfect ADC.

I'm considering splitting the PRNU multiply into two components, one pre quantizing to electrons, and one post quantizing to electrons. I'm not sure if the shot noise belongs before or after the pre-quantizing PRNU multiplication.

Jim

#### Jim Kasson

• Sr. Member
• Offline
• Posts: 1420
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #183 on: April 02, 2013, 02:20:30 PM »

Where does ACR come into the picture?

ACR is how I converted the real camera images.

Jim

#### Jim Kasson

• Sr. Member
• Offline
• Posts: 1420
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #184 on: April 02, 2013, 02:29:48 PM »

The vertical axis is ADUs, correct?

Yes.

Or perhaps the relative read noises are incorrect.  How did you calculate them?

I used RawDigger for the real data. The model is totalReadNoise = (postGainNoise^2 + (gain*preGainNoise)^2)^0.5.

I think I can see in the real camera M+S data the two slopes: the amplifier limited one at low ISOs and that of the amplified sensor once it becomes dominant at 800 and above.  I don't see the same knee in the modelled curve.

Here's a log-log version. It's easier to see the low ISO points.

Jim

#### Jack Hogan

• Sr. Member
• Offline
• Posts: 551
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #185 on: April 02, 2013, 03:26:38 PM »

When you're simulating on a per-pixel level, this quadrature stuff doesn't apply.

Makes sense, of course.

Quote
I take the signal, multiply that by the PRNU image (with the sensitivity of each sensel, populated by a Gaussian distribution centered on one), use Poisson for the shot noise to form an image and add that in, quantize to integer electrons, add the preamp read noise image (generated with Gaussian statistics), multiply by the gain, add the postamp read noise image, and quantize to the number of bits in a perfect ADC.

Is the resulting distribution of the quantized electrons Poisson?  If it's not it could be contributing to differences.

Quote
I'm considering splitting the PRNU multiply into two components, one pre quantizing to electrons, and one post quantizing to electrons. I'm not sure if the shot noise belongs before or after the pre-quantizing PRNU multiplication.

I don't know if it helps, but I find that considering PRNU as random noise that adds in quadrature with shot noise usually works well near saturation for ISO 100-400, max 800.  after that it gets lost in shot noise first and read noise in the upper ISOs later.  I think of PRNU mainly as a fairly complex CFA, as you have done, which varies the luminous flux to each individual photosite - you could say that each site is exposed slightly differently without leaving classical physics.  Each individual photosite then reacts to its own flux quantistically, by generating electrons with probability equal to the charge conversion ratio (aka QE) and Poisson distribution.  So I think of PRNU as before not after quantizing - but it works well even when you add it in quadrature after: go figure.  Unfortunately I am no expert, just happy to be along for the ride

Jack
« Last Edit: April 02, 2013, 04:30:27 PM by Jack Hogan »
Logged

#### Jack Hogan

• Sr. Member
• Offline
• Posts: 551
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #186 on: April 03, 2013, 05:29:47 AM »

I'm considering splitting the PRNU multiply into two components, one pre quantizing to electrons, and one post quantizing to electrons. I'm not sure if the shot noise belongs before or after the pre-quantizing PRNU multiplication.

Jim

While thinking about this issue I came across this very interesting thread on the conversion process and noise at DPR.  In a nutshell:

cpw basically says that the photon-electron conversion process starts with a photon stream with a Poisson distribution and results in a smaller electron stream (reduced by QE) also with a Poisson distribution but of different lambda.

joofa:
'Bottom line is that both photon and photoelectron streams are represented by a Poisson process. For our shot noise calculation we shall only consider the photoelectron stream. Hence, there is no issue of an additional noise [due to conversion]'

tlwalton:
'QE is a "bulk property" of the sensor. It's an aggregate of the materials properties and engineering parameters that went into its design and manufacture. Its a consequence, not a mechanism. It could depend, for example, on temperature or wavelength, but all those effects are aggregated into a useful figure of merit, QE, which is assumed for practical reasons not to vary with time.'

bobn2:
'pixel response non-uniformity... is caused by differences between pixels, their gain their capacity and so on. PRNU isn't strictly a 'noise' rather it is a response pattern which differently multiplies the captured samples, thus creating 'noise'. Thus it is proportional to the signal, the number of photons per sample'

Based on these comments, if we consider PRNU as all signal dependent 'noises' proportional to the signal, I think it should make no difference whether it is handled before or after conversion - including CFA non-uniformity - so might as well do everything at the same time.  What do you think?

Jack
« Last Edit: April 03, 2013, 05:34:37 AM by Jack Hogan »
Logged

#### Jim Kasson

• Sr. Member
• Offline
• Posts: 1420
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #187 on: April 03, 2013, 11:19:15 PM »

Based on these comments, if we consider PRNU as all signal dependent 'noises' proportional to the signal, I think it should make no difference whether it is handled before or after conversion - including CFA non-uniformity - so might as well do everything at the same time.  What do you think?

Jack,

If all the PRNU is before quantizing to electrons, as it currently is in the model, then we'll see PRNU jump two counts at a time at twice Unity Gain ISO, and four counts at at time at four times ISOug. There won't be any intermediate values. If it's after quantizing to electrons, then there will be intermediate values, but, of course, none smaller than 1 LSB of the ADC.  So it makes at least a theoretical difference. The power of noise dither being what it is, it probably makes no practical difference.

But when it comes to dither from noise, I'm speaking to the choir, right?

Jim

#### Jim Kasson

• Sr. Member
• Offline
• Posts: 1420
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #188 on: April 03, 2013, 11:38:16 PM »

I re-ran the D4 read noise tests, this time at 1/8000 second. I didn't want to do the whole 7x16 exposure series in RawDigger, although it would have been faster if I was only going to do it once, so I learned how to use ImagesPlus, and converted the D4 raw files to flat Tiff's. Then I wrote a Matlab program to load all 112 files and compute the read noise stats for each ISO.

[Non-programmers, avert your eyes] Today I banged my head against the wall trying to figure out why my results were 1/16 of what my spot checks in RawDigger indicated that they should be. After almost two hours of looking for the bug, I found an array assignment statement just below the end of the for loop that it was supposed to be inside of. Some programming languages restrict the scope of loop indices to the loops.  Not Matlab; the index lives on with the last value it had in the loop. Some loosely-typed programming languages will complain if you try to assign a variable to the 16th entry of an undeclared array. Not Matlab; it will happily and silently create the array and make the first 15 entries zero. [end programmer alert]

Here are the new read noise model values:

And here's how they look plotted against the new data:

When fitting the curves, I decided that the ISO 6400 values weren't very important, since, based on what we've learned so far, we'll never use those ISOs.

Jim
« Last Edit: April 04, 2013, 02:55:08 PM by Jim Kasson »
Logged

#### Jim Kasson

• Sr. Member
• Offline
• Posts: 1420
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #189 on: April 04, 2013, 12:08:10 AM »

The results from the new D4 Simulation with 1 electron stimulus in each green layer at D65 (The post-gain component of the read noise brightens the image as the ISO drops, so I multiplied the images in linear raw space by the square root of two for each step down in ISO, not the full factor of two):

ISO 640:

ISO 320:

ISO 160:

ISO 80:

ISO 40:

This shows that Unity Gain ISO produced the best results, but the low-ISO images (even the ones that have real-world counterparts) seem a bit too noisy. I think it's clear that in the presence of a post-gain read noise component, that Unity Gain ISO can offer some advantages. Whether they're hugely significant over a ISO's a stop or two lower still needs some investigation.

Jim
« Last Edit: April 04, 2013, 12:01:36 PM by Jim Kasson »
Logged

#### Jack Hogan

• Sr. Member
• Offline
• Posts: 551
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #190 on: April 04, 2013, 05:08:03 PM »

This shows that Unity Gain ISO produced the best results, but the low-ISO images (even the ones that have real-world counterparts) seem a bit too noisy. I think it's clear that in the presence of a post-gain read noise component, that Unity Gain ISO can offer some advantages. Whether they're hugely significant over a ISO's a stop or two lower still needs some investigation.

Jim

Well, I agree that the low ISO images look a bit too noisy.  However Bill Claff's graph suggests that there should be a difference of 1.5 stops in SNR between ISO 640 and 100 or so - perhaps that's what it looks like.  And the model does fit real data.  Do the related real world test images look similar?

Now that you have the sensor/gain read noise model, I almost feel that a more useful interpretation comes from plotting the two and seeing when one becomes dominat over the other, as Dosdan did in the previously mentioned DPR thread

Jack
« Last Edit: April 04, 2013, 05:29:39 PM by Jack Hogan »
Logged

#### Jack Hogan

• Sr. Member
• Offline
• Posts: 551
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #191 on: April 04, 2013, 05:09:28 PM »

And here's how they look plotted against the new data:

When fitting the curves, I decided that the ISO 6400 values weren't very important, since, based on what we've learned so far, we'll never use those ISOs.

Jim

Right, excellent fit.  Great job.
Logged

#### Jack Hogan

• Sr. Member
• Offline
• Posts: 551
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #192 on: April 04, 2013, 05:10:40 PM »

Jack,

If all the PRNU is before quantizing to electrons, as it currently is in the model, then we'll see PRNU jump two counts at a time at twice Unity Gain ISO, and four counts at at time at four times ISOug. There won't be any intermediate values. If it's after quantizing to electrons, then there will be intermediate values, but, of course, none smaller than 1 LSB of the ADC.  So it makes at least a theoretical difference. The power of noise dither being what it is, it probably makes no practical difference.

But when it comes to dither from noise, I'm speaking to the choir, right?

Jim

Gorregt
Logged

#### Jim Kasson

• Sr. Member
• Offline
• Posts: 1420
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #193 on: April 04, 2013, 07:01:29 PM »

Now that you have the sensor/gain read noise model, I almost feel that a more useful interpretation comes from plotting the two and seeing when one becomes dominat over the other, as Dosdan did in the previously mentioned DPR thread

Jack, here the graph is with the two components added in. I don't think the change adds much, though. You can see the effect of each of the components well enough by looking at the general shape of the previous curve. The two components will alway be straight lines on a log-log graph, and the combined curve will approach each one asymptotically at both ends.

If it helps you, then enjoy.

Jim
« Last Edit: April 04, 2013, 11:47:08 PM by Jim Kasson »
Logged

#### Jack Hogan

• Sr. Member
• Offline
• Posts: 551
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #194 on: April 05, 2013, 06:32:52 AM »

Here are the new read noise model values:

Jim, may I ask how you determine these values?  Find the lowest total read noise at a highish ISO, assume that it is all 'sensor' related, then calculate the amplifier read noise subtracting in quadrature the sensor read noise from total read noise at a lowish ISO?  It's quite sensitive to the chosen lowish ISO.

Jack
Logged

#### Jack Hogan

• Sr. Member
• Offline
• Posts: 551
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #195 on: April 05, 2013, 06:39:17 AM »

Jack, here the graph is with the two components added in. I don't think the change adds much, though. You can see the effect of each of the components well enough by looking at the general shape of the previous curve. The two components will alway be straight lines on a log-log graph, and the combined curve will approach each one asymptotically at both ends.

If it helps you, then enjoy.

Jim
Thank you, you are right.  It just makes it a bit easier to see intuitively where increasing ISO no longer has a beneficial effect on noise.

Jack
Logged

#### Jim Kasson

• Sr. Member
• Offline
• Posts: 1420
##### Re: Computing Unity Gain ISO from a single exposure
« Reply #196 on: April 05, 2013, 12:40:56 PM »

I figured out why the simulated one-electron images appeared to have more noise than the real D4 images. In the real images, I photographed the target so that it filled the frame, so that on the sensor it was a around 3000 pixels high and wide. Then I res'd the images down to 350x350 with Perfect Resize, blew them up to 700x700 with nearest neighbor, JPEG'd them, and posted them. I did the simulated images at 350x350 , blew them up to 700x700 with nearest neighbor, JPEG'd them, and posted them.

It's not the same.

The reduction from roughly 3000x3000 to 350x350 averages out a lot of noise, and the simulated images don't get the benefit of that averaging. I repeated the simulation with 3000x3000 images, and gave then the same processing that the real D4 images got. Now the simulated results are much closer to the real ones. The simulated images don't have the pattern noise of the real ones, because I've made no attempt to simulate that.

ISO 640:

ISO 320:

ISO 160:

ISO 80:

ISO 40:

I'm going to declare victory on the read noise simulation and move on to better PRNU simulation and adding the Bayer CFA.

Jim
Pages: 1 ... 8 9 [10]   Go Up