A correction factor for the slanted-edge MTF (Edge SFR; E-SFR) calculations in SFR, SFRplus, eSFR ISO, SFRreg, and Checkerboard was added to Imatest in 2015. This correction factor is included in the ISO 12233:2014 and 2017 standards, but is not in the older ISO 12233:2000 standard. Because it corrects for an MTF loss caused by the numerical calculation of the Line Spread Function (LSF) from the Edge Spread Function (ESF), we call it the LSF correction factor.
Equations – Applying the correction factor – Verification
The LSF correction factor primarily affects very high spatial frequencies beyond most of the energy for typical high quality cameras. But it does make a difference for practical measurements: MTF50 for a typical high quality camera (shown below) is increased by about 1.5%.
The correction factor is turned on by default in Imatest 4.2+. It is set by pressing Settings, Options III in the Imatest main window as shown below, then checking the box for the correction. We strongly recommend leaving on the LSF correction factor, i.e., the box should be checked.
Because the LSF correction factor used by Imatest is derived from first principles, and not from the equations in the standards, which contain misprints, the correction factor in Imatest versions starting with 4.2 in 2015 corresponds to the intent of both the ISO 12233:2014 and 2017 standards. |
More details about Imatest’s ISO compliance can be found on the Sharpness web page.
Equations
The difference between the 2014 and 2017 equations is the LSF (Line Spread Function) correction factor D(j) (D(k) in ISO 12233:2017), which corrects for the numerical differentiation used to calculate LSF (not the point spread function) from the Edge Spread Function. Note that D(j) (or D(k) ) are incorrect in both the 2014 and 2017 standards. They should read,
\(D(k) = \min\left[\frac{2\pi k / N}{\sin\left(2\pi k / N \right) },10\right] = \min\left[\frac{1}{\text{sinc}\left( 2\pi k / N \right)},10 \right] \) | *If you thought ISO standards were written by gods on Mount Olympus, the many misprints should set you straight. |
Apart from min[…,10], this equation is used in ISO 12233:2022.
Applying the correction factor
The LSF correction factor is enabled by default. To check or change the setting, click Settings (in the Imatest main window), Options III. You can check or uncheck the Use LSF… checkbox as appropriate, but we recommend leaving it checked. The checkbox sets derivCorr in the [imatest] section of imatest-v2.ini to 0 (correction off) or 1 (correction on).
Options III window for applying or removing LSF correction factor
Verification
To observe the effects of the LSF correction factor, we use an idealized edge, tilted 5 degrees, shown on the right. You can click on it to download it for your own testing.
The ideal edge increases uniformly from 0 to 1 over a distance of τ = 1 pixel.
The MTF of an ideal uniformly-increasing edge of width τ is the Fourier transform FT of its derivative, which is \(\displaystyle f(t) = \frac{u\left((t+\tau) / 2\right) – u\left((t-\tau) / 2\right)}{\tau}\) for unit step function u. \(\displaystyle FT(f) = \frac{\sin(\pi \tau f)}{\pi \tau f}\) If τ is the sampling rate (the same as Δx or a in the green box, above), \(\displaystyle\textrm{Nyquist frequency} = f_{\textrm{Nyq}} = \frac{1}{2\tau}\) The expected value of MTF at the Nyquist frequency (0.5 cycles/pixel) is \(\displaystyle FT(f_{\textrm{Nyq}}) = \frac{\sin(\pi\tau f_{\textrm{Nyq}})}{\pi\tau f_{\textrm{Nyq}}} = \frac{\sin(\pi /2)}{\pi /2} = \frac{2}{\pi} = 0.6366\) |
Here are the results without and with the LSF correction factor. Note that gamma has been set to 1 because the idealized image is not gamma-encoded. The results with LSF correction are much closer to the expected value of 2/π = 0.6366. The difference is likely due to digital sampling and the numerical binning/oversampling process: the average oversampled edge shown in the figures below is slightly rounded. Also, the edge rotation correction that is not applied to edges slanted by less than 8 degrees. The edge rotation is not included in the ISO standard and so is not applied to edges that fall under the ISO standard algorithm.
Ideal edge, uncorrected MTF. MTF@Nyquist = 0.56. |
Ideal edge, LSF-corrected MTF. MTF@Nyquist = 0.624. |
The figure on the right, generated by MTF Compare (a postprocessor to MTF calculation programs for comparing MTF calculations), compares the uncorrected MTF of the ideal edge (blue) with the corrected MTF (burgundy). The black line is the uncorrected/corrected transfer function = 1/(correction factor D). It has the expected values of 0.9 (1/1.1107) at the Nyquist frequency (f = 0.5 C/P) and 2/π = 0.6366 at 2*Nyquist (1 C/P). |
MTF Compare Uncorrected vs. Corrected |
The idealized image has much more energy above the Nyquist frequency than typical high quality images. Here is an example for a high quality camera showing the effects of the LSF correction factor on MTF50— the most commonly-used summary metric.
Typical edge, uncorrected MTF. MTF50 = 0.355 Cycles/Pixel. |
Typical edge, LSF-corrected MTF. MTF50 = 0.360 C/P: 1.41% higher. |
The difference may not be significant for many applications.
Consistency with older Imatest versions
The new correction factor is turned on by default in Imatest 4.2+ releases.
You can override the default, i.e., turn the correction factor on or off, by clicking Settings (in the Imatest main window), Options III, and checking or unchecking the Use LSF… checkbox as appropriate. Once the setting is saved, it will be retained across all future versions unless changed by the user. The default calculation be selected unless you manually change it in Options III window.
We strongly recommend leaving on the LSF correction factor, i.e., the box should be checked.
For industrial testing with pass/fail thresholds set up with the old calculation, we recommend either:
- adjusting your pass/fail specification to account for the measurement change
- continuing to use the old calculation by setting devCorr = 0 in the [imatest] section of the ini file
For example, on an ideal edge MTF at Nyquist/4 (0.125 C/P, a common KPI) is only increased by 0.64%, at Nyquist/2 (0.250 C/P) MTF is increased by 2.80%. On an actual sharp, RAW camera-phone image with Gamma=1, the MTF at Nyquist/4 is increased by 0.81%, MTF at Nyquist/4 is increased by 3.00%.