Measuring Sharpness 
MTF Measurement Matrix  Related Sharpness Techniques  ISO 12233  Key Takeaways 
Additional Resources 

On this page: Rise Distance and Frequency Domain  Modulation Transfer Function 
Spatial Frequency Units  Summary metrics  MTF measurement Matrix  SlantedEdge measurement  Edge angles
SlantedEdge modules  Edge contrast and clipping  Noise reduction  SlantedEdge algorithm  Differences with ISO 12233
Measuring Sharpness
Sharpness determines the amount of detail an imaging system can reproduce. It is defined by the boundaries between zones of different tones or colors.
In Figure 1, sharpness is illustrated with a bar pattern of increasing spatial frequency. The top portion of the figure is sharp and its boundaries are crisp; the lower portion is blurred and illustrates how the bar pattern is degraded after passing through a simulated lens.
Note: All lenses blur images to some degree.
Sharpness is most visible on features like image edges (Figure 2) and can be measured by the edge (step) response.
Several methods are used for measuring sharpness that include the 1090% rise distance technique, modulation transfer function (MTF), special and frequency domains, and slantededge algorithm.
Rise Distance and Frequency Domain
Image sharpness can be measured by the “rise distance” of an edge within the image.
With this technique, sharpness can be determined by the distance of a pixel level between 10% to 90% of its final value (also called 1090% rise distance; see Figure 3).
Rise distance is not widely used because there is no convenient way of calculating the rise distance of an imaging system from the rise distances of its individual components (i.e., lens, digital sensor, and software sharpening).
To overcome this issue, measurements are made in the frequency domain where frequency is measured in cycles or line pairs per distance (millimeters, inches, pixels, image height, or sometimes angle [degrees or milliradians]).
In the frequency domain, a complex signal (audio or image) can be created by combining signals consisting of pure tones (sine waves), which are characterized by a period or frequency (Figure 4). The response of a complete system is the product of the responses of each component.
Frequency and spatial domains are related by the Fourier transform.
 The greater the system response at high frequencies (short periods), the more detail the system can convey (Figure 5). System response can be characterized by a frequency response curve, F(f).
Note: High frequencies correspond to fine detail.
Modulation Transfer Function
The relative contrast at a given spatial frequency (output contrast/input contrast) is called Modulation Transfer Function (MTF), which is similar to the Spatial Frequency Response (SFR), and is a key to measuring sharpness. In Figure 6, MTF is illustrated with sine and bar patterns, an amplitude plot, and a contrast plot—each of which has spatial frequencies that increase continuously from left to right.
Note: Imatest uses SFR and MTF interchangeably. SFR is more commonly associated with complete system response, where MTF is commonly associated with the individual effects of a particular component. In other words, system SFR is equivalent to the product of the MTF of each component in the imaging system.
High spatial frequencies (on the right) correspond to fine image detail. The response of photographic components (film, lenses, scanners, etc.) tends to “roll off” at high spatial frequencies. These components can be thought of as lowpass filters that pass low frequencies and attenuate high frequencies.
Figure 6 consists of upper, middle, and lower plots and are described as follows:
 Bar pattern, Sine pattern (upper plot) —The upper plot illustrates (1) the original sine patterns, (2) the sine pattern with lens blur, (3) the original bar pattern, and (4) the bar pattern with lens blur. Note that lens blur causes contrast to drop at high spatial frequencies.
 Amplitude (middle plot)—The middle plot displays the luminance (“modulation” V in the MTF Equation section) of the bar pattern with lens blur (see red curve in Figure 6). The modulation of the sine pattern, which consists of pure frequencies, is used to calculate MTF. (Note that contrast decreases at high spatial frequencies.)
 MTF % (lower plot)—The lower plot shows the corresponding sine pattern contrast (see blue curve; represents MTF), which also is defined in the MTF Equation section. By definition, the low frequency MTF limit is always 1 (100%). In Figure 6, the MTF is 50% at 61 lp/mm (line pairs per millimeter) and 10% at 183 lp/mm. Note that both frequency and MTF are displayed on logarithmic scales with exponential notation [10^{0} = 1%; 10^{1} = 10%; 10^{2} = 100%, etc.]; amplitude (middle plot) is displayed on a linear scale. The MTF of a complete imaging system is the product of the MTF of its individual components.
MTF Equation
The equation for MTF is derived from the sine pattern contrast C(f) at spatial frequency f, where
\(\displaystyle C(f)=\frac{V_{max}V_{min}}{V_{max}+V_{min}}\)
for luminance (“modulation”) V.
\(\displaystyle MTF(f)=100\% \times\frac{C(f)}{C(0)}\) Note: this normalizes MTF to 100% at low spatial frequencies.
To correctly normalize MTF at low spatial frequencies, a test chart must have some lowfrequency energy. This is supplied by large light and dark areas in slanted edges and by features in most patterns used by Imatest, but not satisfied by lines and grids. For systems where sharpening can be controlled, the recommended primary MTF calculation is the slantededge, which is calculated from the Fourier transform of the impulse response (i.e., response to a narrow line), which is the derivative (d/dx or d/dy) of the edge response. Fortunately, you don’t need an understanding of Fourier transforms to understand MTF.
Traditional Resolution Measurements
Traditional resolution measurements involve observing an image of bar patterns, most frequently the USAF 1951 chart (Figure 7) and looking for the highest spatial frequency (lp/mm) where bar patterns are visibly distinct. This observation (also called vanishing resolution) corresponds to an MTF of roughly 1020%. Because the vanishing resolution is the spatial frequency where image information disappears— where it isn’t visible, it is strongly dependent on observer bias and is a poor indicator of image sharpness. (It’s Where the Woozle Wasn’t in Winnie the Pooh.)
Note: The USAF 1951 chart is poorly suited for computer analysis because it uses space inefficiently and its bar triplets lack a low frequency reference. Furthermore, small changes in the chart position (sampling phase) can cause the chart bars to appear or disappear. The chart also is prone to aliasing where small changes of position can cause the appearance of its bars to change when they shift from being in phase or out of phase with the pixel array.
Better indicators of image sharpness are spatial frequencies where MTF is 50% of its low frequency value (MTF50) or 50% of its peak value (MTF50P). MTF50 and MTF50P are recommended for comparing the sharpness of different cameras and lenses for two reasons:
 Image contrast is half its low frequency or peak value thus detail is still quite visible. (The eye is insensitive to detail at spatial frequencies where MTF is 10% or less.)
 The response of most cameras falls off rapidly in the vicinity of MTF50 and MTF50P. MTF50P is a better metric for strongly sharpened cameras that have “halos” near edges and corresponding peaks in their MTF response.
Note: Additional sharpness indicators are discussed in Summary metrics, below.
Although MTF can be estimated directly from images of sine patterns (using Rescharts,Log Frequency, Log FContrast, and Star Chart), the ISO 12233 slantededge technique provides more accurate and repeatable results and uses space more efficiently. Slantededge images can be analyzed by one of the modules listed in the MTF Measurement Matrix, below.
Spatial Frequency Units
Most readers will be familiar with temporal frequency. For example, the frequency of a sound—measured in Cycles/Second or Hertz—is closely related to its perceived pitch. The frequencies of radio transmissions (measured in kilohertz, megahertz, and gigahertz) are also familiar.
Spatial frequency is measured in cycles (or line pairs) per distance instead of time. As with temporal (e.g., audio) frequency response, the more extended the response, the more detail can be conveyed.
Spatial frequency units can be selected from the Settings or More settings windows of SFR and Rescharts modules (SFRplus, eSFR ISO, Star, etc. See Figure 8) and is the measurement intended to determine how much detail a camera can reproduce or how well the pixels are utilized.
Past film camera lens tests used line pairs per millimeter (lp/mm), which worked well for comparing lenses because most 35mm film cameras have the same 24 x 36mm picture size. Yet, digital sensor sizes vary widely—from under 5mm diagonal in camera phones to 43mm diagonal for fullframe DSLRs to an even larger diagonal for medium format backs. For this reason, line widths per picture height (LW/PH) is recommended for measuring the total detail a camera can reproduce. Note that LW/PH is equal to 2 * lp/mm * (picture height in mm).
Another useful spatial frequency unit is cycles per pixel (C/P), which gives an indication of how well individual pixels are utilized. There is no need to use actual distances (millimeters or inches) with digital cameras, although such measurements are available (Table 1).
Table 1. Summary of spacial frequency units with equations that refer to MTF in selected frequency units.
MTF Unit  Application  Equation 
Cycles/Pixel (C/P) 
Shows how well pixels are utilized. Nyquist frequency f_{Nyq} is always 0.5 C/P. 

Cycles/Distance (cycles/mm or cycles/inch) 
Cycles per distance on the sensor. Pixel spacing or pitch must be entered. Popular for comparing resolution in the old days of standard film formats (e.g., 24x36mm for 35mm film). 
\(\displaystyle \frac{MTF(C/P)}{\text{pixel pitch}}\) 
Line Widths/Picture Height (LW/PH) 
Measures overall image sharpness. This is the best unit for comparing the performance of cameras with different sensor sizes and pixel counts. Line Widths is traditional for TV measurements. Note that 1 Cycle = 1 Line Pair (LP) = 2 Line Widths (LW). 
\(2 \times MTF\bigl(\frac{LP}{PH}\bigr)\) ; \(2 \times MTF\bigl(\frac{C}{P}\bigr) \times PH\) 
Line Pairs/Picture Height (LP/PH) 
Measures overall image sharpness. Differs from LW/PH by a factor of 2. Used by dpreview.com. 
\(MTF\bigl(\frac{LW}{PH}\bigr) / 2\) ; \(MTF\bigl(\frac{C}{P}\bigr) \times PH\) 
Cycles/milliradian 
Angular frequencies. Pixel spacing or pitch must be entered. Focal length (FL) in mm is usually included in EXIF data in commercial image files. If it isn’t available it must be entered manually, typically in the EXIF parameters region at the bottom of the settings window. If pixel spacing or focal length is missing, units will default to Cycles/Pixel. *Lens geometry (s_{1}, s_{2}, and lens FL) is not reliable for calculating M because lenses can deviate significantly from the simple lens equation. 
\(\displaystyle 0.001 \times MTF\bigl(\frac{\text{cycles}}{\text{mm}}\bigr) \times FL(\text{mm})\) 
Cycles/degree 
\(\displaystyle \frac{\pi}{180} \times MTF\bigl(\frac{\text{cycles}}{\text{mm}}\bigr) \times FL(\text{mm})\)  
Cycles/object mm 
Cycles per distance on the object being photographed (what many people think of as the subject). Pixel spacing and magnification must be entered. Important when the system specification references the object being photographed (for example, if cracks of a certain width need to be detected).  \(\displaystyle MTF\bigl( \frac{\text{Cycles}}{\text{Distance}} \bigr) \times \text{Magnification}\) 
Line Widths/Crop Height 
Primarily used for testing when the active chart height (rather than the total image height) is significant.  
PH = Picture Height in pixels. FL(mm) = Lens focal length in mm. Pixel pitch = distance per pixel = 1/(pixels per distance). 
Summary Metrics
Several summary metrics are derived from MTF curves to characterize overall performance. These metrics are used in a number of displays, including secondary readouts in the SFR/SFRplus/eSFR ISO Edge/MTF plot (see Imatest SlantedEdge Results) and in the SFRplus 3D maps.
Summary Metric  Description  Comments 
MTF50 MTFnn 
Spatial frequency where MTF is 50% (nn%) of the low (0) frequency MTF. MTF50 (nn = 50) is widely used because it corresponds to bandwidth (the halfpower frequency) in electrical engineering.  The most common summary metric; correlates well with perceived sharpness. Increases with increasing software sharpening; may be misleading because it “rewards” excessive sharpening, which results in visible and possibly annoying “halos” at edges. 
MTF50P MTFnnP 
Spatial frequency where MTF is 50% (nn%) of the peak MTF.  Identical to MTF50 for low to moderate software sharpening, but lower than MTF50 when there is a software sharpening peak (maximum MTF > 1). Much less sensitive to software sharpening than MTF50 (as shown in a paper we presented at Electronic Imaging 2020). All in all, a better metric. 
MTF area normalized 
Area under an MTF curve (below the Nyquist frequency), normalized to its peak value (1 at f = 0 when there is little or no sharpening, but the peak may be » 1 for strong sharpening).  A particularly interesting new metric because it closely tracks MTF50 for little or no sharpening, but does not increase for strong oversharpening; i.e., it does not reward excessive sharpening. Still relatively unfamiliar. Described in SlantedEdge MTF measurement consistency. 
MTF10, MTF10P, MTF20, MTF20P 
Spatial frequencies where MTF is 10 or 20% of the zero frequency or peak MTF  These numbers are of interest because they are comparable to the “vanishing resolution” (Rayleigh limit). Noise can strongly affect results at the 10% levels or lower. MTF20 (or MTF20P) in Line Widths per Picture Height (LW/PH) is closest to analog TV Lines. Details on measuring monitor TV lines are found here. 
MTF Measurement Matrix
Imatest has many patterns for measuring MTF— slantededge, Log frequency, Log fcontrast, Siemens Star, Dead Leaves (Spilled Coins), Random 1/f, and Hyperbolic wedge— each of which tends to give different results in consumer cameras, most of which have nonuniform image processing that depends on local scene content. Sharpening (high frequency boost) tends to be maximum near contrasty features, while noise reduction (high frequency cut, which can obscure fine texture) tends to be maximum in their absence. For this reason MTF measurements can be very different with different test charts.
In principle, MTF measurements should be the same when no nonuniform or nonlinear image processing is applied, for example when the image is demosaiced with dcraw with no sharpening and noise reduction. But this does not exactly happen because demosaicing, which is present in all cameras that use Color Filter Arrays (CFAs) involves some nonlinear processing.
The MTF Matrix table below lists the attributes, advantages, and disadvantages of Imatest’s methods for measuring MTF.
SlantedEdge Measurement for Spatial Frequency Response
Several Imatest modules measure MTF using the slantededge technique and include:
 Slantededge test charts that may be purchased from Imatest or created with Imatest Test Charts. Charts that employ automatic detection (SFRplus, eSFR ISO, SFRreg, or Checkerboard) are recommended.
 Briefly, the ISO 12233 slantededge method calculates MTF by finding the average edge (4X oversampled using a clever binning algorithm), differentiating it (to obtain the Line Spread Function (LSF)), and taking the absolute value of the Fourier transform of the LSF. The algorithm is described in detail here.
The key output of slanted edge analysis is the Edge/MTF plot, which can be viewed by clicking the button below. Many additional results are available, including summary and 3D plots, showing Lateral Chromatic Aberration and other results as well as MTF.
Why is the edge slanted?
MTF results for pure vertical or horizontal edges are highly dependent on sampling phase (the relationship between the edge and the pixel locations), and hence can vary from one run to the next depending on the precise (subpixel) edge position. The edge is slanted so MTF is calculated from the average of many sampling phases, which makes results much more stable and robust (Figure 9).
What edge angles work best?
Where possible, edge angles should be greater than ±2 degrees from the closest Vertical (V), Horizontal (H), or 45 degree orientation. The reason is that results from vertical, horizontal, and 45° edges are very sensitive to the relationship between the edge and the pixels (i.e., they are phasesensitive). Tilting the edges by more than 2 or 3 degrees avoids this issue.
The ISO 12233 standard recommends an angles of either 5 or 5.71 degrees (arctan(0.1)). This angle is not sacred— MTF is not strongly dependent on edge angle. For nonzero edge angles θ relative to the closest V or H orientation, a cosine correction is applied, as illustrated on the right. The correction is significant when θ is greater than 8 degrees (cos(8º) = 0.99). The initial MTF is calculated from a Vertical or Horizontal line (shown in blue), based on the region selection. The true MTF is defined normal to the edge— along the red line. Since the length of the transition along the blue (V or H) line will be longer than along the red line (normal to the edge), and since MTF is inversely proportional to the transition length, we apply
\(MTF=MTF_{initial} / cos(\theta)\)
The primary disadvantage of large edge angles is that the available region area may be reduced, especially in SFRreg patterns.
Edge Contrast and clipping
Edge Contrast should be limited to 10:1 at the most, and a 4:1 edge contrast is generally recommended. The reason is that high contrast edges (>10:1, such as found in the old ISO 12233:2000 chart) can cause saturation or clipping, resulting in edges with sharp corners that exaggerate MTF measurements. For more details, see Using Rescharts slantededge modules, Part 2: Warnings – clipping.
Advantages and Disadvantages of Slanted Edge
The slantededge method has several advantages and disadvantages:
Advantages
 Most efficient use of space, which makes it possible to create a detailed map of MTF response
 Fast, automated region detection in SFRplus, eSFR ISO, SFRreg, and Checkerboard
 Fast calculations
 Relatively insensitive to noise (highly immune if noise reduction is applied)
 Compliant with the ISO 12233 standard, whose “binning” (superresolution) algorithm allows MTF to be measured above the Nyquist frequency (0.5 C/P)
 The best pattern for manufacturing testing
Disadvantages
 May give optimistic results in systems with strong sharpening and noise reduction (i.e., can be fooled by signal processing, especially with high contrast [≥ 10:1] edges)
 Gives inconsistent results in systems with extreme aliasing (strong energy above the Nyquist frequency), especially with small regions
 Sensitive to sharpening, especially for high contrast (≥10:1) edges; less sensitive for low contrast edges (≤2:1)
 Least sensitive to software noise reduction.
Note: Imatest Master can calculate MTF for edges of virtually any angle, though exact vertical, horizontal, and 45° should be avoided because of sampling phase sensitivity.
SlantedEdge noise reduction
Imatest’s Modified apodization technique reduces noise, making MTF results more consistent, while having a minimal effect on MTF measurements. It works by smoothing the Line Spread Function (LSF; the derivative of the edge) at a distance from the edge center, but not near the center. Because it has little effect on average MTF, it should be kept on unless the result needs to be strictly ISOcompliant. Click on the button below to see the description.
SlantedEdge Modules
Imatest SlantedEdge Modules include SFR, SFRplus, eSFR ISO, Checkerboard, and SFRreg (see Table 2 and Sharpness Modules for details).
Note: See “How to test lenses with Imatest” for a good summary of how to measure MTF using SFRplus or eSFR ISO.
Table 2. Brief summary of Imatest slantededge modules.
Module  Description  Examples 

SFR 
 
SFRplus 
 
eSFR ISO 
 
Checkerboard 
 
SFRreg  Several individual charts are typically placed around the image field; works with:

SlantedEdge Algorithm
The MTF calculation is derived from ISO standard 12233. Some details are contained in The Imatest calculation contains a number of enhancements, listed below. The original ISO calculation is performed when the ISO standard SFR checkbox in the SFR input dialog box is checked. See below for additional information:
 The cropped image is linearized; i.e., the pixel levels are adjusted to remove the gamma encoding applied by the camera. (Gamma is adjustable with a default of 0.5).
 The edge locations for the red, green, blue, and luminance channels:
Y=0.3R+0.59G+0.11B or 0.2125R+0.7154G+0.0721B
are determined for each scan line (horizontal lines in the above image).  A second order fit to the edge is calculated for each channel using polynomial regression. The second order fit removes the effects of lens distortion. In the above image, the equation would have the form:
x=a0+a1y+a2y2
 Depending on the value of the fractional part
fp = xi – int(xi )
of the second order fit at each scan line, the shifted edge is added to one of four bins:
bin 1 if 0 ≤ fp < 0.25
bin 2 if 0.25 ≤ fp < 0.5
bin 3 if 0.5 ≤ fp < 0.75
bin 4 if 0.75 ≤ fp < 1
Note: The bin mentioned in the previous equation does not depend on the detected edge location.
 The four bins are combined to calculate an averaged 4x oversampled edge. This allows analysis of spatial frequencies beyond the normal Nyquist frequency.
 The derivative (d/dx) of the averaged 4x oversampled edge is calculated. A centered Hamming window is applied to force the derivative to zero at its limits.
 MTF is the absolute value of the Fourier transform (FFT) of the windowed derivative.
Note: Origins of Imatest slantededge SFR calculations were adapted from a Matlab program, sfrmat, which was written by Peter Burns to implement the ISO 12233:2000 standard. Imatest’s SFR calculation incorporates numerous improvements, including improved edge detection, better handling of lens distortion, and better noise immunity. The original Matlab code is available here. In comparing sfrmat results with Imatest, tonal response is assumed to be linear; i.e., gamma = 1 if no OECF (tonal response curve) file is entered into sfrmat. Since the default value of gamma in Imatest is 0.5, which is typical of digital cameras in standard color spaces such as sRGB, you must set gamma to 1 to obtain good agreement with sfrmat.
Differences between Imatest and ISO 12233 calculations
An ISO Standard SFR checkbox, located on the lower left of slantededge Settings windows, can be checked to obtain an ISOcompliant calculation. We recommend leaving this button unchecked because the Imatest calculations re more accurate— definitely superior in the presence of noise and optical distortion.
 The center of each scan line is calculated from the peak of the lowpassfiltered edge derivative. The ISO calculation uses a centroid, which is optimum in the absence of noise. But noise is always present to some degree, and the centroid is extremely sensitive to noise because noise at large distances from the edge has the same weight as the edge itself.
 Gamma (used to linearize the data) is entered as an input value or derived from known chart contrast. In ISOstandard implementations it is assumed to be 1 unless an OECF file is entered.
 Imatest assumes that the edge may have some (secondorder) curvature due to optical distortion. The ISOstandard calculation assumes a straight line, which can result in degraded MTF measurements in the presence of optical distortion. We are working on adding this enhancement to a future revision of ISO 12233
 Imatest’s “modified apodization” noise reduction (on by default) results in more consistent measurements (no systematic difference). It is turned off when the ISO standard calculation is checked.
 The Line Spread Function (LSF) correction factor, introduced in ISO 12233:2014 has been implemented in Imatest since 2015. The correction factor D(j) (or D(k)), which compensates for the high frequency loss from numerical differentiation when calculating LSF from the Edge Spread Function (ESF), is incorrect in both the ISO 12233:2014 and 2017 standards. The Imatest implementation, which is based on first principles (we have the full set of equations), complies with the intent of both versions of the standard.
Note that Additional calculation details can be found in the Peter Burns links (below).
Related Sharpness Techniques
Several related techniques affect sharpness results, including:
 Acutance and Subjective Quality Factor
 Diffraction and Optimum Aperture
 What MTF50 is Needed for Prints?
 SlantedEdge Noise Reduction
 SlantedEdge Results
Key Takeaways
Additional observations about sharpness include the following:
 Frequency and spatial domain plots convey similar information, but in a different form. A narrow edge in spatial domain corresponds to a broad spectrum in frequency domain (extended frequency response) and viceversa.
 Sensor response above the Nyquist frequency can cause aliasing that is visible as Moire patterns of low spatial frequency. In Bayer sensors (all sensors except Foveon), Moire patterns appear as color fringes. Moire in Foveon sensors is far less bothersome because it is monochrome and the effective Nyquist frequency of the Red and Blue channels is lower than with Bayer sensors.
Additional Resources
 Bob Atkins has an excellent introduction to MTF and SQF. SQF (subjective quality factor) is a measure of perceived print sharpness that incorporates the contrast sensitivity function (CSF) of the human eye. It will be added to Imatest Master in late October 2006.
 Calibration Targets (Google Earth Blog) Calibration targets – mostly for MTF – visible from satellites. Part 5. Around the world, is particularly interesting. A customer has used a target in 13300 SalondeProvence, France.