Halcon - gen_gabor does not output the power spectrum of Gabor kernel

194 views Asked by At

I need to compute Gabor filter of a given image using Halcon library. Unfortunately, I get different results when manally compute FFT of Gabor kernel or use the function gen_gabor() that is claimed to compute the Gabor and Hilbert filters in frequency domains. Originally I used code from the link that describes the Gabor filter in frequency domain as a Gaussian function. Similar results (two symmetric gaussians) is obtained by using Matlab code and corresponding demo when Output image is set to "Gabor function (power spectrum") - see figure below as an example Sample power spectrum of Gabor filter

The output of gen_gabor contains two crescents and does not have much in common with the Gaussian functions. Please take a look at the sample output of the command

gen_gabor(Filter,1.4,0.4,1.0,1.5,'n','dc_center',512,512)

First channel of Filter

Does anyone know how to use Gabor filter from Halcon and obtain the same result as a product of image Fourier transform and conventional FFT of Gabor filter? In fact, I even cannot map the parameter Angle of gen_gabor to the arguments of conventional Gabor filter, e.g., wavelength, sigma, phase and spatial aspect ratio, or to the closest definition in Eq. 31 of tutorial.

0

There are 0 answers