求助大虾数字信号处理题目,用MATLAB设计一巴特沃斯低通IIR滤波器!帮助者加分!

2024-11-17 10:26:46
推荐回答(1个)
回答1:

低通?还是高通?
最简单的巴特沃斯低通
I=imread('7.bmp');
J=imread('5.bmp');
K=imabsdiff(I,J);
figure,imshow(K,[]);
L=rgb2gray(K);
f=double(L);
g=fft2(f);
g=fftshift(g);
[N1,N2]=size(g);
n=2;
d0=50;
n1=fix(N1/2);
n2=fix(N2/2);
for i=1:N1;
for j=1:N2;
d=sqrt((i-n1)^2+(j-n2)^2);
h=1/(1+0.414*(d/d0)^(2*n));
result(i,j)=h*g(i,j);
end
end
result=ifftshift(result);
X2=ifft2(result);
X3=uint8(real(X2));
figure,imshow(X3)