i'm trying to enhanced image by gaussian high pass filter but it can't work... can you help me to repair my program? thangkyou before
1 次查看(过去 30 天)
显示 更早的评论
% function GaussianHighPass
[m n]=size(image.jpg);
f_transform=fft2(image.jpg);
f_shift=fftshift(f_transform);
x0=m/2;
y0=n/2;
D0=70;
a=12.53;
b=-4;
for x=1:m;
for y=1:n;
D=sqrt((x-x0)^2+(y-y0)^2);
hpf(x,y)=a*(1-exp(-(D^2)/(2*(D0^2))))+b;
end
end
filter_apply=conv2(image.jpg,hpf,'same');
figure,imshow(filter_apply)
image_orignal=ifftshift(filter_apply);
image_filter_apply=abs(ifft2(image_orignal));
figure,imshow(image_filter_apply,[])
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Filtering and Enhancement 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!