using gaussian filter in an image
이전 댓글 표시
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!
답변 (1개)
Image Analyst
2013년 1월 13일
1 개 추천
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?
카테고리
도움말 센터 및 File Exchange에서 Image Filtering에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!