using gaussian filter in an image

1 visualización (últimos 30 días)
Vinny
Vinny el 11 de En. de 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!

Respuestas (1)

Image Analyst
Image Analyst el 13 de En. de 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?

Community Treasure Hunt

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

Start Hunting!

Translated by