求小波软硬阈值图像降噪程序
clc
close all
clear all
map=gray(256);
x=imread('hzw.jpg');
x=rgb2gray(x);
subplot(2,3,1);
image(x);
colormap(map);
title('原始图片');
axis square;
init=2055615866;
randn('seed',init);
x1=50.*randn(size(x)); %均值为0 方差50^2
x=double(x)
nx=x+x1;
subplot(2,3,2);
image(nx);
colormap(map);
title('加噪后的图片');
axis square;
c=num2str(c);
text(100,100,'PSNR:');
text(300,100,c);