what's wrong with pixel peeping?

Started Nov 28, 2008 | Discussions thread
ejmartin Veteran Member • Posts: 6,274
40D/50D comparison -- downsampling vs theory

GordonBGood wrote:

You basically answered the questions of Phil's blog as to why
downsampling didn't remove the noise in that the noise had already
been stripped as if these images were from a camera that had already
applied noise filtering and that proper algorithms and techniques
need to be used. What I would like to see is something provided to
Phil that he could post as an extension to his blog page that would
show him and his public how proper comparisons of cameras of
different pixel densities could be compared effectively.

Since when is Phil given to admitting error?

You made lots of posts showing all the pieces,
but perhaps we should have a post
showing how the Canon G10 isn't really worse than the G9 or or
G7 (although I regret it doesn't have native raw, although I think
the CHDK patch now works with it). Any takers? Or maybe I'll take a
stab at it myself. In that way, we are addressing the real issue as
you say.

Unfortunately, I don't have a G10 or G9, and Imaging-Resource is not hosting RAW test files of the G9. So I did the next best thing, I compared two ISO 1600 images from the 40D and 50D, using the following two RAW files:

http://75.126.132.154/PRODS/E40D/FULLRES/E40DhSLI1600.CR2
http://75.126.132.154/PRODS/E50D/FULLRES/E50DhSLI01600.CR2

The files look like this (thumbnail taken from IR):

I converted each file in DPP with NR turned off completely (according to the controls of the converter). I then picked a uniform patch on the background wall on the far right as a suitable region to do a spectral analysis of the noise. The noise spectrum of the Green channel was generated for each of the following (I looked at the Red channel, and the results were not much different):

1. The 40D.
2. The 50D.

3. The 50D resampled by a factor of 2592/3168 (the ratio of the vertical pixel counts) using PS Bicubic.

4. The 50D resampled by this same factor using ImageMagick with the Lanczos filter.

And now for the results. First, the noise spectra of the 40D (red) and the 50D (blue):

How is this data plot to be read? The horizontal axis is spatial frequency (fineness of scale in the image), with the Nyquist frequency (the pixel level) all the way to the right and the coarsest scales all the way to the left. The vertical axis is a measure of the amount of noise. So the data points are a measure of the amount of noise at a given scale in the image. Uncorrelated noise would appear as a rising straight line.

Hmm. It looks like the 50D is noisier than the 40D at all spatial frequencies! But that is because the Nyquist frequency is a finer scale on the 50D than it is on the 40D. The green data is the 50D data rescaled by the factor 2592/3168=.8182, which is the theoretical factor by which noise should scale -- the noise of the 40D at Nyquist should be .8182 times the noise of the 50D at its Nyquist frequency, and similarly for any spatial scale which is a given fixed fraction of Nyquist for each camera.

And indeed, performing this rescaling the noise performance of both cameras' noise spectra are nearly identical! In fact, the properly rescaled 50D data lies slightly below the 40D noise, because the 50D is in fact slightly more efficient per unit area in capturing photons, and so has a slightly higher S/N per unit area.

Now for the issue of downsampling the image. The 50D image was resampled by a factor .8182 to match the resolution of the 40D. Two versions were performed, Bicubic downsampling in Photoshop CS3, and Lanczos resampling in ImageMagick. Fourier spectra of the noise were evaluated in ImageJ, then collated and graphed in Mathematica. Here are the results (as before, 40D data in red, 50D data theoretically scaled in green; Photoshop Bicubic resampling in orange; IM Lanczos resampling in black)

The Photoshop resize is a bit more noisy because the algorithm is less precise, but it is quite close to the theoretical prediction. The Lanczos resampling is closer still. All told, the data shows that downsampling the noise spectrum of a higher pixel density camera (that has not been depleted at high frequency due to noise reduction, as in Phil's blog post examples) yields a noise spectrum that quite closely matches the theoretical expectation. The better the resampling algorithm, the closer it comes to the theoretical ideal. The default Lanczos algorithm in ImageMagick is reasonably good, and better can be had if so desired without extraordinary computational cost.

The takeaway lesson is that two cameras, one with 50% more pixels in the same size sensor, have equal levels of noise when properly compared, either by theoretically scaling the result of a raw conversion, or by downsampling the higher resolution image to match the lower resolution image.

If noise reduction had been performed, either in the RAW converter or after conversion, the noise power at the highest spatial frequencies would have been reduced. But since one can generate the noise spectrum of the lower resolution sensor by downsampling before noise reduction, whatever noise scrubbing one wishes to perform can be made to have the same effect on both the 40D and the downsampled 50D (though I wouldn't recommend it as an optimal post-processing scheme for the 50D).

-- hide signature --
Post (hide subjects) Posted by
jp
jp
jp
jp
tko
jp
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow