[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
![]() |
Camera MTF Estimation | ![]() |
Classes | |
class | SlantedEdgeMTFOptions |
Pass options to one of the slantedEdgeMTF() functions. More... | |
Functions | |
template<class Vector > | |
double | mtfFitGaussian (Vector const &mtf) |
Fit a Gaussian function to a given MTF. More... | |
template<... > | |
void | slantedEdgeMTF (...) |
Determine the magnitude transfer function of the camera. More... | |
Determine the magnitude transfer function (MTF) of a camera using the slanted edge method.
void vigra::slantedEdgeMTF | ( | ... | ) |
Determine the magnitude transfer function of the camera.
This operator estimates the magnitude transfer function (MTF) of a camera by means of the slanted edge method described in:
ISO Standard No. 12233: "Photography - Electronic still picture cameras - Resolution measurements", 2000
The input must be an image that contains a single step edge with bright pixels on one side and dark pixels on the other. However, the intensity values must be neither saturated nor zero. The algorithms computes the MTF from the Fourier transform of the edge's derivative. Thus, if the actual MTF is anisotropic, the estimated MTF does actually only apply in the direction perpendicular to the edge - several edges at different orientations are required to estimate an anisotropic MTF.
The algorithm returns a sequence of frequency / attenuation pairs. The frequency axis is normalized so that the Nyquist frequency of the original image is 0.5. Since the edge's derivative is computed with subpixel accuracy, the attenuation can usually be computed for frequencies significantly above the Nyquist frequency as well. The MTF estimate ends at either the first zero crossing of the MTF or at frequency 1, whichever comes earlier.
The present implementation improves the original slanted edge algorithm according to ISO 12233 in a number of ways:
The edge is not required to run nearly vertically or horizontally (i.e. with a slant of approximately 5 degrees). The algorithm will automatically compute the edge's actual angle and adjust estimates accordingly. However, it is still necessary for the edge to be somewhat slanted, because subpixel-accurate estimation of the derivative is impossible otherwise (i.e. the edge position perpendicular to the edge direction must differ by at least 1 pixel between the two ends of the edge).
Our implementation uses a more accurate subpixel derivative algorithm. In addition, we first perform a shading correction in order to reduce possible derivative bias due to nonuniform illumination.
The source value type T1
must be a scalar type which is convertible to double
. The result is written into the result sequence, which must be back-insertable (supports push_back()
) and whose value_type
must be constructible from two double
values. Algorithm options can be set via the options object (see vigra::NoiseNormalizationOptions for details).
Declarations:
pass 2D array views:
Usage:
#include <vigra/slanted_edge_mtf.hxx>
Namespace: vigra
double vigra::mtfFitGaussian | ( | Vector const & | mtf | ) |
Fit a Gaussian function to a given MTF.
This function expects a sequence of frequency / attenuation pairs as produced by slantedEdgeMTF() and finds the best fitting Gaussian point spread function (Gaussian functions are good approximations of the PSF of many real cameras). It returns the standard deviation (scale) of this function. The algorithm computes the standard deviation by means of a linear least square on the logarithm of the MTF, i.e. an algebraic fit rather than a Euclidean fit - thus, the resulting Gaussian may not be the one that intuitively fits the data optimally.
Declaration:
Usage:
#include <vigra/slanted_edge_mtf.hxx>
Namespace: vigra
Required Interface:
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|