![]() |
Shannon information capacityinformation that can pass through a channel without error | ![]() |
|
Meaning
Results
Summary
See Also
Imatest SFR Tour
Imatest SFR Instructions
Chromatic Aberration, Shannon Capacity plot
Nothing like a challenge! For some time I've been intrigued by the fact that there is such a metric for electronic communication channels— one that specifies the maximum amount of information that can be transmitted through a channel. The metric includes the effects of sharpness and noise (grain in film). And a camera— or any digital imaging system— is such a channel. The metric, first published in 1948 by Claude Shannon of Bell Labs, has become the basis of the electronic communication industry. It is called the Shannon channel capacity or Shannon information transmission capacity C , and has a deceptively simple equation. C = W log2(S/N+1) W is the channel bandwidth, which corresponds to image sharpness, S is the signal energy (the square of signal voltage), and N is the noise energy (the square of the RMS noise voltage), which corresponds to grain in film. It looks simple enough (only a little more complex than E = mc2 ), but the details must be handled with care. Fortunately you don't need to know the details to take advantage of the results. We present a few key points, then some results. More details are in the green ("for geeks") box at the bottom.
Meaning of Shannon capacityIn electronic communication channels the Shannon capacity is the maximum amount of information that can pass through a channel without error, i.e., it is a measure of its "goodness." The actual amount of information depends on the code— how information is represented. But coding issues are not important for digital photography. What is important is the following hypothesis:
Perceived image quality is proportional to Shannon information capacity, which is a function of
both MTF (sharpness) and noise (grain).
I stress that this statement is a hypothesis— a fancy mathematical term for a conjecture. But it strongly agrees with my experience and that of many others. Now that Shannon capacity can be calculated with Imatest, we have an opportunity to learn more about it. The Shannon capacity, as we mentioned, is a function of both bandwidth W and signal-to-noise ratio, S/N. It's important to use good numbers for both of these parameters. It texts that introduce the Shannon capacity, bandwidth W is usually assumed to be the half-power frequency, which is closely related to MTF50. Strictly speaking, this is only correct for white noise (a flat spectrum) and a simple low pass filter (LPF). But digital cameras have varying amounts of sharpening, and strong sharpening can result in response curves with large peaks that deviate substantially from simple LPF response. Imatest gets around this problem by using standardized sharpening, which sets the response at 0.3 times the Nyquist frequency equal to the response at low frequencies. MTF50C (corrected; with standardized sharpening) is used for bandwidth W. The choice of signal S presents some serious issues when calculating the signal-to-noise ratio S/N because S can vary widely between images and even within an image. It is much larger in highly textured, detailed areas than it is in smooth areas like skies. A single value of S cannot represent all situations. To deal with this we start with a standard value of signal, Sstd: the difference between the white and black zones in a reflective surface such as the ISO 12233 test chart. This represents a tonal range of roughly 80:1 (a pixel ratio of about 9:1 for for an image encoded with gamma = 1/2: typical for a wide range of digital cameras). Then we plot Shannon capacity C for a range of S from 0.01*Sstd (representing very low contrast regions) to 2*Sstd (about a 160:1 contrast range, which represents an average sunny day scene— fairly contrasty). Imatest displays values of C for three contrast levels relative to Sstd: 100% (representing a contrasty scene), 10% (representing a low contrast scene), and 1% (representing smooth areas). Results are shown below.
The Signal S, which is a part of the equation for Shannon capacity
C,
varies from image to image and even within images. It is large for
detailed, textured areas and small for smooth areas like skies. Sharpness
(i.e., bandwidth W) dominates image quality in detailed areas
where S is large; noise N is more important
in smooth areas where S is small.
For this reason we calculate C for several values of S. The 100% contrast value is for Sstd , the difference between white and black reflective surfaces. C is also calculated for contrasts of 10% and 1% of Sstd, representing low contrast images and smooth areas, respectively. Imatest results![]() Imatest displays noise and Shannon capacity plots at the bottom of the Chromatic aberration figure if the (Plot) Shannon capacity and Noise spectrum (in CA plot) checkbox in the SFR input dialog box is checked (the default is unchecked) and the selected region is sufficiently large. Here is a sample for the Canon EOS-10D. The noise spectrum plot is experimental. Its rolloff is strongly affected by the amount of noise reduction. The pale green and cyan lines represent two different calculation methods. The thick black line is the average of the two. The red line is a second order fit. Noise spectrum will become more meaningful as different cameras are compared. RMS noise voltage in the dark and light areas is expressed as a percentage of the difference between the light and dark signal levels, i.e., the standard signal S = Sstd. , i.e., noise is actually N/Sstd. The inverse of mean (the average of the two) is used as S/N in the equation forC. C = W log2((S/N)2+1) = 3.322 W log10((S/N)2+1) Shannon capacity C is calculated and displayed for three contrast levels.
The values of C are meaningful
only in a relative sense— only when they are compared to a range of other
cameras. Here are some typical results, derived from ISO 12233 charts published
on the internet.
Performance measurements were taken from the edge located about 16% above the center of the image. Here are some additional examples, illustrating unusual noise spectra. The Kodak DCS-14n shows a steep rolloff indicative of extreme noise reduction. This is reflected in the unusually high Shannon capacity at 1% contrast. ![]() The Olympus E-1 has an unusual noise spectrum, with a spike at Nyquist. I don't know what to make of it. ![]() SummaryHere is a summary of the key points.
Further considerations and calculations
Because of a number of factors (noise reduction, the use of MTF50C to approximate W, the arbitrary nature of S, etc.) the Shannon capacity calculated by Imatest is an approximation. But it can be useful for comparing different cameras.
Green is for geeks. Do you
get excited by a good equation? Were you passionate about your college
math classes? Then you're probably a math geek— a member of a maligned
and misunderstood but highly elite fellowship. The text in green is for
you. If you're normal or mathematically challenged, you may skip these
sections. You'll never know what you missed.
Calculating Shannon capacity
The measurement of Shannon capacity is complicated by two factors.
The correct, detailed equation for Shannon capacity was presented in Shannon's second paper in information theory, "Communication in the Presence of Noise," Proc. IRE, vol. 37, pp. 10-21, Jan. 1949. W is maximum bandwidth, P(f) is the signal power spectrum (the square of the MTF) andN( f ) is the noise power spectrum. There are a number of difficulties in evaluating this integral. Because P and N are calculated by different means, they are scaled differently. P( f ) is derived from the Fourier transform of the derivative of the edge signal, while N( f ) is derived from the Fourier transform of the signal itself. And noise reduction removes information while reducing N( f ) at high spatial frequencies below its correct value. For this reason, until we solve the scaling issues we use the simpler, less accurate, but less error-prone approximation, C = W log2((S/N)2+1) where bandwidth W is traditionally defined as the channel's -3 dB (half-power) frequency, which corresponds to MTF50,S is standard (white - black) signal voltage, andN is RMS noise voltage. The square term converts voltage into power. S/N (the voltage signal-to-noise ratio) is displayed by Imatest. (S/N can refer to voltage or power in the literature; you have to read carefully to keep it straight.) Strictly speaking, this approximation only holds for white noise and a fairly simple (usually second-order) rolloff. It holds poorly when P( f ) has large response peaks, as it does in oversharpened digital cameras. The standardized sharpening algorithm comes to the rescue here. Imatest uses MTF50C (the 50% MTF frequency with standardized sharpening) to approximate W. This assures that P( f ) rolls off in a relatively consistent manner in different cameras: it is an excellent relative indicator of the effective bandwidth W. RMS (root mean square) noise voltage N is the standard deviation (sigma) of the linearized signal in either smooth image area, away from the edge. It is relatively easy to measure using the slanted edge pattern because the dynamic range of digital cameras is sufficient to keep the levels for the white and black regions well away from the limiting values (pixel levels 0 and 255). Typical average (mean) pixel values are roughly 18-24 for the dark region and 180-220 for the light region, depending on exposure. Imatest uses the average of the noise in the two regions to calculate Shannon capacity. It displays noise as N/S: normalized to (divided by) the difference between mean linearized signal level of the white and black regions, S. Noise power N doesn't tell the whole story of image quality. Noise spectral density plays an important role. The eye is more sensitive to low frequency noise, corresponding to large grain clumps, than to high frequency noise. To determine the precise effect of grain, you need to include its spectral density, the degree of enlargement, the viewing distance, and the MTF response of the human eye. High frequency noise that is invisible in small enlargements may be quite visible in big enlargements. Noise metrics such as Kodak's print grain index, which is perceptual and relative, takes this into account. Fortunately the noise spectrum of digital cameras varies a lot less than film. It tends to have a gradual rolloff (unless significant noise reduction is applied), and remains fairly strong at the Nyquist frequency. It's not a major factor in comparing cameras— the RMS noise level is far more important. Very geeky: The limiting case for Shannon capacity. Suppose you have an 8-bit pixel. This corresponds to 256 levels (0-255). If you consider the distance of 1 between levels to be the "noise", then the S/N part of the Shannon equation is log2(1+2562) ≈ 16. The maximum possible bandwidth W— the Nyquist frequency— is 0.5 cycles per pixel. (All signal energy above Nyquist is garbage— disinformation, so to speak.) So C = W log2(1+(S/N)2) = 8 bits per pixel, which is where we started. Sometimes it's comforting to travel in circles. History Of course I didn't think of it first.
LinksThe University of Texas Laboratory for Image & Video Engineering is doing some interesting work on image and video quality assessment. They approach the problem using information theory, natural scene statistics, wavelets, etc. Challenging material! Education: Digital X-ray: Image Quality Parameters for Digital Detector from Wipro GE Healthcare. Interesting material related to an application where low noise (high SNR) is more important than high MTF. The exact definition of DQE is hard to find on the web.
|
|
|||