Determining Sensor IQ Metrics: RN, FWC, PRNU, DR, gain – 2

There are several ways to extract Sensor IQ metrics like read noise, Full Well Count, PRNU, Dynamic Range and others from mean and standard deviation statistics obtained from a uniform patch in a camera’s raw file.  In the last post we saw how to do it by using such parameters to make observed data match the measured SNR curve.  In this one we will achieve the same objective by fitting mean and  standard deviation data.  Since the measured data is identical, if the fit is good so should be the results.

Sensor Metrics from Measured Mean and Standard Deviation in DN

Suppose that we were to collect the statistics of a uniform 200×200 pixel patch in the center of raw files representing captures of a diffuse target of varying intensities, from pitch black to Full Scale, as outlined earlier.  We know from our simple sensor model that the measured mean in Raw Levels (DN) represents the Signal, while the measured standard deviation in DN represents the total Noise in the system.  We also know from that article that total Noise (N) can be expressed as a function of Signal (S), PRNU factor (p) and gain (g) related read noise (R) as follows

(1)   \begin{equation*} N=\sqrt{R^2 + S \cdot g + (S \cdot p)^2} \end{equation*}

all quantities in DN, g in DN/e-.

We load the same excellent mean (S) and standard deviation (N) D810 green channel raw data in DN  collected by Jim Kasson  in adjacent spreadsheet columns, just like we did earlier for SNR.  Between those we insert a third column labeled Modeled Noise which uses formula (1) above to calculate N, as shown below:

Total Noise Setup

The Squared Error column uses the same formula as in the last post and calculates the error of modeled vs measured noise at every available signal level: log2(MeasuredNoise/ModeledNoise)^2.  The MSE cell represents the average of the column.

To fit the modeled to measured noise data we open Excel’s Data tab and set up Solver to minimize the mean square error cell (MSE) by varying read noise (R), gain (g) and PRNU factor (p).  This is the result for the green channel:

D810 Mean vs STDdev 2

A pretty good fit shows read noise (R) of 0.8417 DN, gain (g) of 0.1965 DN/e- and PRNU factor (p) of zero for the D810’s green channel at base ISO.   Recall that p computes to zero in this case because this data was obtained by pair subtraction, which effectively minimizes gradients and non uniformities.  To obtain an estimate for PRNU, follow the same procedure using unsubtracted data from a single set of captures.

Since we have gain (g) we can convert read noise to physical units:

r = \frac{R}{g} = 4.2837 e-.

If we know that the D810’s green channel full scale in DN is 15783 we can estimate engineering Dynamic Range for it as 15783/0.8417 or 14.2 stops.

Thanks to gain again we can calculate clipping in photoelectrons at a full scale of 15783 DN by dividing it by 0.1965 DN/e-, which results in FWC = 80323 e-.

These are exactly the same figures as obtained earlier through the SNR Photon Transfer Curve fit – and so they should be since the data is the same, the model is the same and the fits are good.  In both the SNR and Total Noise cases we are able to obtain key parameter sensor gain (g), metrics read noise (r, in DN and photoelectrons) and PRNU factor (p) with just mean and standard deviation measurements plotted as PTCs.  If we want FWC and DR information we also need to know Full Scale in DN for the channel in question.

 

2 thoughts on “Determining Sensor IQ Metrics: RN, FWC, PRNU, DR, gain – 2”

  1. I have been trying for some time to determine gain and other parameters from my own camera test data. The conventional methods such as taking the slope of the variance or fitting a tangent with a slope of 0.5 to the Photon Transfer Curve had produced very inconsistent results. Yesterday I tried the method you recommend here and it worked perfectly! The square root of a quadratic provides a very good fit to the measured Photon Transfer Curve.

Leave a Reply to Richard Turton Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.