⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 代码20-5.txt

📁 matlab宝典书籍源码 全部代码 希望大家喜欢
💻 TXT
字号:

load sinsin             
figure;                            % 新建窗口
image(X);                         % 显示图像
colormap(map);                    % 设置色彩索引图
title('原始图像');                    % 设置图像标题
axis square;                      % 设置显示比例,生成噪声图像 
init=2055615866;                  % 初始值
randn('state',init);                  % 随机值
x = X + 18*randn(size(X));
figure;                           % 新建窗口
image(x);                         % 显示图像
colormap(map);                    % 设置色彩索引图
title('含噪图像');                    % 设置图像标题
axis square;                      % 设置显示比例,查找默认值 (参见函数ddencmp). 
[thr,sorh,keepapp] = ddencmp('den','wv',x);   % 使用全局阈值选项进行图像降噪处理。
xd = wdencmp('gbl',x,'sym4',2,thr,sorh,keepapp);
figure;                            % 新建窗口
image(xd);                        % 显示图像
colormap(map);                    % 设置色彩索引图
title('消噪后的图像');                % 设置图像标题
axis square;                       % 设置显示比例

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -