Camera MTF (sharpness) measurements are subject to a number of variations, some of which, like noise, are random and difficult to control, and some of which are systematic and can be corrected. Variations caused by limitations in chart sharpness are in the latter category. These variations are also affected by the Field of View (FoV) of the image used to test the camera, which is closely related to chart size for charts designed to fill the camera frame. For a given print technology, increasing the FoV, which typically means increasing the spacing between the chart and camera, will increase the measured MTF— making it more accurate. However, there are many practical situations where space is limited and small FoVs are called for, and chart sharpness can significantly affect the measurements. This post describes a method for quantifying and correcting such measurement variations. The method has the following steps.
There is little mention of test chart sharpness in the literature, perhaps because when the ISO 12233:2000 standard was created, high-resolution cameras had only about one megapixel, and hence it was easy to print adequate test charts.
View the video below for Norman Koren’s talk on Compensating MTF Measurements for Chart Quality Limitations. This article describes the concept in detail.
The first step in compensating camera MTF measurements is to measure the test chart MTF. This should be done by photographing the same features used to measure camera MTF. We describe the process for slanted-edges, but other patterns, such as Siemens stars, could also be used. Since we have found that edge sharpness in inkjet charts can depend on the edge orientation, we measure up to four edges (the left, right, top, and bottom of a dark square on a light background).
We performed our chart measurements with a 24 Megapixel APS-C camera that has a 23.5×15.6mm sensor with a 3.88-micron pixel pitch. We used a mechanically-focused 60mm prime macro lens that had a scale that displayed magnification. This enabled us to maintain constant chart magnification mchart for our tests, which is difficult to accomplish with lenses that have electronic focusing. We used mchart = 1:2 (0.5×) for inkjet charts and mchart = 1:1 (1×) for photographic paper and film charts, which are sharper. Chrome-onGlass charts are too sharp to be measured with this setup.
The setup (Fig. 1) consists of a custom-machined aluminum base and a sturdy aluminum extrusion column. Fine focus is controlled by a micrometric positioning sliding plate. The lens is fixed at mchart = 1:2 or 1:1. Simple adjustments are used to keep the sensor plane is parallel to the test chart. A non-flickering LED ring light is used for reflective charts; a light box is used for transmissive charts.
When calculating chart MTF it is important to select large enough Regions of Interest (ROIs) to obtain consistent results. For inkjet charts, which can have rough edges, especially when photographed at chart magnification mchart = 1:1 (1×), MTF50 can vary by as much as ±10% for small ROIs. To obtain good measurement consistency, we photographed inkjet charts at mchart = 1:2 (0.5×), using region sizes ≥ 900×1300 pixels. For chart media other than inkjet, all of which are finer, we used mchart = 1:1.
The measured chart MTF must be fit to an equation in order to reliably perform MTF compensation, where the measured camera MTF is divided by the model of the chart MTF projected on the sensor. We have chosen a function that (a) is simple– only two parameters, (b) is a good match to our chart MTF measurements, and (c) is guaranteed to decrease at high spatial frequencies.
MTFchart(fchart) = exp (-afchart – (bfchart)2)
Where fchart is the spatial frequency in Cycles/Object mm on the chart. a and b are found using an optimizer to match Equation (1) with MTF measurements for f ≤ f30, the first frequency where MTF drops below 0.3 (30%). This is done because noise can dominate MTF measurements for f > f30, as illustrated below (Fig. 3).
Parameters a and b are stored in a file along with metadata (the name of the test chart image file, chart magnification mchart, date, etc.) This file is read into the analysis program when chart compensation is to be applied. We have found that, apart from old charts made with unknown printers and settings, charts don’t need to be measured individually. A compensation file based on media, printer type, and print settings should be sufficient.
Fig. 2 illustrates an MTF measurement for a horizontal slanted-edge on an inkjet chart photographed with mchart = 0.5×. The upper curve shows the average edge profile. The rise distance (14 pixels) is large enough so that camera software sharpening will not affect the results. The lower plot shows the measured MTF (bold black curve) and the fit to the MTF (bold cyan curve) from Equation (1) for f < f30. The parameters for this fit are a = 0.10507 and b = 0.09407.
Curious artifacts sometimes appear in chart MTF measurements. Figure 3 is the MTF of an edge from a chart printed with the edges along the directions of paper and print head motion (not slanted). Test charts printed this way are cut slanted. A strong MTF response peak, visible around 13.5 Cycles/Object mm, appears to be caused by periodicity in the inkjet dots. (It’s not present when edges are printed slanted.) Fortunately, it’s well outside the analysis passband as well as the frequencies used to calculate a and b in Equation (1).
There are sometimes surprises in the MTF measurements. Chart MTF for photographic film printed on an LVT (Light Valve Technology) printer have a response indicative of sharpening (Fig. 4), apparently caused by uneven depletion of the film developer near edges—familiar to the author from his wet darkroom days. Note that the curve from Equation (1) (cyan) is a good match to the MTF curve, which has a sharpening bump.
To calculate MTF compensation, the chart spatial frequency in Cycles/Object mm, fchart, must be transformed into Cycles/Pixel (C/P) on the image sensor. For test magnification mtest,
f(C/Obj mm) = f(C/P) × mtest × pixels/mm
The MTF of the chart projected on the image sensor is:
MTFprojected(f) = MTFchart(f(C/P) × mtest × pixels/mm)
Finally, the chart-compensated MTF is:
MTFchart−comp(f) = MTFmeasured(f)/MTFdiv(f)
MTFdiv(f) = max(MTFprojected(f), 0.3)
Limiting the minimum value of MTFdiv to 0.3 prevents excessive high-frequency noise boost. And as we have shown in Fig. 3, chart MTF measurements at frequencies where MTF drops below 0.3 (f > f30) can be strongly affected by chart noise (especially for inkjet charts), and hence are not reliable.
The effects of chart compensation were tested using a 10-megapixel digital camera (a Panasonic Lumix LX5 from 2010) that had the following:
With this camera, we expected MTF measurements to be affected only slightly for the largest charts, which are designed to fill the image frame, and hence have the largest Fields of View (FoVs). We expected MTF measurements to be degraded significantly for the smallest charts.
Fig. 5 illustrates the two types of slanted-edge chart used in our testing: Imatest SFRplus (a grid of slanted squares with bars at the top and bottom) and eSFR ISO (an enhanced version of the ISO 12233:2014 edge SFR chart). Both charts have 4:1 contrast slantededges, as recommended in ISO 12233:2014. Sizes varied over a range greater than 10:1. These charts were printed over several years on a variety of media— inkjet and photographic paper (reflective), and color photographic film (transmissive).
The reported Fields of View (FoVs) are typically slightly larger than the active area of these charts. Both chart types have geometrical features that facilitate the calculation of test magnification mtest. For each image, four edges — Left (L), Right (R), Top (T), and bottom (B) from the square closest to the chart center — were analyzed for compensated and uncompensated MTF.
Since we didn’t know the history of the charts, MTF for sample edges was measured individually for each chart.
MTF measurements in Figures 6-9, each from an edge near the center of four very different test charts, illustrate the effects of chart MTF on results. Uncompensated MTF is shown as a magenta line. Compensated MTF is a bold black line. MTFdiv is a cyan line. MTF50 (the spatial frequency where MTF drops to 50% of its low-frequency level) is the key summary metric for comparing results.
The large inkjet chart in Fig. 6 (147×97cm Field of View FoV) has MTF50 = 1166 LW/PH (uncompensated) and 1345 LW/PH (compensated). Correction makes only a small difference in the MTF measurement, as expected. The MTF50 difference is largely caused by a small noise-related response bump.
The small inkjet chart in Fig. 7 (32×21cm FoV) has MTF50 = 922 LW/PH (uncompensated) and 1302 LW/PH (compensated). Correction makes a significant difference. Results would be inaccurate without it. f30 is far enough above the Nyquist frequency to ensure good measurement results.
The small, low-quality inkjet chart in Fig. 8 (25×17cm FoV) has f30 well below the Nyquist frequency. Results are not reliable. This chart is inadequate for measuring the quality of this camera system.
The small but extremely high-quality LVT film chart in Fig. 9 (26×17cm FoV) has MTF50 = 1466 LW/PH (uncompensated) and 1445 LW/PH (compensated). The chart MTF response bump causes a slight decrease in the corrected MTF response.
Figures 10 and 11 contain detailed results for five SFRplus and five eSFR ISO charts of various sizes and media. This somewhat arbitrary grouping was chosen because the results would not all fit on a single figure. The four groups of five bars on the left (light magenta background) represent uncompensated MTF50. The four groups of five bars on the right (light yellow background) represent compensated MTF50. Compensated MTF50 is generally larger and much more consistent, as indicated in Table 1, below.
Each group of five bars represents MTF50 results for slanted edges from different charts. Groups are labeled by the edge near the image center used for analysis. The four groups on the left (L, R, T, B) contain uncompensated MTF50. The four groups on the right (L comp, R comp, T comp, B comp) contain the compensated MTF50 of the corresponding edges.
In Fig. 10, the five bars in each group are for (1) a large inkjet chart (124×82 cm FoV), (2) a medium inkjet chart (49×32 cm FoV), (3) a small inkjet chart (25×17 cm FoV), (4) 8×10-inch color LVT film (26×27 cm FoV), and (5) small color LVT film (14×9 cm FoV).
The medium and small inkjet charts showed the greatest improvement. The small LVT chart may have had consistently lower corrected MTF50 because it had a larger magnification than the other charts, which might have affected lens performance.
In Fig. 11, the five bars in each group are for(1) a large inkjet chart (147×97 cm FoV),(2) a medium-large photographic paper chart (126×84 cm FoV),(3) a medium-large inkjet chart (129×83 cm FoV), (4) a medium inkjet chart (65×42 cm FoV), and (5) a small photographic paper chart (32×21 cm FoV). The small photographic paper chart showed the greatest improvement.
The key takeaway from Figures 10 and 11, summarized in Table 1, is that compensated results are larger and have a lower standard deviation σ, i.e., they are more consistent and hence more accurate.
Equations (1) through (5) can be used to predict the suitability of a test chart for a specific application.
We should note that our guidelines for chart suitability assume that the camera is relatively sharp, i.e., not out of focus or blurred for another reason, such as poor lens quality. A reasonable criterion for a “sharp camera” is that it makes good use of available pixels, which would be the case when the unsharpened MTF50 > 0.1 Cycle/Pixel (C/P). Typical values are around 0.15 – 0.3 C/P for high-quality cameras.
After running numerous images, we developed the following guidelines for chart suitability, based on the projected chart MTF at the Nyquist frequency (0.5 C/P), MTF@ fNyq, on the image sensor.
Fig. 12 shows results of a test chart suitability calculation for the chart/camera combination of Fig. 7. The compensation file had a = 0.1138 and b = 0.07027. Three of the following four parameters are manually entered.
In typical operation the three geometrical parameters (vertical field, µm per pixel, and sensor height) are entered, and magnification mtest = sensor height / vertical field. From Table 2, we see that the key result, MTF@ fNyq = 0.41, indicates that the chart is being used close to its operating limit (MTF@ fNyq = 0.3), and MTF compensation is definitely required.
Analysis is not reliable at spatial frequencies where the test chart MTF projected on the image sensor, MTF@ fNyq, drops below 0.3. This is well beyond the normal recommended limits.
Greater care is required when analyzing chart measurements. The correct compensation file should be specified and the correct test magnification mtest (or geometric parameters for calculating mtest) must be entered.
Chart compensation does not (yet) work well for strongly barrel-distorted (fisheye) images, where radial magnification is a function of distance from the image sensor, and hence radial and tangential magnification may differ.
Noise at high frequencies– especially above fNyq – may be strongly boosted. The response above fNyq should usually be ignored.
MTF compensation improves the consistency and accuracy of camera MTF measurements made from different test charts (often at different locations), especially when charts are used near their megapixel limits. Some MTF variation, primarily due to noise, remains after compensation. In our verification tests we may have observed some MTF variation caused by differences in lens performance at different test magnifications.
MTF compensation files should be created for each printer/media/setting combination. Except for old charts where these details are not known, charts don’t need to be measured individually. We have determined two limits related to MTF compensation:
MTF compensation effectively doubles the megapixel usability limits for most test charts.
We have been using the chart MTF measurement techniques described here to improve the quality control of our printed test charts.
ISO 12233:2017 – Electronic still picture imaging – Resolution and spatial frequency response.
Our team has outlined a list of our favorite imaging resources that we use on the job here at Imatest. Take a look at our top picks for the new year.
This article by Douglas Kerr is a very digestible explanation (with diagrams) of the principles of slanted edge MTF testing.
Author Vladimir Koifman shares the latest news and discussions on image sensors and image sciencing technology.
This book has been the foundational text for the study of digital image processing for over 40 years. It is suited for those with prior background in mathematical analysis, vectors, matrices, probability, statistics, linear systems, and computer programming.
Part of The Wiley-IS&T Series in Imaging Science and Technology, this book contains basic information and approaches for the use of subjectively correlated image quality metrics and outlines a framework for camera benchmarking. The authors show how to quantitatively compare the image quality of cameras used for consumer photography.
This handbook offers a comprehensive overview of Camera Monitor Systems (CMS), ranging from the ISO 16505-based development aspects to practical realization concepts.
This book is good for someone who has some foundation in imaging but would like to round out their knowledge. It is comprehensive of many key concepts, but not too detailed that is hard to comprehend.
Principles of Optics is one of the classic science books of the twentieth century, and probably the most influential book in optics published in the past forty years.
These 18 videos represent a sequence of lectures on digital photography from a Stanford photography course. For those who don’t have access to YouTube, you may view the lectures here.
Astrophotography site rich in information about how digital imaging sensors work, pixel size and photon collection, lenses, noise, etc. – and how to use this information as a photographer.
Last month, we posted Considerations when evaluating a Near Infrared camera. We reviewed important considerations for a NIR camera test setup and demonstrated how sharpness can vary between visible and NIR wavelengths. This post continues on that theme by testing Veiling Glare (Flare) using the ISO 18844 method.
Flare occurs to some degree in all lenses and optical systems. Stray light that enters the lens is reflected among the optical components and fogs the image. Below is an example of very bad lens flare.
In these images, we can see how Flare is showing light in the image where there should be none. Flare in optical components is a major limiting factor for a systems overall dynamic range. Sensors often can boast dynamic range >120 dB. In practice, the system cannot get close to that range because of the effects of flare. For more information, please read our documentation on Veiling Glare (Flare).
For this test, we will be using the same Raspberry Pi camera and Imatest light source from our previous post. The major differences are the chart and image processing. The ISO 18844 chart features numerous black dots arranged in an X pattern according to the standard. The chart is made out of clear polyester film and the dots are made from Acktar black to prevent reflections that would ruin the test.
The other major difference for this test from our previous one is the change in processing. The image needs to be linear. Nonlinear processes such as auto white balance and jpeg compression can influence the results if enabled. Fortunately, it is possible to get raw sensor data from the Raspberry Pi Camera V2. This recipe was used to capture a raw image from the Pi.
Images of the flare chart were captured under two lighting conditions; visible and NIR (850 nm).
Note: These images look different than normal images captured on the Pi because this is raw data. There is no auto white balance, gamma, or other processing done. For more information on reading raw images with Imatest see our documentation.
We then analyze each image with the Uniformity module in Imatest Master 5.1.9. In the Uniformity Settings dialog we want to select “ISO 18844 flare method C: Linearize with Color Space”. For this analysis, we can ignore the rest of the options.
Imatest will display several plots related to uniformity but we are only interested in the ISO 18844 flare plot for this test. The plots for each of our measurements can be seen below.
The plots show the % flare for each dot according to the 18844 calculation as well as the Mean Flare at the bottom. From the plots, we see that Mean Flare for the visible light sources is 5.2% and 13.6% for the NIR.
Similar to our previous test on sharpness, there is a drastic change in quality when the wavelength of light is varied. The ISO 18844 Flare increases more than 2.5 times in the NIR versus the visible. The expectation then is the NIR camera has a diminished dynamic range due to the increased flare. In applications such as security or automotive cameras, the diminished dynamic range could significantly decrease the effectiveness of the system to detect obstacles or intruders. The large change in quality shows how important it is to construct a test environment that matches the application of the imaging system. This is especially true when the system is multi-purpose, such as a security camera with a day (visible) and night (NIR) modes. A good follow up to this test would be to measure the dynamic range of the system in either lighting condition.
Having trouble with your Imatest test results? This article explains the five most common pitfalls in image quality testing, and how to resolve them.
Your chart may have too high contrast edges. The most common example we see of this is the obsolete ISO 12233 test chart, although this can be the case with any test chart. If you are using the ISO 12233 2000 test chart, you should not be.
The ISO 12233 2000 standard test chart has a very high contrast ratio (the white is very white and the black is very black) that can cause clipping in signal and lead to invalid MTF values. This is because the contrast of the chart often saturates the sensor, reporting higher MTF results than there might actually be. Therefore, we recommend using a chart with a 4:1 contrast ratio as revised in the ISO 12233 2014 standard, such as the ISO 12233 2014 chart or SFRplus chart. The lower contrast ratio produces more accurate measurements by providing MTF measurements that do not clip.
If you need help selecting the right contrast in a chart, email us at email@example.com.
When you’re testing dynamic range, you need to make sure you’re using a dynamic range chart which has a higher dynamic range than your camera to ensure you’re measuring the camera and not the chart. The common pitfall here is that people tend to use tonal step charts which have lower dynamic ranges than their sensors, such as the old Kodak Q14 or X-rite colorchecker. For example, if you are using a typical matte reflective chart which has a dynamic range of 48dB, and you’re testing a camera which has a dynamic range of 80dB, then the highest result you could get is 48dB. This is inaccurate.
However, if you’re using a chart with 120dB, you’ll get a much more accurate reading because it will measure the camera and not the chart. Before you test, you should check to see that your camera is not exceeding the dynamic range of what your chart is rated for. Once you have verified this, you will know which dynamic range chart to select. Our 36-Patch Dynamic Range chart is the most popular chart we sell with densities exceeding, 50db, 100db, and 150db.
The usage of linear dynamic range charts such as the Stouffer T4410 or Xyla target causes many problems including difficulty selecting dark regions that do not have visible contrast (especially using distorted lenses) as well as the linear density slope which interferes with the radial non-uniformity of the imaging system. The ISO standard dictates that each patch should be the same distance from the center and charts that have radial layouts of patches are much less impacted by light falloff. Also, targets which are very dark are not representative of more luminous scenes and overlook the impact of flare on dynamic range which leads to higher dynamic range performance, which will not hold up when the camera is exposed to a scene which is not mostly blackened. Imatest’s 36-patch targets include an option for a “DarkWorld” mask which can produce both dark and gray scenes using a single target.
If you need help determining which chart is best suited for you, please email us at firstname.lastname@example.org.
Similar to the dynamic range chart pitfall, when testing the sharpness of your camera system, you need to ensure the resolution of your chart is high enough for the device you’re testing. If your reflective or transmissive chart’s MTF is too low the accuracy of your camera resolution measurements will be limited by the resolution of the chart.
The culprit is print quality. The print process can affect the results of your test, especially at close distances or with high-megapixel cameras. For example, using a chart printed on a basic laser printer to test a high-resolution mobile phone camera, could reveal inaccurate results, shown by the steps in the MTF graph.
Avoid this pitfall by using a high-quality chart on higher resolution substrates such as inkjet or film, or by applying MTF Compensation to compensate for the chart quality. To ensure the highest quality, we encourage you to get charts printed from Imatest. If you don’t know what quality chart you need, contact email@example.com.
When testing, it’s important to ensure you’re completely filling the camera field of view with the test chart. If the chart you are using does not include measurement regions near the corners of your field of view, your analysis will not be comprehensive and you may overlook problems with MTF or signal loss at the extents of the image plane. When measuring distortion, the full field of view can be extrapolated from points available within the center, but this is less accurate than having real points to measure. The following video helps illustrate how the field of view affects your setup.
This is particularly challenging for cameras with wide or ultra-wide fields of view where planar targets can’t fill the FoV. We offer specialized test equipment to measure resolution and uniformity of ultra-wide devices.
Test distance is calculated by focal distance; in other words, the target needs to be set at the distance(s) in which it is in focus. The common pitfall we see is not testing at the right focal distance. A comprehensive test regimen will involve testing between the focal distance and the hyperfocal distance. You can’t always move closer to a target in order to fill the field of view, as this can fall below the minimum focal distance of your lens – or below the distance which a chart of a particular does not negatively impact measurements.
The chart needs to be within a distance to fill the lens field of view in focus. You may need to test at more than one focus distance if you have a lens with variable or automatic focus so that you can validate optimal focus across the range of focus of your device.
To find the minimum focus distance, check your lens specifications or contact the lens manufacturer. To find the maximum focus distance, or hyperfocal distance, see this hyperfocal distance calculator.