Convert point-spread function to optical transfer function
OTF = psf2otf(PSF)
OTF = psf2otf(PSF,OUTSIZE)
OTF = psf2otf(PSF) computes
the fast Fourier transform (FFT) of the point-spread function (
array and creates the optical transfer function array,
that is not influenced by the
By default, the
OTF array is the same size as the
OTF = psf2otf(PSF,OUTSIZE) converts
PSF array into an
OUTSIZE specifies the size of the
be smaller than the
PSF array size in any dimension.
To ensure that the
OTF is not altered because
PSF array (down or to the right) with 0's to
match dimensions specified in
OUTSIZE, then circularly
shifts the values of the
PSF array up (or to the
left) until the central pixel reaches (1,1) position.
Note that this function is used in image convolution/deconvolution
when the operations involve the
PSF can be any nonsparse, numeric array.
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 OTF.
subplot(1,2,1); surf(PSF); title('PSF'); axis square; axis tight subplot(1,2,2); surf(abs(OTF)); title('Corresponding |OTF|'); axis square; axis tight