Measuring Camera Shannon Information Capacity with a Siemens Star Image
Total Page:16
File Type:pdf, Size:1020Kb
https://doi.org/10.2352/ISSN.2470-1173.2020.9.IQSP-347 © 2020, Society for Imaging Science and Technology Measuring camera Shannon Information Capacity with a Siemens Star Image Norman L. Koren, Imatest LLC, Boulder, Colorado, USA Abstract Measurement background Shannon information capacity, which can be expressed as bits per To measure signal and noise at the same location, we use an pixel or megabits per image, is an excellent figure of merit for pre- image of a sinusoidal Siemens-star test chart consisting of ncycles dicting camera performance for a variety of machine vision appli- total cycles, which we analyze by dividing the star into k radial cations, including medical and automotive imaging systems. Its segments (32 or 64), each of which is subdivided into m angular strength is that is combines the effects of sharpness (MTF) and segments (8, 16, or 24) of length Pseg. The number sine wave noise, but it has not been widely adopted because it has been cycles in each angular segment is 푛 = 푛푐푦푐푙푒푠/푚. difficult to measure and has never been standardized. We have developed a method for conveniently measuring inform- ation capacity from images of the familiar sinusoidal Siemens Star chart. The key is that noise is measured in the presence of the image signal, rather than in a separate location where image processing may be different—a commonplace occurrence with bilateral filters. The method also enables measurement of SNRI, which is a key performance metric for object detection. Information capacity is strongly affected by sensor noise, lens quality, ISO speed (Exposure Index), and the demosaicing algo- rithm, which affects aliasing. Information capacity of in-camera JPEG images differs from corresponding TIFF images from raw files because of different demosaicing algorithms and nonuniform sharpening and noise reduction. Figure 1. 144-cycle Siemens star pattern. Introduction For radius r in pixels, the spatial frequency in Cycles/Pixel is In electronic communications systems, Shannon informa- 푓 = 푛푐푦푐푙푒푠/2휋푟. This means that the Nyquist frequency, fnyq = tion capacity C defines the maximum rate in bits per second that 0.5 C/P is located at r = 46 pixels for a 144-cycle star and 23 data can be transmitted through a channel without error. For pixels for a 72-cycle star [3]. additive white gaussian noise, it is given by the deceptively We calculate the ideal (pure sine wave + second harmonic) simple Shannon-Hartley equation. signal sideal(휑) for each segment from the actual (noisy) input signal sinput(휑), using Fourier series coefficients aj and bj [4]. 퐶 = 푊 log (1 + 푆 ) = 푊 log (푆+푁) (1) 2 푁 2 푁 2 2휋푗푛휑 2휋푗푛휑 푠푖푑푒푎푙(휑) = ∑푗=1 푎푗 cos ( ) + 푏푘 sin ( ) (2) 푃푠푒푔 푃푠푒푔 While it is quite logical to extend this definition to imaging systems, where C has units of bits/pixel, a number of questions where arise. How should bandwidth W (closely related to sharpness) be defined? What to use as signal S? Can we trust measurements 2 2휋푗푛푥 from consumer camera JPEG images, which often have nonuni- 푎 = ∫ 푠 (푥) cos ( ) 푑푥 푗 푃 푃 푖푛푝푢푡 푃 form image processing (bilateral filtering) [1] that reduces noise 푠푒푔 in smooth areas (lowpass filtering) but sharpens the image near 2 2휋푗푛푥 contrasty features such as edges (high frequency boost)? 푏푗 = ∫ 푠푖푛푝푢푡(푥) sin ( ) 푑푥 (3) Because nonuniform image processing is so commonly 푃 푃 푃푠푒푔 applied, it is highly desirable to measure signal and noise at the same location in the image, i.e., to measure noise in the presence The second harmonic term (j = 2) term improves results for of signal. We have developed a method to accomplish this with JPEG images from cameras, which frequently have “shoulders” the well-known Siemens Star chart, which is a part of the ISO (regions of reduced contrast) in their tonal response curves, 12233:2014/2017 standard [2]. making them difficult to linearize with a simple gamma formula. IS&T International Symposium on Electronic Imaging 2020 Image Quality and System Performance 347-1 2휋 퐵 푆(푓푟,푓휃)+푁(푓푟,푓휃) 퐶 = ∫ ∫ log2 ( ) 푓푟 푑푓푟 푑푓휃 (7) 0 0 푁(푓푟,푓휃) Since 푆(푓푟, 푓휃) and 푁(푓푟, 푓휃) are only weakly dependent on θ, (7) can be rewritten in one-dimension. 퐵 푆(푓)+푁(푓) 퐶 = 2휋 ∫ log ( ) 푓 푑푓 (8) 0 2 푁(푓) The minimum star frequency is 푓푚푖푛 = 푛푐푦푐푙푒푠/2휋푟푠푡푎푟 where rstar is the radius of the star in pixels. The contribution of frequencies below fmin is calculated by extrapolation— by assu- ming that 푆(푓) = 푆(푓푚푖푛) and 푁(푓) = 푁(푓푚푖푛) for 푓 < 푓푚푖푛. This assumption is reasonable for 푁(푓) but somewhat pessi- mistic for 푆(푓). However, the effect on C is minimal because of the presence of fr in the integrand of Equation (8). C is strongly dependent on noise 푁(휑), which is calculated from the difference between the input signal (which includes Figure 2. Illustration of 푠 (휑) (blue), 푠 (휑)) (brown), and noise 푁(휑) = 푖푛푝푢푡 푖푑푒푎푙 noise) and the perfect sine wave signal. This causes C to decrease 푠푖푑푒푎푙(휑) − 푠푖푛푝푢푡(휑) (green). in the presence of artifacts such as aliasing and saturation. Aliasing has little effect on standard MTF measurements, and The spatial domain noise in each segment is saturation (or clipping) actually improves measurements even though it degrades system performance. We will discuss aliasing ( ) 푁 휑 = 푠푖푑푒푎푙(휑) − 푠푖푛푝푢푡(휑) (4) in more detail. The roughness of sinput and N(φ) in Figure 2, which is derived Measurement method from all points in the segment (sorted), does not represent the A key challenge in measuring information capacity is how to actual frequency distribution of the noise, and does not affect the define mean signal power S. Ideally, the definition should be calculation of frequency domain noise power 푁(푓). The noise based on a widely-used test chart. For convenience, the chart spectrum is more closely related to the noise image (with signal should be scale-invariant (so precise chart magnification does removed), illustrated in Figure 8. not need to be measured). And, as we indicated, signal and noise The mean signal power used to calculate C is 푆(푓) = should be measured at the same location. For different observers mean(푎2 + 푏2)/2 for all angular segments at radius r (where 푓 = 푛 푛 to obtain the same result the chart design and contrast should be 푛 /2휋푟). Frequency domain noise power 푁(푓) is the mean of 푐푦푐푙푒푠 standardized. 2 the variance (σ ) of the middle 80% of N(φ) for each angular To that end we recommend a sinusoidal Siemens star chart segment (there can be irregularities near the ends). similar to the chart specified in ISO 12233:2014/2017, Annex E. We started the analysis the integral form of the Shannon Contrast should be as close as possible to 50:1 (the minimum information capacity equation [5], which is appropriate for one- specified in the standard; close to the maximum achievable with dimensional systems: matte media). Higher contrast can make the star image difficult to linearize. Lower contrast is acceptable, but should be reported 퐵 ( ) 퐵 ( ) 푆 푓 푆 푓 +푁(푓) with the results. The chart should have 144 cycles for high resolu- 퐶 = ∫0 log2 (1 + ) 푑푓 = ∫0 log2 ( ) 푑푓 (5) 푁(푓) 푁(푓) tion systems, but 72 cycles is sufficient for low resolution sys- tems. The center marker (quadrant pattern), used to center the Where C is the channel capacity in bits/pixel; B = Nyquist image for analysis, should be 1/20 of the star diameter. frequency 푓 ; 푆(푓) is the signal power spectrum, 푁(푓) is the 푁푦푞 Acquire a well-exposed image of the Siemens star in even, noise power spectrum (which we interpret as broadband noise glare-free light. Exposures should be reasonably consistent when in the presence of signal 푆(푓)). multiple cameras are tested. The mean pixel level of the linea- The difficulty with this equation is that Information capacity rized image inside the star should be in the range of 0.16 to 0.36. applies to two-dimensional images, whereas all sharpness-rela- (The optimum has yet to be determined.) ted measurements (MTF and 푆(푓)) refer to one dimension, for The center of the star should be located as close as possible example, MTF in units of cycle/pixel actually means cycle per to the center of the image to minimize measurement errors pixel length. To overcome this limitation, we express C as a caused by optical distortion (if present). double integral. The size of the star in the image should be set so the maximum spatial frequency, corresponding to the minimum 퐵 푆(푓푥,푓푦)+푁(푓푥,푓푦) 퐶 = ∬ log ( ) 푑푓 푑푓 (6) radius rmin, is larger than the Nyquist frequency fNyq, and, if 0 2 푁(푓 ,푓 ) 푥 푦 푥 푦 possible, no larger than 1.3 fNyq, so sufficient lower frequencies are available for the channel capacity calculation. This means that where 푓푥 and 푓푦 are frequencies in the x and y-directions, a 144-cycle star with a 1/20 inner marker should have a diameter respectively. In order to evaluate this integral, we transform x of 1400-1750 pixels and a 72-cycle star should have a diameter and y into polar coordinates r and θ. of 700-875 pixels. For high-quality inkjet printers, the physical IS&T International Symposium on Electronic Imaging 2020 347-2 Image Quality and System Performance diameter of the star should be at least 9 (preferably 12) inches (23 to 30 cm).