Contenu principal

psf2otf

Convert point-spread function to optical transfer function

Description

OTF = psf2otf(PSF) computes the fast Fourier transform (FFT) of the point-spread function (PSF) array and creates the optical transfer function array, OTF, that is not influenced by the PSF off-centering.

example

OTF = psf2otf(PSF,sz) specifies the size, sz, of the optical transfer function.

Examples

collapse all

Create a point-spread function (PSF).

PSF = fspecial("gaussian",13,1);

Convert the PSF to an optical transfer function (OTF).

OTF = psf2otf(PSF,[31 31]);

Plot the PSF and the magnitude of the OTF.

tiledlayout(1,2)
nexttile
surf(PSF)
title("PSF")
axis square
axis tight

nexttile
surf(abs(OTF))
title("|OTF|")
axis square
axis tight

Figure contains 2 axes objects. Axes object 1 with title PSF contains an object of type surface. Axes object 2 with title |OTF| contains an object of type surface.

Input Arguments

collapse all

Point-spread function, specified as a numeric array of any dimension.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
Complex Number Support: Yes

Size of the output optical transfer function OTF, specified as a vector of positive integers. The size of OTF must be greater than or equal to the size of PSF in all dimensions. By default, OTF is the same size as PSF.

Data Types: double

Output Arguments

collapse all

Optical transfer function, returned as a numeric array of size sz.

Data Types: double
Complex Number Support: Yes

Tips

  • To ensure that OTF is not altered because of PSF off-centering, psf2otf postpads PSF (down or to the right) with 0s to match the dimensions specified by sz. Then psf2otf circularly shifts the values of PSF up (or to the left) until the central pixel reaches the (1,1) position.

  • This function is used in image convolution and deconvolution when the operations involve the FFT.

Extended Capabilities

expand all

GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.

Version History

Introduced before R2006a

expand all