Gaussian filter/fft2/ifft2

3 ビュー (過去 30 日間)
priya
priya 2011 年 7 月 13 日
コメント済み: Batuhan Aydin 2021 年 5 月 10 日
I have a 2D array for u. A sample for values in the array u is -6.032379971105743e-06 Now i applied 2dimensional FFT on 'u' by using fft2(u). Sample of the FFT of u is as 4.968406643055152e+04 + 0.000000000000000e+00i Now i applied a 2D Gaussian filter on the 2 dimensional FFT of u. Now I converted back using ifft2 command. The value i got is 4.387184236191695e-07 + 2.599341068120482e-10i
my question is would ifft2 give a complex number as answer?
Here is my code : in one file : function G=gaussFilter2(segma,kSize)
x=-(kSize/2):(1+1/kSize):(kSize/2);
y=-(kSize/2):(1+1/kSize):(kSize/2);
G=(1/(sqrt(2*pi)*segma))*exp(-(x.^2+y.^2)/(2*segma^2))
in another file:
uf = fft2(u);
G1=gaussFilter2(segma);
filter_u=conv2(uf,G1,'same');
after_filter_u = ifft2(filter_u);
Please let me know if I am doing wrong.
  1 件のコメント
Batuhan Aydin
Batuhan Aydin 2021 年 5 月 10 日
Can I see your code all of them?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by