MATLAB Answers

Vinny
0

using gaussian filter in an image

Asked by Vinny
on 11 Jan 2013
hi there im trying to use a gaussian filter to remove 50% of the higher frequencies in a picture could you please tell me what is wrong with this code ?
im=double(imread('image.jpg'))/255;
[m,n]=size(im);
imfreq=fft2(im);
h = fspecial('gaussian',[m n],0.5);
hfreq=fft2(h);
a=ifft2(hfreq.*imfreq);
imshow(a)
thank you in advance!

  0 Comments

Sign in to comment.

1 Answer

Answer by Image Analyst
on 13 Jan 2013

What do you want to do? Use a Gaussian filter, or remove 50% of the higher frequencies? And what does 50% of the higher frequencies mean? Do you mean you want to block 100% of half of the frequencies in the image? Or do you want to reduce the higher frequencies by 50%? If so, where does that start taking effect?

  0 Comments

Sign in to comment.