简体   繁体   English

为什么对由Gabor小波生成的滤波器执行FFT(图像)

[英]why does it perform a FFT to the filter generated by Gabor wavelet (image)

I am using a code of 2D gabor for image processing. 我正在使用2D gabor代码进行图像处理。 The Gabor filter bank is generated via a Gabor wavelet 4 scale 8 orientations. Gabor滤波器组是通过Gabor小波4标度8方向生成的。 Then I have 4*8 filters. 然后我有4 * 8滤镜。 Anyway, I found in the program that It firstly perform a FFT to the image and a FFT to the Gabor filter , and eliminate DC component of GAbor FFT. 无论如何,我在程序中发现首先对图像执行FFT,对Gabor滤波器执行FFT,然后消除GAbor FFT的DC分量。

[Gr,Gi] = Gabor(N,[s n],freq,[stage orientation],flag);
F = fft2(Gr+j*Gi);
F(1,1) = 0;

Then it performs inverse FFT to the dot mulplication of image FFT and Gabor filter FFT. 然后,它对图像FFT和Gabor滤波器FFT的点重叠执行逆FFT。

D = abs(ifft2(im.*GW));  

Is there anyone can explain that why it does in this way? 有谁能解释为什么这样做呢? What the use of FFT2 to Gabor filter? FFT2到Gabor滤波器有什么用?

You're calculating the Gabor space of your image, as reported here . 你计算你的图像的Gabor空间,据报道在这里 As you read there, you want to calculate the convolution of the filter with the image, and this is what your code is doing. 在此处阅读时,您要计算滤波器与图像的卷积,这就是您的代码正在做的事情。

The convolution theorem allows to calculate the convolution of your filter with the signal (the image) as the inverse transform of the product of their two Fourier transforms. 卷积定理可以计算滤波器与信号(图像)的卷积,作为其两个傅里叶变换的乘积的逆变换。 It is done this way because it scales better with large inputs, ie it is usually faster then normal convolution, see this paragraph . 之所以这样做是因为它在较大的输入下可以更好地扩展,即通常比正常卷积要快,请参见本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM