高性能小波去噪源码程序 - matlab算法设计 - 谷速源码
下载频道> 资源分类> matlab源码> 算法设计> 高性能小波去噪源码程序

标题:高性能小波去噪源码程序
分享到:

所属分类: 算法设计 资源类型: 文件大小: 441.42 KB 上传时间: 2016-01-25 20:24:17 下载次数: 78 资源积分:1分 提 供 者: xiaopeng2 高性能小波去噪源码程序
内容:
高性能小波去噪源码程序,程序员在编程的过程中可以参考学习使用,希望对IT程序员有用,此源码程序简单易懂、方便阅读,有很好的学习价值!
clear all;clc
% Get Image File from the user
[FileName,PathName] = uigetfile(...
                            {'*.jpg;*.tif;*.png;*.gif','All Image Files';...
                            '*.*','All Files'},...
                            'Select Images','MultiSelect','off');
 
% Constructing FileName and FilePath for reading selected image
I = strcat(PathName,FileName);
RGB = imread(I);        % Read Selected Image
% RGB = imread('football.jpg');
OI = preprocess(RGB);   % Preprocess Seleted Image
 
% Get variance of noise from user
v = input('Enter variance of speckle noise = ');
NI = AddSpecNoise(OI,v);
% Applying Savitzky-Golay Filter on Noisy Image
B = sgolayfilt(NI,3,41,[],2);
% Applying Median Filter on Noisy Image
C = medfilt2(NI,[3 3]);
% Get level of wavelet decomposition from user
L = input('Enter level of wavelet decomposition = ');
% Compute Non-Decimated Two Dimensional Wavelet Transform
AI = ndwt2(OI,L,'db1');
BI = ndwt2(B,L,'db1');
CI = ndwt2(C,L,'db1');
% Applying Brute Force Threshold Algorithm for finding threshold
[threshtemp MSEtemp PSNRtemp] = bft(NI,AI,BI,CI,L,2,'try');
% Selecting best threshold value from previous BFT ouput which gives
% maximum PSNR as selecting for minimum MSE degrades the visual quality of
% image.
thresh = threshtemp(PSNRtemp==max(max(PSNRtemp)));
thresh = max(max(thresh));
% Applying Brute Force Threshold Algorithm for computing best result
[thresh MSE PSNR DI] = bft(NI,AI,BI,CI,L,2,'execute',thresh);
% Visualize Image
subplot(2,3,1);imshow(OI);title('Original Image');
subplot(2,3,2);imshow(NI);title('Speckled Image');
subplot(2,3,3);imshow(B);title('Savitzky-Golay Filetered Image');
subplot(2,3,4);imshow(C);title('Median Filetered Image');
subplot(2,3,5);imshow(DI);title('De-Speckled Image');
xlabel(['PSNR = ',num2str(PSNR),' dB','  ','MSE = ',num2str(MSE)]);
 
figure(2);
subplot(1,2,1);imshow(NI);title('Speckled Image');
subplot(1,2,2);imshow(DI);title('De-Speckled Image');
xlabel(['PSNR = ',num2str(PSNR),' dB','  ','MSE = ',num2str(MSE)]);

文件列表(点击上边下载按钮,如果是垃圾文件请在下面评价差评或者投诉):

关键词: 高性能 源码 程序

Top_arrow
回到顶部
联系方式| 版权声明| 招聘信息| 广告服务| 银行汇款| 法律顾问| 兼职技术| 付款方式| 关于我们|
网站客服网站客服 程序员兼职招聘 程序员兼职招聘
沪ICP备19040327号-3
公安备案号:沪公网安备 31011802003874号
库纳格流体控制系统(上海)有限公司 版权所有
Copyright © 1999-2014, GUSUCODE.COM, All Rights Reserved