mythre.m
上传用户:laurel
上传日期:2013-06-05
资源大小:2k
文件大小:1k
- hzsx1=imread('f:/pictures/hzsx1.bmp');
- sx=rgb2gray(hzsx1);
- subplot(2,2,1),imshow(sx);
- subplot(2,2,1),image(sx);
- title('原始图像');
- axis square;
- [c1,l1]=wavedec2(sx,2,'sym4');
- a1=wrcoef2('a',c1,l1,'sym4',1);
- a2=wrcoef2('a',c1,l1,'sym4',2);
- subplot(2,2,2),image(a2);
- title('强制消噪处理');
- axis square;
- [c,l]=wavedec2(sx,5,'sym4');
- thr=50;
- [sxd,cxd,lxd,perf0,perf12]=wdencmp('gbl',sx,'sym2',2,thr,'h',1);
- subplot(2,2,3),image(sxd);
- title('全局阈值去噪');
- axis square;
- thr_h=[75 70];
- thr_d=[74 72];
- thr_v=[78 68];
- thr2=[thr_h;thr_d;thr_v]
- [yxd,cxd,lxd,perf0,perf12]=wdencmp('lvd',sx,'sym2',2,thr2,'h');
- subplot(2,2,4),image(yxd);
- title('给定阈值去噪');
- axis square;