# Chart Quality Calculator

Imatest 5.1 has several new features that let you use measured chart MTF (modulation transfer function) to

• determine the suitability of a test chart (characterized by size, print media, and printing technology) for a camera system (characterized by sensor and pixel size). This can help you select an appropriate test chart for your application.
• increase the accuracy of MTF measurements by dividing the measured camera MTF by the appropriately-scaled chart MTF, which is equivalent to deconvolution in spatial domain. This technique is described in Compensating camera MTF measurements for chart and sensor MTF. It improves the absolute accuracy of camera MTF measurements as well as the consistency of measurements made with different test charts. It also lets you view the precise effect of chart MTF on camera MTF measurements.

The Chart Quality Calculator, introduced on this page, lets you estimate the effect of chart MTF on camera MTF measurements for a wide range of

• chart media and printing technologies (inkjet on reflective and transmissive media, photographic film and prints, etc.),
• cameras, characterized by sensor and pixel size (and hence pixel count),
• vertical fields of view (related to chart size and magnification).

The Chart Quality Calculator lets you predict how large a chart (characterized by Chart MTF in cycles/object mm) you’ll need for a camera with a given number of megapixels. You don’t need chart images to use it.

Using it correctly requires a clear understanding of key concepts.

#### Chart MTF

Chart MTF is measured using printed slanted-edges of reasonable contrast (between 4:1 and 10:1) with the measurement technique described in the Appendix (below). The spatial frequency unit for the chart MTF measurement is cycles/object mm, i.e., cycles per millimeter on the chart (not on the sensor, as is typical of most Imatest measurements). Here are a few details about the measurement (more in the Appendix, below).

• Magnification should be large enough (typically 1x or greater) so that the measurement is dominated by the chart quality, not by the lens or sensor. (Typical camera MTF measurements have magnifications of < 0.1 for high quality film charts and < 0.02 for inkjet charts.) Magnification should be carefully measured and recorded.
• The measured chart MTF is fit to a function that closely approximates actual response curves at frequencies below MTF30 (spatial frequencies where MTF is larger than 0.3 times the low frequency value). This function removes jogs in the MTF curve caused by noise (typically at frequencies above MTF30) and facilitates further processing. The function is

$$\displaystyle MTF_{chart}(f) = e^{-a_1 f – (a_2 f)^2}$$ ;         f in units of Cycles/Object mm (C/Obj mm).

This function matches a wide range of observed chart MTF measurements.

#### Projected Chart MTF

When the chart is projected (imaged) on the sensor its spatial frequency units must be transformed to the native units of the sensor, Cycles/Pixel (C/P), by substituting,

$$f(\text{C/Obj mm}) = f(C/P) \times \text{magnification} \times \text{pixels/mm}$$

$$MTF_{chart-projected} (f) = MTF_{chart}(f(C/P) \times \text{magnification} \times \text{pixels/mm}) = MTF_{div}(f)$$

In Imatest sharpness modules, pixels/mm is typically derived from the user-entered value of pixel pitch (in μm), where pixels/mm = 1000 / (pixel pitch (μm)). Magnification is either entered in the settings window or derived from geometrical factors (like the bar-to-bar spacing in SFRplus or the vertical registration mark spacing in eSFR ISO).

If MTFdiv(fNyq) (MTFdiv at the Nyquist frequency (fNyq = 0.5 C/P)) is lower than 0.9 (90%), measurement accuracy can be improved by dividing the measured MTF by MTFdiv, as described in Compensating camera MTF measurements for chart and sensor MTF. If MTFdiv(fNyq) is greater than 0.9, there is very little improvement.

#### The Chart Quality Calculator

The Chart Quality Calculator is opened from the Utilities dropdown menu in the Imatest main window. It lets you read in a chart quality (MTF compensation) file, which contains the measured coefficients for a specific media and print technique, and then select parameters that determine

• how chart quality affects MTF measurements, and
• the Megapixel suitability (the largest number of camera Megapixels) that can achieve a given quality level for a chart of a specified size.

These parameters include pixel pitch in microns (μm) per pixel, magnification, sensor height, and Vertical Field of View (which is closely related to chart height). When one of these parameters changes, one or more of the others is changed to keep the parameters consistent, according to rules in the following table.

Key chart quality settings that affect results (chart Megapixel suitability)
Setting Changes Affects  Description
um per pixel Does not change any of the input settings MTF div plot and MTFnn Pixel pitch, usually entered as microns (μm) per pixel. Converted to pixels/mm in the above equations. Does not affect the megapixel suitability (maximum vertical pixels and image size).
Sensor ht mm. magnification Megapixel suitability, MTF div plot Sensor height in mm.
magnification vertical field mm Megapixel suitability, MTF div plot Magnification = Sensor height / Vertical FoV must be measured carefully when an image is taken. For some modules (SFRplus, eSFR ISO, Checkerboard) it can be derived from geometrical chart features.
vertical field mm. magnification Megapixel suitability Vertical Field of View (FoV) is closely related to chart height, especially for charts designed to fill the Field of View (SFRplus, eSFR ISO, etc.).
 Notes: MTFnn represents MTF90, 70, 50, and 30 in Cycles/Pixel (on the image sensor).  Megapixel suitability is the maximum vertical pixel rating and maximum number of camera megapixels that the chart can be used with at the specified quality level (MTFnn at the Nyquist frequency).

Chart Quality Calculator window
Settings for a 5×7 Multi-size Color LVT SFRplus chart where the largest chart image has
a bar-to-bar spacing of 128mm, corresponding to a vertical FoV of 140mm.

#### Key results

• MTF at the Nyquist frequency. Determines how much chart quality affects MTF measurements and whether chart compensation is needed.
 MTF @ Nyquist Quality Description MTFNyq ≥ 0.90 Excellent Chart compensation is not needed. 0.70 ≤ MTFNyq < 0.90 Good Accuracy is adequate for many purposes, but chart compensation will improve accuracy. 0.50 ≤ MTFNyq < 0.70 Comp. required Chart compensation is required for accurate results. 0.30 ≤ MTFNyq < 0.50 Minimal Will work with chart compensation, but this is stretching things.  Not recommended. MTFNyq < 0.30 Fail Don’t even think of it!  MTF is too low for reliable results (it’s too sensitive to noise), even with compensation.

• The maximum number of vertical pixels camera Megapixel sizes at one of four quality levels, based on MTF at the Nyquist frequency, displayed in the table near the bottom of the Chart Quality Calculator window. MTF @ Nyqyist = 0.77 is a special case, approximating the MTF suitability calculation used prior to 2018. This number has proven to be a reasonably conservative estimate of MTF suitability without chart compensation.

• The old (pre-2018) Megapixel suitability number, which was defined as

$$\text{Megapixel suitability} = 2 \times (0.5(\text{MTF50}) + 0.35(\text{MTF70}) + 0.15(\text{MTF50}))\times \text{vertical chart height (mm)}$$

where MTFnn has units of Cycles/Object mm. This number appears above the Settings boxes in the Chart Quality Calculator. In the above image, it is

Old Mpxl#: V pxls= 3246;  15.9Mpxls (3:2)     (strongly abbreviated because of limited space).

This means that the old Megapixel suitability number is 3246 vertical pixels = 15.9 Megapixels for a 3:2 aspect ratio. This is very close to the values for Quality level (old Mpxl limit) (MTF @ Nyquist frequency = 0.77) = 3320 vertical pixels = 16.5 Mpxls (at 3:2 aspect ratio). This is a fairly conservative estimate of the chart limit, where MTF compensation will only make a small improvement.

#### Limitations

Measurements are not reliable where the projected chart MTF is lower than 0.3. The frequency where this happens (MTF30) should always be above the Nyquist frequency, and should be above 2*Nyquist if possible.

Measurement accuracy near the boundaries of strongly barrel-distorted (fisheye) lenses is affected by reduced magnification in the radial direction, which affects the sharpness of tangential edges. We may fix this in the future. This is not an issue with moderately distorted rectilinear (normal) lenses.

#### Appendix. Chart MTF measurement

Most users won’t be measuring chart quality themselves. They’ll use the measurement results in Chart MTF compensation files provided by Imatest. Those users can skip this section.

Chart MTF is measured from images of slanted-edges, printed at between 4:1 and 10:1 contrast on various media (inkjet paper, photographic paper, B&W or color film, or Chrome on Glass). These media are both transmissive and reflective and have a wide range of sharpness.

1. Photograph the chart at the appropriate magnification, making sure the magnification is accurately measured and recorded (it can be included in the file name). The magnification should be high enough so the measured MTF is limited by the chart, not by the camera. Measured chart MTF50 should be under 0.1 cycles/pixel to minimize the effects of image processing on the results. This generally requires a high quality prime macro lens. We have used a Canon EOS-6D DSLR camera with Canon MP-E 65mm f/2.8 1-5x marco and EF 100mm f/2.8 macro USM lenses. With this gear we recommend 0.5x or 1x for inkjet charts, which are quite rough, and 4x or more for photographic (film and paper) and Chrome on Glass (CoG) charts. This setup may not do justice to the exceptional resolution of CoG charts.
2. Run the image in SFR with the following settings: MTF plot units = Cycles/Object mm. Enter Pixel size (6.5 um/pixel for the EOS-6D) and Magnification. Check ROI detection & plot extra smoothing. Make sure Gamma is set correctly (it’s 1 for raw files; ~0.5 for standard color space files). Max MTF plot Freq should be set ≤ 0.5x Nyquist (may vary). Chart MTF compensation settings (to be used later) should be unchecked. In the ROI Options window (accessible from the Imatest main window) SFR ROI filtering should be set to None. The region should be large enough so that random noise is not too high. (Since noise can be a problem with inkjet charts, ROI size may be 600×1000 pixels or larger.)
3. If the settings are correct, Imatest will calculate a fit to the equation,
$$MTF_{chart}(f) = e^{-a_1 f – (a_2 f)^2}$$ where f has units of cycles/object mm (C/Obj mm). This equation fits a variety of curve shapes, and can handle response bumps, as shown above. It is shown as a dotted cyan line …… on the right— difficult to see because it’s coincident with thick black MTF curve for the Y (luminance) channel for MTF > 0.3. It is matched to the data only for f ≤ MTF30, i.e., only where MTF is greater than 0.3 (30%).
4. The spatial frequency projected on the image sensor equals the spatial frequency on the chart (object) divided by the magnification. The projected chart MTF on the image sensor is expressed in native units of cycles/pixel (C/P), using
$$f(\text{C/Obj mm}) = f(C/P) \times \text{magnification} \times \text{pixels/mm}$$

Pixels/mm is usually derived from the pixel pitch (μm per pixel), which is entered in the settings window.
pixels/mm = 1000 / (pixel pitch (um/pixel))
$$MTF_{chart-projected}(f) = MTF_{chart}(f(C/P) \times \text{magnification} \times \text{pixels/mm})$$
The equation for the compensated MTF is
$$\displaystyle MTF_{chart-compensated} = \frac{MTF_{measured}}{\text{max}(MTF_{chart-projected},\text{ } 0.3)}$$

5. MTFchart-compensated is also called MTFdiv because it is used to divide MTFmeasured. The minimum value of the denominator must be greater than 0.3 because smaller values can cause an excessive noise boost. The frequency where projected chart MTF drops to 0.3 should be outside the range of interest for the measurement— well above the Nyquist frequency if possible and ideally above 2*Nyquist. The results will be displayed in the command window and copied to the clipboard (for the last ROI-only). Here is a sample for this image.
— MTF coefficients x for deconvolution (will be copied to clipboard)—
-0.00968, 0.04781
from C:\imatest\Data\Misc\Chart_scans\Color LVT Film 4x 4-1\Vertical\ColorLVT_65mm_f4_s1-13_5992.tiff
MTF50 = 0.03259 C/P = 20.06 Cycles/Object mm. Magnification = 4
( MTF = exp(-x(1)*f-(x(2)*f).^2) for f in cycles/object mm. )
MTF90,70,50,30 = 9.23 14.79 19.66 25.17 Cy/Obj mm

The lines shown in blue should be copied and pasted into a file, which will be saved with the CSV extension. Only the first line (-0.00968, 0.04781) contains data (coefficients a1 and a2 from the MTFchart(f) equation, above. The rest is comments that can be useful for verifying that you have the correct settings.