转载来自:http://blog.csdn.net/bluecol/article/details/46390105
%装载原始图像信号并图示 X = imread('ddd.png') ; subplot(2,2,1); image(mat2gray(X)); title('原始图像'); axis square; %============================== %生成含噪图像并图示 init=2055615866; rand('seed',init); noise = 12*randn(size(X)); XX=uint8(double(X)+noise); subplot(2,2); image(mat2gray(XX)); title('含噪图像'); axis square; %============================== %首先用sym4小波函数对XX进行2层分解 [c,l]=wavedec2(XX,'sym4'); %实现低通滤波消噪 a1=wrcoef2('a',c,l,'sym4',1); %再次实现低通滤波消噪 a2=wrcoef2('a',2); %============================== %图示消噪处理后的结果 subplot(2,3); image(mat2gray(a1)); title('第一次消噪图像'); axis square; subplot(2,4); image(a2); title('第二次消噪图像'); axis square;