资源简介
该算法是对IHT算法的完整实现,使用者可改变图片后直接使用
代码片段和文件信息
%%二维迭代硬阈值法(IHT)
% function Demo_CS_IHT()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the DCT basis is selected as the sparse representation dictionary
% instead of seting the whole image as a vector I process the image in the
% fashion of column-by-column so as to reduce the complexity.
% Author: Chengfu Huo roy@mail.ustc.edu.cn http://home.ustc.edu.cn/~roy
% Reference: T. Blumensath and M. Davies “Iterative Hard Thresholding for
% Compressed Sensing” 2008.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%------------ 读入图像 --------------
load C:\Users\zkdn\Desktop\MATLABdata\I1\I1.mat
X=I1;
background=imopen(Xstrel(‘disk‘15));%获取背景信息
X=imsubtract(Xbackground);%利用函数去除背景
X=double(X);
[heightwidth]=size(X);
%------------ 形成测量矩阵和基本矩阵---------------
Phi=randn(floor(height/2)width); % only keep one third of the original data
Phi = Phi./repmat(sqrt(sum(Phi.^21))[floor(height/2)1]); % normalize each column
mat_dct_1d=zeros(512512); % building the DCT basis (corresponding to each column)
for k=0:1:511
dct_1d=cos([0:1:511]‘*k*pi/512);
if k>0
dct_1d=dct_1d-mean(dct_1d);
end;
mat_dct_1d(:k+1)=dct_1d/norm(dct_1d);
end
%--------- 投影 ---------
X_cs_1d=Phi*X; % treat each column as a independent signal
%-------- 恢复使用iht ------------
sparse_rec_1d=zeros(heightwidth);
Theta_1d=Phi*mat_dct_1d;
s_ratio = 0.2;
for i=1:width
column_rec=cs_iht(X_cs_1
相关资源
- 压缩感知之分段正交匹配追踪法StOM
- 导电煤质分界面平面的垂直入射的M
- 处理高密度椒盐噪声matlab代码
- matlab 相机标定工具箱
- 数学建模动态规划matlab编程与例题精
- 蚁群算法最短路径通用Matlab程序
- JPEG标准哈夫曼编码无损压缩Matlab
- mfsk调制解调matlab源程序
- 语音信号的双门限的端点检测MATLAB代
- matlab robotics toolbox 工具箱
- 基于Matlab的语音信号端点检测程序
- 基于MATLAB实现DTW算法
- Matlab模糊工具箱和神经网络工具箱的
- DVHOP定位算法源程序MATLAB
- 快速小波分解的M文件
- 强化学习_倒立摆_Matlab程序
- matlab的多用户检测
- MATLAB 地震程序
- 基于Matlab的多图像超分辨率重建算法
- Matlab实现的一个简单的RADAR预警雷达模
- Matlab模糊自适应PID控制仿真程序
- SC_OFDMA的Matlab仿真
- 船舶航向模糊控制matlab仿真代码非s
- zw_matlab形成节点导纳矩阵的程序.zip
- zw_MATLAB实现图像去噪滤波锐化边缘检
- 遗传算法求解Rastrigin函数
- 雷达图像处理的入门算法
- 用matlab处理语音信号
- OFDM物理层发射机_接收机模型matlab代码
- MATLAB R2010b/R2012b破解lisence
评论
共有 条评论