using gaussian filter in an image
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Image Analyst
2013-1-13
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!