Strictly speaking, we should distinguish between optical transfer function (OTF) and modulation transfer function (MTF).
The OTF is a vector that includes the phase and amplitude of the image, where the amplitude is the MTF.
In fact, the main consideration in optical design is MTF. The phase term, sometimes referred to as the phase transfer function (PTF), represents the deviation of the actual sinusoidal image from the ideal sinusoidal image, expressed as a function of the phase angle as a function of spatial frequency. If the phase exceeds 180°, the MTF may be negative. This represents a phase reversal, which results in a reversal of the contrast of the image. In reality, this can happen at the high frequencies of many lenses.
1. Theory
For systems illuminated by incoherent light, the MTF can be obtained using the Fourier transform of the line spread function. Usually, MTF is obtained in this way.
However, the diffraction OTF can be quickly solved using autocorrelation integration: