DSPRelated.com
Forums

Image filtering using Low Pass Hamming filter

Started by Unknown April 1, 2006
Thanks Jim.

I did multiply in the frequency domain. If you check my code, u'll
know.

I had a little misunderstanding in the beginning, and thanks for ur
explanation. That explains it quite well.


Anand wrote:
> > Thanks Jim. > > I did multiply in the frequency domain. If you check my code, u'll > know.
OK it looks like you did multiply by something but it wasn't your window. You seem to be under the impression that all you have to do is perform the right steps. You also need to apply them to the correct data in the correct order. Understanding the general concepts helps enormously in figuring out how to do that. You are approaching it like you are making a tossed salad where you just throw the ingredients in a bowl. -jim
> > I had a little misunderstanding in the beginning, and thanks for ur > explanation. That explains it quite well.
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
"Anand" <aanand17@gmail.com> wrote in message 
news:1144027834.932062.275730@i39g2000cwa.googlegroups.com...
> Thanks Fred for taking time out to read the code and ur suggestions. > I am using 'cameraman.tif' image. > > Earlier when using the 'fft' with hamming window , i was getting a > image with oval shaped black spot indicating the presence of the man in > the original image. the image looked free of the gaussian noise(grain > free) though. > > Now that I have removed the 'fft' , I am getting a completely black > image with a lot of noise(grains). > > I am sorry, i didn't completely understand the 2nd para of ur previous > post, what exactly u wanted me to do. Is it pollting the function, in > frequency domain using 'freqz' , I did that and the average magnitude > almost seem constant. >
Use the hamming function that you generated as hamm2. Plot it. It's nicely peaked at the center. Do not fft it. Use it in the frequency domain as below: Then fft2 the image. Then fftshift the image. Plot it just to see what you get with something like surf. Then multiply by hamm2. Plot it again to see what you get. It should be similar to the previous plot but with a gradual peak in the center / reduction at the edges (high frequencies). Then ifftshift the image. Then ifft2 the image. This will remove the high frequencies in the image to some degree which will get rid of "noise" and some high frequency detail. Fred
hamm2d=hamm2.*hamm2';
hamm_max=max(max(hamm2));
norm_hamm2=hamm2d/hamm_max;
h_fft=(norm_hamm2);
adj_h=h_fft;%<<<<<<<<<<<<<<<<<<<<<<<<
fft_image=fft2(noisy_image);
adj_noisy_image=fftshift(fft_image);
filt_image=adj_h.*adj_noisy_image;%<<<<<<<<<<<<<<<<<<<<<<<<plot this
output_image = abs(ifft2(ifftshift(filt_image)));

Does that help?