How to make guassian filter with same magnitude but different frequecies

1 view (last 30 days)
Hi, I am trying to make guassian filter with same magnitude but different frequecies. I am making white noise and filtering it through guassian high pass filter and then calculating Noise power spectrum on filtered image. I am expecting to see guassian filter design in NPS but I am not able to figure out why I am not able see it. I am posting my code here. I will aappreciate if you help me. Thank you.
if true
x_o = 256;
y_o = 256;
thresh=20;
%h_1 = glp(img,10,x_o,y_o);
%f =1 - h; %fftshift(h);
imges = zeros(256,256,128);
for i = 1:128
im_in = wgn(256,256,0);
im = fft(im_in);
B = ghp(im,thresh,x_o,y_o);;
imges(:,:,i)= B;
end
[nps_2d_dc, nps_1] = nps_2d_4_FD(real(imges),1,1,128);
end
I am attaching guassian and nps code here.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by