Contenido principal

GeometricMTF

R2026b

Geometric modulation transfer function result

Since R2026b

Description

Add-On Required: This feature requires the Optical Design and Simulation Library for Image Processing Toolbox add-on.

A GeometricMTF object stores a ray-based modulation transfer function (MTF) result for one field point in an optical system. A geometric MTF is computed from a geometric point spread function (PSF). Use a geometric MTF for fast ray-based contrast transfer analysis when aberrations are large compared to diffraction-limited performance.

Creation

Create a GeometricMTF object by using the mtf object function of an opticalSystem object. To return a GeometricMTF object, specify the Method name-value argument as "Geometric", or omit the Method argument.

Properties

expand all

This property is read-only.

Tangential MTF data, represented as a structure with spatial frequency and MTF values for the tangential direction. The spatial frequency values are in cycles per millimeter, and the MTF values are stored for each wavelength specified when computing the MTF.

This property is read-only.

Sagittal MTF data, represented as a structure with spatial frequency and MTF values for the sagittal direction. The spatial frequency values are in cycles per millimeter, and the MTF values are stored for each wavelength specified when computing the MTF.

This property is read-only.

Field point for which the MTF is computed, represented as a FieldAngle object or a FieldPosition object.

This property is read-only.

Wavelengths used to compute the MTF, represented as an M-element numeric vector. Each element is a wavelength in nanometers.

Data Types: double

This property is read-only.

FFT size used to compute the optical transfer function from the internal PSF, represented as a 1-by-2 vector of positive integers. The first element is the number of rows and the second element is the number of columns.

Data Types: double

Object Functions

contrastAtFrequencyCompute MTF contrast at spatial frequencies
frequencyAtContrastCompute spatial frequency at MTF contrast level
showPlot analysis result

Examples

collapse all

Load the sample Double Gauss lens system using zmximport. Define an off-axis field point at an angle of 3 degrees along the vertical axis (Y-axis) to evaluate peripheral imaging performance.

opsys = zmximport("DoubleGaussLens.zmx");
fp = fieldPoint(Angles=[3 0]);

Compute the MTF for the specified field point using the mtf function.

mtfr = mtf(opsys, FieldPoints=fp)
mtfr = 
  GeometricMTF with properties:

     Tangential: [1×1 struct]
       Sagittal: [1×1 struct]
     FieldPoint: [1×1 optics.fieldpoint.FieldAngle]
    Wavelengths: [486.1340 587.5618 656.2810]
      FFTLength: [128 128]

You can access the raw tangential and sagittal contrast values along with their corresponding spatial frequencies directly from the object structures.

mtfr.Tangential
ans = struct with fields:
    SpatialFrequency: [0 10.0061 20.0122 30.0183 40.0244 50.0305 60.0366 70.0427 80.0488 90.0549 100.0610 110.0671 120.0732 130.0793 140.0854 150.0914 160.0975 170.1036 180.1097 190.1158 200.1219 210.1280 220.1341 230.1402 240.1463 … ] (1×128 double)
                 MTF: [128×3 double]

mtfr.Sagittal
ans = struct with fields:
    SpatialFrequency: [0 10.0061 20.0122 30.0183 40.0244 50.0305 60.0366 70.0427 80.0488 90.0549 100.0610 110.0671 120.0732 130.0793 140.0854 150.0914 160.0975 170.1036 180.1097 190.1158 200.1219 210.1280 220.1341 230.1402 240.1463 … ] (1×128 double)
                 MTF: [128×3 double]

spatialFreq = mtfr.Tangential.SpatialFrequency;
tangentialMTF = mtfr.Tangential.MTF;
sagittalMTF = mtfr.Sagittal.MTF;

Load the sample Double Gauss lens system using zmximport. Compute the geometric MTF up to a maximum spatial frequency of 200 cycles/mm by setting the MaximumFrequency name-value argument.

opsys = zmximport("DoubleGaussLens.zmx");
mtfr = mtf(opsys, MaximumFrequency=200);

Use the frequencyAtContrast method to find the spatial frequency where the MTF first drops to 50% (0.5) contrast. Then, use the contrastAtFrequency method to determine the exact sagittal and tangential contrast values at target spatial frequencies of 30, 60, and 100 cycles/mm.

f50 = frequencyAtContrast(mtfr, 0.5)
f50 = 
f50(:,:,1,1) =

   22.2291   48.5864   37.1981
   30.4555   44.1703   35.1097
   26.2592   20.7416   19.6438


f50(:,:,1,2) =

   22.2302   48.5892   37.2033
   31.1926   43.8312   27.4487
   52.4967   33.6800   18.1867

targetFrequencies = [30; 60; 100];
contrast = contrastAtFrequency(mtfr, targetFrequencies)
contrast = 
contrast(:,:,1,1) =

    0.4014    0.7606    0.6261
    0.5085    0.6295    0.5518
    0.4751    0.3837    0.3536


contrast(:,:,2,1) =

    0.2571    0.3638    0.2568
    0.1172    0.3792    0.2908
    0.3215    0.2570    0.2351


contrast(:,:,3,1) =

    0.1793    0.0742    0.2618
    0.0476    0.1648    0.0823
    0.2110    0.1897    0.1698


contrast(:,:,1,2) =

    0.4014    0.7606    0.6262
    0.5080    0.6203    0.4417
    0.7480    0.5751    0.3491


contrast(:,:,2,2) =

    0.2571    0.3638    0.2569
    0.2959    0.3557    0.1311
    0.4326    0.2412    0.2649


contrast(:,:,3,2) =

    0.1791    0.0741    0.2618
    0.0944    0.1361    0.1943
    0.0867    0.2810    0.2391

More About

expand all

Version History

Introduced in R2026b