Description At first it takes a logarithm of the pixel values. Then this function uses Fast Fourier Transform (FFT) algorithm to obtain the Fourier spectrum. In the frequency domain, a special filter function attenuates some frequency components. After that, the inverse FFT algorithm is applied to go back to the spatial domain. Then it applies an exponential function to obtain the result DIB. It works with 4, 8 or 24 bits/pixel. In case of 4 or 8 bits/pixel, the source DIB must contain grayscale images and the palette values in the source DIB must be monotone increasing. It makes no sense to use this function in case of 1 bits/pixel. If the source DIB size is not power of two, zero padding is used.
Examples
Syntax lRet = [BIFilter.]FreqDIBHomomorphic Dib Cutoff Width High Low bFFTMethod bShowDialog
Remarks lRet LONGLONG Handle of the newly created DIB on success or 0 on failure.
Dib LONGLONG Source DIB.
Cutoff Long Cutoff frequency. Large cutoff frequency is recommended.
(Almost all pass.)
Width Long Transient width in the frequency domain
10 is recommended.
High double High-frequency attenuation.
It must be more than one 4.0 is recommended.
Low double Low-frequency attenuation.
It must be less than one
0.8 - 0.9 is recommended.
bFFTMethod BOOL Fast Fourier Transform method
bShowDialog BOOL Show dialog box
Cutoff frequency.
If ‘Cutoff’ parameter is greater than the radius of the image, then all of frequencies are passed. For example, if the size of the source image is 128 x 128, then all of the pass frequencies are sqrt(2) * 128 / 2 = 90.
bFFTMethod
If bFFTMethod = TRUE, then the Fourier transformed of the image will be processed by Sin and Cos functions, if bFFTMethod = FALSE, then it will be processed by square root functions.
bShowDialog
This parameter specifies that is the dialog box to be showed or not.
See Also