measureSharpness
Measure spatial frequency response using test chart
Syntax
Description
esfrChart
Object
Use an esfrChart
object when you want to automatically detect the
slanted-edge regions of interest (ROIs) of an Enhanced or Extended version of the
Imatest® eSFR test chart [1].
measures the spatial frequency response (SFR) at all slanted-edge ROIs of an
Imatest eSFR test chart.sharpnessValues
= measureSharpness(chart
)
adjusts the ROIs and measurements using name-value arguments. For example, you
can specify the values of the frequency response at which to report the
corresponding spatial frequency by using the
sharpnessValues
= measureSharpness(chart
,Name=Value
)PercentResponse
name-value argument.
[
also returns the average SFR of vertical and horizontal ROIs, using any
combination of input arguments from previous syntaxes.sharpnessValues
,averageSharpness
] = measureSharpness(___)
Test Chart Image (since R2024a)
Use a test chart image for other types of test charts that are not supported by
the esfrChart
object. You must identify the positions of the
slanted-edge ROIs.
measures the SFR at all ROIs located at sharpnessValues
= measureSharpness(im
,roiPositions
)roiPositions
within
test chart image im
. The returned sharpness table includes
the frequency for each ROI at which the response drops to 50% of the initial and
peak values.
also specifies the values of the frequency response at which to report the
corresponding spatial frequency using the sharpnessValues
= measureSharpness(im
,roiPositions
,PercentResponse=p)PercentResponse
name-value argument.
Examples
Input Arguments
Output Arguments
More About
Tips
Slanted edges on a properly oriented chart are at an angle of 5 degrees from the horizontal or vertical. Sharpness measurements are not accurate when the edge orientation deviates significantly from 5 degrees.
Sharpness is higher toward the center of the imaged region and decreases toward the periphery. Horizontal sharpness is usually higher than vertical sharpness.
Algorithms
The SFR measurement algorithm is based on work by Peter Burns [2]
[3]. First,
measureSharpness
determines the edge position with sub-pixel
resolution for each scan line, or row or column of pixels
perpendicular to the edge, in the ROI. For example, each row of pixels is a scan line
for a near-vertical edge. Next, measureSharpness
aligns and
averages the scan lines to create an oversampled edge intensity profile. The function
takes the derivative of the intensity profile and applies a windowing function. The
returned SFR measurement is the absolute value of the Fourier transform of the windowed
derivative.
References
[1] Imatest. "Esfr". https://www.imatest.com/mathworks/esfr/.
[2] Burns, Peter. "Slanted-Edge MTF for Digital Camera and Scanner Analysis." Society for Imaging Science and Technology; Proceedings of the Image Processing, Image Quality, Image Capture Systems Conference. Portland, Oregon, March 2000, pp. 135–138.
[3] Burns, Peter. "sfrmat3: SFR evaluation for digital cameras and scanners." URL: http://losburns.com/imaging/software/SFRedge/sfrmat3_post/index.html.