资源简介
压缩感知技术在信号去噪中的应用,程序代码可以调试运行成功
代码片段和文件信息
function ResIm = Image_Denoising_Global_Denoising(Im trueIm)
% Denoise image by denoising its patches using a pre-determined dictionary.
% Patches are denoised WITHOUT overlap.
%
% Inputs :
% Im : image to denoise double [0 255]
% trueIm : This is used (unfairly) to optimize the parameters for the algorithm
%
% Outputs :
% ResIm : Result Image for the best parameter
%% Parameters
imLen = numel(Im);
%% Create the dictionary - Haar
[HaarDict atomNorms] = Generate_Haar_Matrix(size(Im) 2);
atomNorms = atomNorms(:);
invAtomNorms = 1 ./ atomNorms;
% Show_Haar_Dict(HaarDict size(Im));
nAtoms = size(HaarDict 2); % = 1 + 3 * nLevels
%% Prepare the projections of the image onto the dictionary
projs = HaarDict‘ * Im(:);
absProjs = abs(projs);
%% Test for different values of T
Tvalues = [0 : 200];
resPSNRs = zeros(1 length(Tvalues));
fprintf(‘%d T values: ‘ length(Tvalues));
for Tind = 1 : length(Tvalues)
if mod(Tind 10) == 0 fprintf(‘%d ‘ Tind); end;
% Current threshold
T = Tvalues(Tind);
% Compute the hard-thresholding result
resProjs = projs .* (absProjs > (T .* invAtomNorms));
% Compute the result signal by multiplying by the dictionary
currResIm = HaarDict * resProjs;
currResIm = reshape(currResIm size(Im));
% Compute error result
resPSNRs(Tind) = Compute_Error_Stats(currResIm trueIm);
end
fprintf(‘\n‘);
%% Find the best value and plot the results
[~ maxPSNRind] = max(resPSNRs);
bestT = Tvalues(maxPSNRind);
if 1
figure;
plot(Tvalues resPSNRs ‘+r‘);
title(‘PSNR as a function of T‘);
end
%% Reconstruct the image for the best value of T
resProjs = projs .* (absProjs > (bestT .* invAtomNorms));
ResIm = HaarDict * resProjs;
ResIm = reshape(ResIm size(Im));
%%
return;
% [nm]=size(Haar);
% W=[0.25*ones(n*41); 0.5*ones(n*31)];
function [HaarDict atomNorms] = Generate_Haar_Matrix(imSize nLevels)
atomNorms = [];
% Prepare the first level bands
basicH = [1 -1];
basicL = [1 1];
HH1 = kron(basicH‘ basicH);
HaarDict = Construct_One_Haar_Band(imSize HH1);
atomNorms = [atomNorms ones(1 prod(imSize)) * sqrt(sum(HH1(:).^2))];
LH1 = kron(basicL‘ basicH);
HaarDict = [HaarDict Construct_One_Haar_Band(imSize LH1)];
atomNorms = [atomNorms ones(1 prod(imSize)) * sqrt(sum(LH1(:).^2))];
HL1 = kron(basicH‘ basicL);
HaarDict = [HaarDict Construct_One_Haar_Band(imSize
相关资源
- MATLAB2012B+CCS3.3+TI28035TI28335代码生成配
-
在Simuli
nk中利用simmechanics对三自由度 - csma/ca和csma/cd的matlab仿真源代码带有详
- DCT_CS 稀疏矩阵
- 西门子PLCs7-200控制步进电机事例
- 基于Matlab2018b的SimMechanics工具箱建立的
- MGCS样例程序
- GCSO.m
- 用POCS方法对图像进行超分辨率重构
- 压缩感知稀疏度自适应匹配追踪算法
- matlab mac协议之ALOHA协议,CSMA协议
- 压缩感知MP重构算法的matlab实现
- 使用Matlab和CCS实现FIR滤波器的设计
- csdn20200307_SingleRectifierSOGI_QSGPLL.mdl
- 曲率尺度空间算法检测角点matlab
- ODCSK正交差分混沌键控的matlab仿真
- 基于MATLAB_Robotics工具箱的工业机器人
- 三次样条插值函数csape的用法
- 鸡群算法CSOmatlab程序代码
- 基于DSP的FIR滤波器ccs模拟 高通 低通
- SAR成像基本算法程序RD,CS,RMA
- 多光谱图像评价指标含psnrrmse ergas s
- 鸡群算法CSO
- CCS环境下滤波器设计
- COMSOL Multiphysics 3.4 注册文件
- 凸集投影法POCS超分辨重建算法MATLAB实
- CSP共空间模式分解算法及特征值选取
- Ucsd_garch
-
position ba
sed dynamics - 用matlab编写的二维最大熵和最小交叉
评论
共有 条评论