Ad
Ad
Ad
Pages: « 1 [2]   Bottom of Page
Print
Author Topic: Calibrating out Pixel Response Nonuniformity, or not?  (Read 8068 times)
BartvanderWolf
Sr. Member
****
Online Online

Posts: 3474


« Reply #20 on: April 07, 2013, 09:02:40 AM »
ReplyReply

Hi Bart, I just added this info to the "Auto matching logic" sections of Dark Frame and Flat Field sections of the online manual. Thanks for pointing that it was missing (its nice to see that manual is being read! BTW, RT manual went through comprehensive updates recently).

Thanks, I'm the one who downloaded it, and read it Wink

Quote
Please note that I made a correction to "Key for dark frames" in the post above, it does not include aperture.

Noted, aperture shouldn't make any difference for a dark frame.

Cheers,
Bart
Logged
Jim Kasson
Sr. Member
****
Offline Offline

Posts: 744


WWW
« Reply #21 on: April 07, 2013, 11:17:06 AM »
ReplyReply

I get the subtraction in quadrature to reduce pattern noise and other non-random effects, but what do you mean with a small correction? The subtraction gives the shot noise, then what did you do to determine the PRNU, subtract the sum of the earlier averaged signal result and the averaged shot noise from the individual files?

Here's an example, from one of the green channels of the NEX-7. The standard deviation of the averaged image was 7.95 ADUs. The computed shot noise, which I got be taking the gain at ISO 100, using it to figure out the average number of electrons in the well, taking the square root of that, multiplying by the gain to get back to ADUs, and dividing by sqrt(256) (calculated by Excel, not by me; we've already shown that taking the square root of 256 is something I can't reliably do) to take into account the averaging. All that resulted in a shot noise number of 1.03 ADUs. Subtracting that in quadrature from 7.95 gave a corrected PRNU standard deviation of 7.88 ADUs. Thus, the correction was 0.07 ADUs, what I was calling a small correction.


Just to be sure, this is the patternnoise residual (see above)?

The graph is actually a graph of the histogram of one plane of the raw averaged image. I made no attempt to compensate for the residual shot noise left after the 256 image averaging operation.

Is that 97% and 70% PNRU? Seems high ...

Those numbers are the ratios of the PRNU to the shot noise of a single exposure at full scale. So, for the D4, the PRNU and the shot noise are about equal at full scale. For the NEX-7, the PRNU is somewhat less than the shot noise at full scale.

Thanks,

Jim

Logged

Chris Warren
Newbie
*
Offline Offline

Posts: 6


« Reply #22 on: April 07, 2013, 11:45:37 AM »
ReplyReply

Hi Jim,

No problem!  Bright side is you have a more accurate flat field to work with with 256!  Looks like you  have some targets to work with for trying out, which makes sense to me.  One of the references that I referred to show a pretty cool before and after about how the author (Janesick) cleaned up a sine wave image by removing PRNU; for real world pictures one would have to experiment.  I'll have to try some more with this as well; it looks like nice news about the functionality of RawTherapee, which I would like to try as well.

Some side notes.  The flat-fielding process relies upon sensor linearity to work, which I think/hope is the case for our sensors.  I got pretty good linearity with the D40.  Also, flat-fielding can be used to do photon transfer measurements (measuring k, read noise, FW, PRNU) on 1 frame of uniform data, instead of the 2-frame differencing method.  Both methods negate the effects of PRNU, and both can be done for comparison.  Also, I would think that tables, as Bill notes, would have to be built up, which are going to be different vs F# if we also want to negate vignetting, but processing power being what it is I wouldn't imagine it being too bad.  Pretty exciting.

Chris
Logged
Jim Kasson
Sr. Member
****
Offline Offline

Posts: 744


WWW
« Reply #23 on: April 08, 2013, 01:28:14 PM »
ReplyReply

Chris, I did the testing with a target like the one you were talking about. I made three images. The first one was of the target itself, a 64-bit floating point image converted to a 16-bit, 2.2 gamma, unsigned integer TIFF RGB file. The second one was a simulated exposure in a Nikon D4 (but one with a Fovean-like sensor -- no Bayer CFA) at ISO 100 near full scale. I used a D65 source white balance, and corrected it afterwards by multiplying the red and green planes by the appropriate white balance coefficients. The third image was like the second, but the simulated D4 had no PRNU at all.

The images look virtually identical to me.

Showing 8-bit JPEGs wouldn't help, so here's a link to a 16-bit psd file with three layers, one for each image.

Jim
« Last Edit: April 08, 2013, 04:57:46 PM by Jim Kasson » Logged

IliasG
Newbie
*
Offline Offline

Posts: 17


« Reply #24 on: April 08, 2013, 07:12:28 PM »
ReplyReply

Hi Jim,

No problem!  Bright side is you have a more accurate flat field to work with with 256!  Looks like you  have some targets to work with for trying out, which makes sense to me.  One of the references that I referred to show a pretty cool before and after about how the author (Janesick) cleaned up a sine wave image by removing PRNU; for real world pictures one would have to experiment.  I'll have to try some more with this as well; it looks like nice news about the functionality of RawTherapee, which I would like to try as well.

Some side notes.  The flat-fielding process relies upon sensor linearity to work, which I think/hope is the case for our sensors.  I got pretty good linearity with the D40.  Also, flat-fielding can be used to do photon transfer measurements (measuring k, read noise, FW, PRNU) on 1 frame of uniform data, instead of the 2-frame differencing method.  Both methods negate the effects of PRNU, and both can be done for comparison.  Also, I would think that tables, as Bill notes, would have to be built up, which are going to be different vs F# if we also want to negate vignetting, but processing power being what it is I wouldn't imagine it being too bad.  Pretty exciting.

Chris

Hi Chris,

Can you upload a picture of Janesic's before-after cleanup ?. Was his procedure on Bayer mosaiced data ?.
I ask because I am thinking of a possibility that removing all pattern noise could help the demosaicing algo to make better decisions regarding interpolation directions, so we could take a better - sharper - more detailed result.

A comment on this by an expert on demosaic algorithms (Emil ??) would be nice .. before I (we) start taking thousands of flat field shots just to investingate ... 
Logged
MichaelEzra
Sr. Member
****
Offline Offline

Posts: 650



WWW
« Reply #25 on: April 09, 2013, 03:07:10 PM »
ReplyReply

Since we are talking about pixel-level flattening (blur radius=0), I'd like to mention that it is reasonable to expect that consecutive flat frames will be displaced by more than 1 pixel even if camera is on the tripod. The illumination hitting the sensor has to be extremely uniform to alleviate this issue and avoid having to align the flat fields before their averaging.

since this topic is about the sensor-related non-uniformity only, I suppose, that dark frame correction with averaging of the dark frames would be more appropriate here. There is also no alignment issue with dark frames.
« Last Edit: April 09, 2013, 03:13:12 PM by MichaelEzra » Logged

Chris Warren
Newbie
*
Offline Offline

Posts: 6


« Reply #26 on: April 13, 2013, 11:25:58 AM »
ReplyReply

Hi Jim,

Thanks for doing this!  I thought we'd see some differences but I guess not.  I looked at data for the D4, and between Dxomark and Sensorgen, I see that it's FW capability is 117,813 e, and so with PRNU removed we could anticipate an SNR = 343:1 at max signal, and without the PRNU removal (I estimate PRNU = 0.31 %), the SNR = 234:1.  Do those parameters sound about right to you?  Maybe these are some really high SNRs whose effects can't be seen, even with lower contrast targets?  I'll have to mull this over some more and maybe try to see if I can do something with my camera.

Chris
Logged
Jim Kasson
Sr. Member
****
Offline Offline

Posts: 744


WWW
« Reply #27 on: April 13, 2013, 02:15:44 PM »
ReplyReply

I looked at data for the D4, and between Dxomark and Sensorgen, I see that it's FW capability is 117,813 e, and so with PRNU removed we could anticipate an SNR = 343:1 at max signal, and without the PRNU removal (I estimate PRNU = 0.31 %), the SNR = 234:1.  Do those parameters sound about right to you? 

Yes. Here are the numbers I used in the simulation, all gotten from my testing:

fullWellCount = 111404
pixelNUStd = 0.003
D65RedCorrection = 280.53/540.95
D65BlueCorrection = 326.108/540.95
D65RedWBCoef = 1 / D65RedCorrection
D65BlueWBCoef = 1 / D65BlueCorrection

The last four numbers come into play because, at D65, which was the white point I used for the simulation, the different color planes have different average values, which are compensated for during the raw development to get the white point of the final image back to D65. The effect of that is to reduce the average PRNU from what it would be the way I think you did it, which is assuming that all three (or four, depending on how you count) have the same average value.


Maybe these are some really high SNRs whose effects can't be seen, even with lower contrast targets? 

At least not by me.

Jim
Logged

Pages: « 1 [2]   Top of Page
Print
Jump to:  

Ad
Ad
Ad