以MATLAB软件的图形用户界面(GUI)开发环境和图像处理工具箱为平台,设计一个数字图像处理系统。

内容至少包含以下内容:
1. 系统能读取不同图像,保存处理后的图像;
2. 直方图均衡化;
3. 对图像进行FFT和DCT变换;
4. 对图像添加高斯噪声,进行均值降噪(图像数目可设置);
5. 对图像进行频域增强(可选一种滤波器对图像平滑或者锐化都行);
6. 采用阈值法对图像进行二值化;(阈值可设置)。

做好后请发到我的邮箱[email protected]谢谢。

图像读取:
global I
% dialog for opening files

[imagefile , pathname]= uigetfile('*.tif');
if imagefile ~= 0

filename=[pathname imagefile];

[X,map]=imread(filename);

I=X;
show_Callback(hObject, eventdata, handles)
set(handles.save,'enable','on')
end;
图像保存:
global I
[imagefile , pathname, filterindex]= uiputfile({'*.tif','tif';'*.*','All Files'},'Image Save As');
if (imagefile ~= 0 & filterindex==1)

filename=[pathname imagefile '.tif'];

imwrite(I,filename);
else (imagefile ~= 0)

filename=[pathname imagefile];

imwrite(I,filename);
end;
频域增强:
global I
J=imnoise(I,'salt & pepper',0.02);
%gei tuxiang tianjia yanjiao zaosheng
subplot(121),imshow(J)
title('han you zaosheng de yuan tuxiang')
J=double(J);
f=fft2(J);
g=fftshift(f);
[M,N]=size(f);
n=3;d0=20;
n1=floor(M/2);n2=floor(N/2);
for i=1:M

for j=1:N

d=sqrt((i-n1)^2+(j-n2)^2);

h=1/(1+0.414*(d/d0)^(2*n));

g(i,j)=h*g(i,j);

end
end
g=ifftshift(g);
g=uint8(real(ifft2(g)));
subplot(122),imshow(g)
title('san jie Butterworth lvbo tuxiang')
FFT变换:
% 读入原始图像
subplot(1,2,1);
imshow(I)
title('yuan tu');
% 求离散傅立叶频谱
J=fftshift(fft2(I));
subplot(1,2,2);
imshow(log(abs(J)),[8,10])
title('fft');
温馨提示:答案为网友推荐,仅供参考
相似回答