资源简介
运用压缩感知原理 稀疏采样 图像重构 图像去噪
代码片段和文件信息
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
- 上一篇:四元数matlab工具箱2.6版
- 下一篇:波长与RGB的转换
相关资源
- 压缩感知稀疏度自适应匹配追踪算法
- 压缩感知MP重构算法的matlab实现
- 压缩感知重构算法基追踪(BP)
- Matlab单像素成像算法比较
- 图像稀疏表示matlab193095
- 压缩感知测量矩阵产生
- MATLAB用压缩感知恢复一维信号
- 压缩感知 贪婪追踪算法成功率的比较
- 压缩感知小波变换synsq_toolboxmatlab代码
- 压缩感知代码,matlab,l1qc_logbarrier
- 压缩感知off grid代码论文见2013
- 压缩感知 OMP重构一维二维信号matlab仿
- 压缩感知OMP算法代码
- 压缩感知之基追踪法BP
- lws压缩感知matlab 代码
- 神经电压缩感知matlab
- 基于压缩感知的信道估计
- 压缩感知离散余弦变换基-小波基MAT
- 压缩感知块稀疏BOMP算法
- 压缩感知图像MATLAB代码美国乔治亚理
- 压缩感知DOA估计
- 大牛写的压缩感知的OMP算法绝对简单
- 压缩感知之分段正交匹配追踪法StOM
- 压缩感知之迭代硬阈值法IHT可直接运
- 分布式压缩感知边信息提取的matlab代
- 小波变换的压缩感知图像处理
- Compressed Sensing 压缩感知书籍
- 一维信号压缩还原信号
- FISTA 压缩感知的图像使用快速迭代s
- 用于压缩感知的各种稀疏变换基和观
评论
共有 条评论