Jump to content

NLCbanner2024.jpg.2478be509670e60c2d6efd04834b8b47.jpg

Using IRIS to measure performance of a Canon 450D


themos

Recommended Posts

I've been following Craig Stark's advice (Signal to Noise: Part 3 - Measuring your Camera - Article) on how to measure camera parameters. I am using the IRIS software (Iris software) for all analysis. I think I got the first number out last night (camera gain at ISO400: 0.6 e-/ADU). Once I am confident I know what I'm doing, I'll post more details.

Link to comment
Share on other sites

First, read through the document

Signal to Noise: Part 3 - Measuring your Camera - Article

It will tell you how to shoot the frames we are going to need: the sequence of 1-minute darks, the stack of bias frames, the pairs of flats at different intensity and the long dark frames.

Your camera should be set to M (for Manual), RAW output and AWB for white balance. The frames should all live in .CR2 files.

Choose an ISO setting to test, I chose 400.

In IRIS, Ctl-R brings up the Settings dialog. IRIS likes to work from a fixed directory so this is where you set this Working directory path for Iris commands. All Iris output will end up there. Also set the working File Type (FIT).

The Camera button (third from right) brings up the Camera settings dialog where you select the Model of your camera (450D) and the RAW interpolation method (Linear).

The next button to the left is the Command button. When you press it, a window pops up showing a prompt (>). This is where you type commands.

We are going to convert all our 1-millisecond bias RAW frames to IRIS format. Go to the Digital Photo menu and click on Decode RAW files. This brings up the Decode Raw files dialog where you drag and drop all the bias .CR2 files. Fill in a name for the output series (use 'bias' as the name) and press the ->CFA button. After a while, it will finish converting so press the Done button. Check that your IRIS working directory contains the new files bias1.fit, bias2.fit etc.

Press the Command button and in the Command window enter

smedian2 bias 100

save medianbias

This will compute the median stack of all the bias frames and save it in the file medianbias.fit in the working directory. Mine had a very small sigma (do 'stat' once it's loaded), just 2.2 with a median value of 1025.

Now convert the flats to IRIS format in the same way you did the bias. The name of the output series will be "flat" and they will be in pairs of same brightness (flat1 and flat2, then flat3 and flat4 and so on).

For each pair of flats we will subtract the medianbias from each flat (IRIS 'sub' command), split the image into the Bayer matrix components (IRIS 'split_cfa' command), crop a 400x400 square from near the middle (IRIS 'window' command) and then add the two and subtract the two ('add', 'sub' are the IRIS commands). Here is a sequence of IRIS commands that does this

load flat1

sub medianbias 0

split_cfa a b c d

load a

window 800 500 1200 900

save aa

load flat2

sub medianbias 0

split_cfa a b c d

load a

window 800 500 1200 900

save ba

load aa

add ba

stat

load aa

sub ba 1000

stat

When we "load a" we pick up one of the 4 components generated by 'split_cfa'. Then we can repeat the same commands but with two "load b"s in place of the "load a"s. Once we do all four, we move to "load flat3" and "load flat4". Each time, the crops end up in files "aa" and "ba". From the first "stat" (after the add), we jot down the Mean. From the second "stat" (after the sub), we jot down the Sigma.

You should find that two of the a-b-c-d means are very near each other. That would be the Green channels.

Put the Means and the Sigmas in two spreadsheet columns. On a separate column, headed 'Variance', calculate the squares of the Sigmas. Then plot an X-Y Scatter plot with the Variance values as Y and Mean values as X. Calculate a regression with the LINEST function.

That gives you a calculated slope. Compute 1/slope and call it the gain (e-/ADU). My camera's gain is 0.568 e-/ADU at ISO 400. Then subtract the medianbias from one of the bias frames.

load bias1

sub medianbias 1000

stat

Jot down the Sigma value. That's the read error in each bias frame in ADU units. Multiply by the gain to get the readout error in electrons. My camera's error is 6.3 e- at ISO 400. The bias seems to be set at 1024 and the bias frames show mean value of 1024 with a sigma of about 11.

Next up you need to shoot a saturated frame and convert it with the ->CFA process. Look at the histogram (View menu -> h

Histogram) or issue the "stat" command. This will give you an estimate of the maximum reading possible in your .CR2 files. My camera maxed out at 16087 (close to 14th power of 2, it's a 14-bit camera). Multiply that number by the gain to get the full-well number or electrons, in my case 9143 electrons.

The dynamic range is the full-well number divided by the read error, in my case 9143/6.3 = 1449. In decibel terms that's 32db.

Next, convert your 1-minute darks with the Decode RAW ->CFA method. Name the series 'dmin'. Compute statistics on all of them with the command (I had 30 of them).

stat3 dmin 30

You'll find a file called stats.lst in the working directory. Edit it with Notepad. The columns are

Column 1: name of the image.

Column 2: mean intensity.

Column 3: maximum intensity.

Column 4: minimal intensity.

Column 5: standard deviation.

Column 6: median intensity.

Cut and paste them into a spreadsheet and plot them. The only systematic effect I found was a gradual increase in the standard deviation. It went from 13.9 up to 17.4 in the course of the 30 frames. No significant drift in the mean intensity was found.

I also looked at 1-min, 2-min, 5-min, 10-min and 20-min darks but I still haven't made sense of the results. The dark frames seem to contain values much less than the bias (1024), sometimes going down to 522 for the 20-min. It's not so much a dark current as a dark chaos.

transfer curve.pdf

dark stability.pdf

Link to comment
Share on other sites

The 400D is 12-bit, the 450D is 14-bit like the 40D. Your link shows the 40D's gain at ISO 400 as 0.85 which is not too far from my measurement for the 450D.
Ooops - sorry, yes, you are quite correct. For some reason I thought you were talking about the 400D (despite the subject header!).

NigelM

Link to comment
Share on other sites

differencing frames increases random noise by a factor of root 2.

you need to divide this out to get the true read noise

so divide the read noise by root 2. The DR will increase by this factor also.

now that you have the gain, you can remove the shot noise.

you now have read noise so remove this too.

using one set of flats only (ie no differencing) plot total noise (ie the std dev of the flats) vs signal.

multiply by the gain you worked out, to convert to electrons.

You can work out the Fixed pattern noise, or PRNU from the single set of flats.

to remove shot noise from the images....

FPN+Rd noise = sqrt( tot noise^2-Signal)...since in e- units the shot noise is the sqrt of signal

then FPN = sqrt( FPN+rd Noise^2 - rd noise^2)

the result is FPN vs Signal (the mean of a flat field)

FPN is a linear function of signal, so fit a best fit line in IRIS. The gradient (constant of proportionality is the PRNU. pixel response non uniformity. It is this kind of noise that fields remove.

I like your noise variance graph....

good work.

paul

Link to comment
Share on other sites

differencing frames increases random noise by a factor of root 2.

you need to divide this out to get the true read noise

so divide the read noise by root 2.

Paul, I think I thought this through. I took the mean of the sum of two flats, not a mean of the flat signal. That factor of sqrt(2) would become (2) when squared to get the variance and that (2) would convert mean of sums of two flats to mean of a flat.

I am afraid I don't yet understand the rest of your remarks.

Link to comment
Share on other sites

  • 2 years later...

Update! Canon EOS cameras do strange processing even in RAW mode

http://www.cloudynig...hp?item_id=2786

  • Canon is re-scaling your data before it hits the CR2 file. Based on the thermal signal (likely based on stats from the optical black portion), it is both shifting your histogram left (i.e., subtracting a constant from the whole image) and scaling the intensity (changing the contrast or gain).
  • This makes the camera appear to have very low dark current as the background never gets appreciably brighter. But, the noise increase shows that the dark current is there and it is really the noise from the dark current that’s the trouble – far more than the constant component of the increase.
  • The camera warms up for a substantial period of time.
  • The above makes dark subtraction a real challenge. Not only is the current changing with time as the camera warms up (which we might easily account for), but what scaling is being applied to the data is changing as well.
  • Software designed for daytime photography will also rework the data and making it stay purely linear and not apply any processing can be difficult.
  • The camera’s internal gain (e-/ADU) for each ISO value points toward limiting the ISO to 400 and not using higher values. Both in theory and in practice, using higher values limits the dynamic range and does not let you pull out fainter details from the noise (even if they look brighter). The exact optimal ISO value will likely vary from model to model, but it's unlikely to be the high ISO settings.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.