A comparison of the Nikon D300 and Canon 40D sensors


by Emil Martinec © 2007

last update: Mar 1, 2008




This report contains results of a quantitative analysis of the Canon 40D and Nikon D300 DSLR's, from the standpoint of sensor capabilities. Images were taken with the Canon 100-400L IS lens on the 40D and the Nikon 80-400VR lens on the D300. Several measurements were undertaken: Sensor read noise, dynamic range, pixel photon collecting efficiency, and relative sensitivities.

Read noise: Ordinarily, read noise is measured from the fluctuation spectrum of raw levels in a blackframe image taken at high shutter speed with the body cap on the camera. Read noise could not be measured from blackframes on the D300. Nikon clips the black end of the spectrum well before zero signal, thereby distorting the noise spectrum in deepest shadows. If the noise distribution were clipped at its centroid, then a correction factor could be applied to infer the width of the noise. However an examination of the histogram of the blackframe noise distribution at ISO 200 shows that the blackpoint is set at the point where 5% of pixels have this value or more; the 95% of the pixels to the left (with lower value) are clipped to this 5% point. Needless to say, setting the blackpoint so far out on the tail of the blackframe distribution completely distorts and precludes the measurement of the read noise. Here are the 12-bit histograms at various ISO settings (the 14-bit histograms look more or less identical, with the tail above one ADU simply being stretched by a factor four on the horizontal axis):


Fig.1 - Histograms of black frames for various ISO settings (the horizontal axis is raw levels or ADU; the vertical axis is the number of pixels having that level).


One can see the histogram beginning to clip on this sequence of sample patches of an underexposed IT8 test chart as the average signal is lowered toward zero

Fig.1a - Histogram of D300 (14 bit) raw data as exposure level approaches zero.


Canon introduces a bias or offset before quantizing the sensor signal, preventing clipping of blacks and giving a more accurate representation of the sensor signal in deep shadows; here is the histogram of a representative 40D blackframe:

Fig.2 - Histogram of 40D blackframe.


The nonlinear distortion of deep shadows in D300 raw data by clipping means that it will be a poor choice for astrophotography, or any application where pulling weak signals out of the noise at very low illumination levels is of importance.

Read noise for the 40D can be directly measured as the standard deviation of the blackframe; for the D300, the read noise was deduced by measuring patches on a 3-stop underexposed IT8 color chart, and extrapolating to zero level the widths of unclipped noise in uniform patches of nonzero level. Noise measured from the difference of a pair of bright frame images provided an additional data point anchoring the curve at the high end. Here for example is the plot for ISO 200 (12-bits) together with the best fit curve for the unclipped patch widths:


Fig.3 - Standard deviation of green channel patches as a function of mean raw level; D300 at ISO 200.


The rise at higher exposure comes from the effects of photon shot noise, whose effect is removed by extrapolating the best fit back to zero illumination level (no photons) using a model of noise as consisting of read noise and photon shot noise added in quadrature (square root of the sum of squares of individual noise sources). In this way the following 12-bit and 14-bit read noise data were obtained for the D300:

ISO

100

200

400

800

1600

3200

12-bit read noise

-

1.3 ADU

2.3

4.0

7.5

14.5

14-bit read noise

-

4.8 ADU

8.7

15.6

28

57

Table 1: D300 read noise vs ISO.


Here and below, unless otherwise specified the units are the ADU (raw levels) of the corresponding bit depth of quantization. As a measure of the degree of blackpoint clipping, the standard deviation of ISO 200 12-bit black frames is 0.46 ADU, much less than half the value 1.3 inferred from the best fit curve. This result may be compared with the read noise data for the Canon 40D (for the reasons stated above, these data can be measured directly from blackframes and are far more accurate):

ISO

100

200

400

800

1600

3200

14-bit read noise

5.5 ADU

6.2

8.3

13.1

22.6

-

Table 2: 40D read noise vs ISO.


The read noise gives an edge to the D300 at ISO200, while at higher ISO the 40D has an increasing advantage, up to almost 1/3 stop at ISO 1600. Neither camera exhibits significant pattern noise (banding) in deep shadows.

Dynamic range: A standard definition of dynamic range is raw saturation level divided by read noise. At ISO 100,200,400,800, and 1600, green on the D300 clips at 12-bit level 3830, while red and blue clip at 4095. At ISO 3200 all channels clip at 4095. The green channel dynamic range is thus:

ISO

100

200

400

800

1600

3200

D300 12-bit DR

-

11.5 stops

10.7

9.9

9.0

8.1

D300 14-bit DR

-

11.6 stops

10.8

9.9

9.1

8.1

Table 3: D300 dynamic range vs ISO.


The additional two bits appear to confer a slight improvement in dynamic range. These dynamic range values for the D300 are comparable to those of the 40D:

ISO

100

200

400

800

1600

3200

40D 14-bit DR

11.3 stops

11.3

10.9

10.2

9.3

-

Table 4: 40D dynamic range vs ISO.


As an aside, the D300 has an ISO extension, at both the high and low ends. The lowest ISO was measured to have an actual sensitivity of ISO 125, using the relative photon collection efficiencies reported below. ISO 6400 appears to be a true ISO for the D300, insofar as there are no gaps in the histogram of the green channel raw data; for the 40D, the high-ISO extension to 3200 is achieved as a push of ISO 1600, by multiplying all raw values by two after quantization and hence there are no odd levels populated in the raw file.

Sensor efficiency: Another figure of merit is the sensor efficiency -- the number of electrons captured per raw level. This is often called the 'gain' of the sensor, though this is a somewhat inapt terminology (a gain is a pure number -- ratio of output to input of the same quantity -- so the quantity being called 'gain' is actually a conversion factor between units, from raw levels to electrons). This 'gain' is measured by taking two successive defocussed images of a uniform light source, overexposed by +2EV. The difference of the two frames (divided by sqrt[2]) gives the noise N, which consists of photon shot noise P and read noise R. Subtracting out the read noise in quadrature gives the photon shot noise, and the so-called 'gain' g of the sensor is the average illumination S of the bright frame divided by the square of the shot noise (both measured in raw levels). In equations:

   P = sqrt(N^2 - R^2)

   g = S/P^2

The results for the D300 in each color channel are as follows:

ISO

LO

200

400

800

1600

3200

G

7.1 e-/ADU

5.5

2.7

1.3

.65

.33

B

5.8 e-/ADU

4.6

2.3

1.1

.55

.27

R

5.7 e-/ADU

4.5

2.2

1.1

.54

.26

Table 5: Sensor efficiency of the D300 (electrons/12-bit ADU) at various ISO, in each color channel.


Not surprisingly, the 'gain' is inversely proportional to the ISO amplification, since doubling the ISO for given shutter speed and aperture halves the number of photons collected. The LO ISO extension reveals that its sensitivity is ISO 125, assuming ISO 200 and the rest are calibrated correctly.

Now, the photosite electronics is the same from pixel to pixel; different color channels differ only by the color filter overlaying the photodetector, therefore there should be no difference in the 'gain' between different color channels. The anomalous discrepancy in 'gain' observed in different color channels is attributable to a software multiplication of the digital signal after quantization but before writing out the raw data. Looking at the histograms of the three channels, there are no gaps in the green channel data, while there are gaps in the blue data indicating that it has been rescaled by a factor 20/17~1.18 after quantization; and gaps in the red data indicating a rescaling by a factor 11/9~1.22 after quantization. Correcting for these factors, all three color channels exhibit the same sensitivity for the underlying photodetector, as they should.

Separate measurement of the efficiency in 14-bit mode at ISO 200 yielded 1.40 e-/ADU in the green channel, and 1.14 e-/ADU in each of the red and blue channels -- quite consistent with the 12-bit results (they should and do differ by a factor of four reflecting the fact that a raw level in 12-bit quantization equals four raw levels in 14-bit quantization). By way of comparison, the 40D sensor collects 3.1 electrons/14-bit ADU at ISO 100 in all three color channels, again decreasing in inverse proportion to ISO gain. This translates to 6.2 e-/12-bit ADU at ISO 200.

To normalize, note that the D300 has 5.5 micron pixels, while the 40D pixels are 5.7 microns. Scaling up the D300 green channel efficiency by the ratio of pixel areas gives 5.9 e-/12-bit ADU at ISO 200; the 40D gets 6.2 e-/12-bit ADU. So the 40D has a 5% advantage in light collection efficiency per unit area of sensor, and a 13% advantage at the pixel level, for the green channel.

Relative sensitivities: Images were taken of a diffuse, defocussed light source. While the source was in no way calibrated, by comparing the raw levels recorded by the two cameras as a percentage of raw saturation level, one can measure the relative sensitivity of the two cameras. One uncontrolled variable here is the fact that the images for the D300 and 40D were taken with different lenses, having in principle different transmissivities of light; however the designs of the two lenses used (Canon 100-400L IS and Nikon 80-400VR) are so similar that one could assume that these transmissivities should lie within a very few percent of one another. With this caveat, the following relative sensitivities were observed:

tests w/lenses

green

blue

red

D300/40D bare sensitivity

1.30

1.35

1.63

D300/40D corrected sensitivity

1.22

1.08

1.26

Table 6: Relative sensitivities D300 vs 40D in each color channel.


For the first row of the above table, the raw levels as percentage of raw saturation level were recorded; the entry in the table is the ratio of those percentages for each color channel. In the second row, the software multiplication of D300 raw data has been undone to reveal the sensitivities of the pixels themselves, giving a more accurate picture of the relative transmissivities of the corresponding color filters. It would appear that overall, the D300 is up to 1/3 stop more sensitive than the 40D.

This result seemed curious, and so further analysis was undertaken. In order to rule out effects of the lens, differing calibrations of shutter speed and aperture, etc, a second test was conducted. The cameras were placed side by side with no lens. Both were set for two second exposure in a darkened room; in the middle of the exposure a 580EXII flash with diffuser was set off at 1/64 power, illuminating both sensors equally (a second set with the cameras interchanged was taken to rule out stray reflection effects etc; and an exposure without flash to determine the amount of ambient light, which turned out to be essentially zero). This test revealed much more consistency between the two cameras.

tests w/flash, no lens

green

blue

red

D300/40D bare sensitivity

.98

.97

1.27

D300/40D corrected sensitivity

.98

.85

1.04

Table 6a: Relative sensitivities D300 vs 40D in each color channel -- bare sensor measurement.

At this point the evidence seems to suggest that the relative sensitivities are comparable, and that the ISO calibration of the two cameras are the same within measurement error. Perhaps the discrepancy with the previous test can be attributed to differences in exposure time and lens aperture, transmissivity, etc.; with the lens out of the way and both sensors exposed to the same light source, the difference between the green channel sensitivities of the two cameras observed in the initial test disappears.

Resolution (MTF) tests: An attempt was made to probe the resolution of the D300 and 40D, in particular the strength of the anti-alias filter. Necessarily such tests involve the choice of a lens for the test, and to be valid the lens must outresolve the sensor. The lens used on the Nikon was the AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED, while the Canon was tested using the EF100mm f/2.8 Macro USM; both are among the sharper of the lens offerings of the two companies, and both were tested at f5.6 and 100mm focal length. The testing procedure followed was laid out in Norman Koren's tutorial at http://www.normankoren.com/Tutorials/MTF5.html (including the use of his test chart). The RAW files were not processed through a converter; rather the two green channels of the Bayer array, containing representatives from every row and column, were used to measure horizontal and vertical resolution. The images were analyzed using ImageJ to extract a sample MTF profile, which was then read into Mathematica for quantitative analysis. Here are the MTF profiles:


Fig 4 - MTF curves for the D300



Fig 5 - MTF curves for the 40D


Here the blue curve shows horizontal resolution, while the red curve gives vertical resolution. The horizontal and vertical scales are somewhat arbitrary (the horizontal scale is related to the logarithm of the spatial frequency). The rapid oscillation on small scales is an artifact of the analysis method and should be averaged out for the purpose of interpretation. Both cameras show response out to the Nyquist frequency (the theoretical limit of resolution), which is 90.6 lp/mm for the D300, and 87.7 lp/mm for the 40D. MTF50 for the D300 is about 42 lp/mm for the D300, and 44 lp/mm for the 40D. To translate these figures into line pairs per picture height, multiply the D300 results by 31.6 and the 40D results by 29.6.




Qualitative measures of image quality: The sensor efficiency is a useful metric of image quality. Since photon noise decreases relative to signal when more photons are collected, and photon noise is the dominant source of noise in midtones and highlights, noise in these exposure zones is least for the sensor collecting the most photons. One should be careful though as to what measure of "most photons" is used; more about this below.

Combining results from various sources:
http://www.clarkvision.com/imagedetail/digital.sensor.performance.summary/;
http://astrosurf.com/buil/us/test/test.htm
http://home.comcast.net/~NikonD70/Investigations/Sensor_Characteristics.htm
http://www.brisk.org.uk/photog/d3summary.html
http://www.openphotographyforums.com/forums/showthread.php?t=4784
together with my own measurements of the Canon 1D mark 3, Canon 1Ds Mark 2 results from B. van der Wolf, and the results obtained above; one arrives at the following hierarchy of sensor efficiencies:


D200

50D

10D

350D

400D

D300

20D

40D

1Ds2

1D2

1Ds3

5D

1D3

D3

2.0

2.2

2.3

2.6

2.7

2.7

3.1

3.1

3.3

3.3

4.0

4.1

5.1

8.1

Table 7: Photosite efficiencies, in electrons per 12-bit ADU at ISO 400.



This figure of merit quantifies the light-gathering ability of the corresponding pixels, and thus the image quality when viewed at 100% magnification. For instance, one sees that a 1D3 pixel is over 1/2 stop more efficient than a 1D2 pixel, despite being smaller.

Another metric is the electrons captured per unit area of sensor; this gives a measure of the image quality when images captured at the same focal length are cropped to the same field of view and resampled to the same pixel dimensions. Taking the efficiency data from the above table and dividing by the respective pixel areas, one finds

10D

1D2

D200

5D

350D

1Ds2

20D

400D

D300

40D

1D3

1Ds3

50D

D3

.042

.049

.054

.061

.064

.064

.076

.083

.089

.095

.098

.098

.100

.113

Table 8: Light collecting ability per unit area: Photosite efficiency divided by pixel area in square microns.


Finally, we can factor in the different sensor sizes, by multiplying the efficiencies of the pixels (Table 7) by the (mega)pixel count:


10D

D200

350D

20D

1D2

400D

40D

50D

D300

1D3

5D

1Ds2

1Ds3

D3

14.5

20.0

20.8

25.4

27.1

27.3

31.3

33.1

33.2

51.5

52.1

54.8

84.7

98.0

Table 9: Sensor light collecting ability: Photosite efficiency multiplied by megapixel count.


This metric gives the relative light collecting efficiency for equal percentage areas of the frame. Here the D3 and 1Ds3 really shine, though clearly the results are (apart from the rather poorly performing 1D2) basically grouped into categories by sensor size since larger sensors typically collect more photons.