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 4.1.2 (March 2015). This correction factor is included in the ISO 12233:2014 standard, 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*.

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 was turned off by default in Imatest versions 4.1.n. It is turned on by default in versions 4.2+. It can be set (to override the default) by pressing **Settings**, **Options III** in the Imatest main window as shown below, then checking the box for the correction. **We strongly recommend turning on the LSF correction factor, i.e., the box should be checked.**

### The equations

Here is the Edge SFR (MTF) equation from ISO 12233:2000, Annex C:

© ISO 2000 – All rights reserved

And here is the corresponding equation from ISO 12233:2014, Annex D. Note that *E-SFR(k)* is the symbol for edge-based SFR, *not* a subtraction:

© ISO 2014 – All rights reserved

The difference between the two equations is the LSF correction factor *D(j)* for the numerical differentiation used to calculate the Line Spread (not Point Spread*) Function from the Edge Spread Function. Note that *D(j)* is incorrect in the ISO 12233:2014 standard. It should read,

\(D(j) = \text{min}\left[\frac{\pi k / N}{\sin\left(\pi k / N\right)}, 10\right]\) | *If you thought ISO standards were written by gods on Mount Olympus (the Greek version), the many misprints should set you straight. |

The ISO 12233:2014 formula (D.8) for calculating the Line Spread Function \(LSF_W(j) = W(j)\frac{ESF(j+1) – ESF(j-1)}{2}\) where \(LSF(x) = \frac{ESF(x + \Delta x/2) – ESF(x – \Delta x/2)}{\Delta x}\) where Δ The Fourier transform ( \(FT(g(x-a)) = e^{-ia\omega} FT(g(x)) \) For \(\displaystyle FT_{numerical} = \frac{FT(g(x+a/2)-g(x-a/2))}{a} = \frac{e^{ia\omega/2}-e^{-ia\omega/2}}{a}FT(g(x))\) Noting that \(\sin(x) = \frac{e^{ix}-e^{-ix}}{2i}\) (see Wikipedia), \(FT_{numerical} = \frac{2\sin(a\omega /2)}{a}FT(g(x))\) For \(FT_{pure} = FT\left(\frac{d g(x)}{dx}\right) = \omega FT(g(x))\) The correction factor is therefore \(D(\omega) = \left|\frac{FT_{pure}}{FT_{numerical}}\right| = \frac{a\omega /2}{\sin(a\omega /2)}\) Since Δ \(D(f) = \left|\frac{FT_{pure}}{FT_{numerical}}\right| = \frac{\pi f/2}{\sin(\pi f/2)}\) At the Nyquist frequency, |

### Applying the correction factor

To apply (or disable) the LSF correction factor, click **Settings** (in the * Imatest *main window),

**Options III**. Check or uncheck the

**Use LSF…**checkbox as appropriate. 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**

For most applications we recommend checking the box– turning on the correction factor. However, for industrial applications that use fixed pass/fail thresholds, consistency may be more important than accuracy. To prevent changes in yield and/or avoid modifications to the pass/fail specification, the box should remain unchecked and devCorr = 0 should be added to the [imatest] section of the ini file.

### 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 \(f(t) = \frac{u\left((t+\tau) / 2\right) – u\left((t-\tau) / 2\right)}{\tau}\) for unit step function \(FT(f) = \frac{\sin(\pi \tau f)}{\pi \tau f}\) If \(\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 ( The |
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 available in * Imatest 4.1.2+*, where it is turned off by default. The correction factor is turned on by default in

*releases.*

**Imatest 4.2+**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 turning 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%.