PDF (1.6 MB)
Christian Loebich · Dietmar Wüller (Image Engineering · Augustinusstraße 9d · 50226 Frechen · Germany)
Bruno Klingen (Kirchstraße 22 · 40227 Düsseldorf · Germany)
Anke Jäger (Canon Deutschland GmbH · Siemensring 90-92 · 47877 Willich · Germany)
Electronic Imaging Conference 2007
The resolution of a digital camera is defined as its ability to reproduce fine detail in an image. To test this ability methods like the Slanted Edge SFR measurement developed by Burns and Williams (1) and standardized in ISO 122332 are used. Since this method is - in terms of resolution measurements - only applicable to unsharpened and uncompressed data an additional method described in this paper had to be developed. This method is based on a Sinusoidal Siemens Star which is evaluated on a radius by radius or frequency by frequency basis. For the evaluation a freely available runtime program developed in MATLAB is used which creates the MTF of a camera system as the contrast over the frequency.
Keywords: modulated siemens star, MTF, SFR, contrast function, camera resolution measurement
ISO 122332 mentions a visual approach to determine the resolution of a digital camera as well as the SFR (Spatial Frequency Response) measurement that uses a slanted edge to analyse the contrast over the frequency. The visual evaluation led to different results depending on the person doing the evaluation. The SFR-method led to excellent results for camera-backs and cameras where access to raw data was available or sharpening and compression could be switched off. With some digital consumer cameras for which sharpening can not be switched off the SFR measurement results looked like the ones shown in figure 1. This was the reason why a new method had to be found which can be applied to every camera system.
Figure 1. The shape of the contrast curve does not match the visual impression of the structures in the image, with a higher stability for digital compact cameras.
2. REQUIREMENTS FOR THE NEW METHOD
The Method should be applicable to all digital cameras and the time needed to determine the resolution should be less than an hour. If possible the method should require only a single image to capture all the necessary data. Multiple images should only be used to reach a higher level of accuracy. If possible the method should provide information about the resolution at different positions in the image. The method should be stable, and lead to reliable results especially concerning sharpening and compression algorithms. This means that high contrast and sharp edges should be avoided. For the test target only structures should be used which lead to constant measurement results independent of the target position relative to the sensor. There should be no visual evaluation necessary during the resolution evaluation process but the measurement results should match the visual impression of the image.
3. THE TARGET
As mentioned in 2 the area used to determine the resolution should not consist of high contrast edges. To apply the method to processed images the data has to be linearized which requires a defined grey scale. A wide range of frequencies in the target increases the reliability of the results which led to a Siemens Star as the preferred structure and a sinusoidal shape of the radial structures. The sine shape should be linear in reflection. In the corners of each siemens star are four patches with a small white square inside a bigger black square which is used to detect the position of the Siemens star. In the center of each siemens star there is a focusing target to give the camera a possibility to focus on a high contrast edge. Based on the current production method a star with 144 cycles and a height of 27 cm which covers one third of the image height can be used to measure cameras with up to 30 Megapixels. For cameras below 1 megapixel a star with 72 cycles should be used.
Figure 2. A sinusoidal Siemens star appeared to be the ideal structure to test the resolution of cameras. The Star is surrounded by 16 gray patches, which are used to linearize the image prior to the analysis. A central marc helps to get the focus right and to fine tune the detection of the center.
In order to achieve information about the camera resolution of the whole image the standard target used for testing cameras should consist of 9 stars aligned in 3 columns. The ideal solution is to have the three columns separately adjustable to the aspect ratios of 4:3, 3:2, and 16:9. For the evaluation the stars are numbered as shown in figure 3.
Figure 3. The standard target consists of nine sinusoidal Siemens stars aligned in three columns and numbered as shown here.
Figure 4. For the evaluation each Star is divided into 8 Segments numbered as marked above.
For the analysis each star is divided into 8 Segments to find out about orientation specific image processing in the camera. The segments are numbered as stated in figure 4. Using the 144 cycle star each segment includes 18 cycles which are required to get reliable results at frequencies close to the Nyquist frequency.
4. THE ALGORITHM
To evaluate the resolution a MATLAB based software is used which reads the image first. Depending on the software version the Siemens stars are automatically or manually detected using the marks in the corners and the center of each star. Then the OECF of the camera is determined using the 16 grey patches of the central star. The image is linearized using the inverse of the OECF.
Figure 5. Chosen positions of the OECF patches and the center of the star number 0
From the diameter of the stars and the image height the scale is determined to translate the star frequency into Line Width per Picture Height (LW/PH) (4).
res : resolution in LP/PH
Np : Number of cycles for the Siemens star
Ny : Image height in Pixel
rPixel : radius of the circle (from the center of the star)
To correct for a possible distortion the star is divided into 24 segments and for each segment the boundary of the star is detected. The appropriate radii for the evaluation (figure 6) of the stars are calculated. These calculated radii are corrected with a factor depending on the irregular circular shape which was found for the single star. This way a distortion can be corrected without modification of the image itself. Then the star is divided into 24 segments. In one segment on one single radius the nearest pixels to that radius are searched and digital value and the angle under which the pixel was found are stored. There is no interpolation for pixel values on the radius. Instead of using interpolation methods the nearest pixel beside the correct radius position is used, if there is no pixel in the exact place (figure 7). This leads to lower errors in the result than pixel value interpolation. The mean value of the data of 3 segments is calculated. So finally data of eight segments is obtained (figure 4). This provides information on vertical, horizontal and vertical contrast behavior of the cameras.
Figure 6. For 24 segments the border of the star is detected and results in a distortion corrected analysis.
Figure 7. Chosen pixels along a circle of a siemens star.
Figure 8. A sine curve with least minimum error will be fitted in the measurement data.
The digital values which are found for the radius are plotted over the angle under which they have been found like seen in figure 8. The plotted curve will looks like a sine curve with some deviations. Then a sine curve with least square error is fitted into the measurement data. The advantage at this point is, that we already know that the curve has to be sine shaped and we also know the frequency at the specific radius from the reproduction scale which was calculated before in the image. Now the contrast calculation can be done based on the ideal curve(figure 8). (4)
Figure 9. A Sine curve is fitted into the collected data.
For the harmonic siemens star the amplitude is given as:
The angle under which the pixel is found can be calculated using:
with x=0,y=0 for the center point of the star.
Since the phase of the signal is not known the following approximation has to be used:
the value b can be calculated from
In the fit process the MATLAB „left division“ function is used to modify a, b1 and b2 in order to minimize the square error in relation to the values collected from the pixels. The contrast for each radius/frequency is then calculated using:
The Results of calculation are written to a text file. For each of the eight segments in each of the 9 stars the SFR (Spatial Frequency Response) of the camera is listed as the contrast over the frequency. This means a total of 72 SFRs for a single image. This data provides a lot of information about the camera system used to capture the image. Here are a few examples:
Figure 10. SFRs for the 8 Segments of the central star.
The shape of the SFRs for the segments of the center star shown in figure 10 appears to be different. This indicates either an orientation specific image processing or a special sensor geometry that prefers a specific orientation. Figure 11 shows 4 groups of stars which have the same contrast level. These groups are star 0, stars 1 and 5, stars 3 and 7, and stars 2 , 4, 6, and 8. Each group represents a certain distance from the image corner and the increasing distance results in a loss of contrast which for lower frequencies equals sharpness. So the tested camera shows a fall off in sharpness from center to the corners but since the SFRs for each group are close together the lens appears to be well centered. This is not the case for the camera tested in figure 12. In this case the contrast of star 6 is much lower than that of star 2 which indicates a centering/alignment problem in the tested camera system.
Some of the curves in figure 10 and 12 show a bump at low frequencies. This bump is created by the sharpening applied to the image. In contrast to the slanted edge method where the sharpening applied to the edge leads to results at high frequencies which do not correlate to high frequency structures in the images, the Sine Based SFR using the Siemens star leads to correct results for all frequencies which of course include the sharpening applied by the camera.
Figure 11. SFRs for the nine stars in the image taken with a camera that has a well centered lens
Figure 12. SFRs of a camera with a decentered lens
Figure 13. The related central parts of the nine stars evaluated in figure 12
Many users would like to get a single number for the resolution of a camera. This is as demonstrated not that easy to do because of the variations over the image and for the segments of the stars. But since the resolution is the ability of a camera to reproduce fine detail it might be interesting to look at the contras level which indicates a limit for the human eye to differentiate certain structures. To find out about the minimum contrast needed to differentiate Williams (5) used the r10 criterion defined by Lord Rayleigh in 1879 (6) which also matches our experinance in the Image Engineering Labs.
Figure 14. R10 criteria
This means that the limiting Resolution is the frequency where the SFR reaches a contrast value of 10%.
Figure 15. The limiting resolution for the 8 segments of the central star.
Figure 16. The limiting resolution for the 8 Segments of all 9 stars. The values are given in percent of Nyquist
The graphical presentations in figure 15 shows the limiting resolution for the 8 segments of a star. In this case the figure is another sample for a camera with an orientation specific image processing. In figure 16 a decentered system is demonstrated by using the limiting resolution for all Siemensstars. The larger the circle the higher the resolution.
The presented method to measure the SFR/MTF of a camera system has proven over the last 3 years that it is a reliable method which can be applied to all cameras regardless of the image processing in the camera. Therefore ISO TC42 WG18 currently considers to add the method to a future revision of ISO 12233. A runtime version of the analysis software which analyses one star at a time as well as the source code for the basic part is available for free from the I3A Website under http://www.i3a.org/downloads_iso_tools.html or the Image Engineering website http://digitalkamera.image-engineering.de/index.php/Downloads.
Many thanks to the co authors Anke Jeager (former Neumann), who developed this method together with Prof. Dr. Bruno Klingen and Prof. Dr. J. Gutjahr at the University of Applied Sciences in Cologne, Germany, and to Anton Kraus University of Applied Sciences in Cologne, Germany.