资源简介
最近发现网上压缩感知中用OMP算法重构图像的代码很多,但很少有应用OMP算法来重构整个视频序列的,代码是自己写的,希望对初入门压缩感知的有帮助。由于重构时间的原因,程序中只对前8帧进行了重构。
代码片段和文件信息
function hat_x=cs_omp(yT_Matm)
% y=T_Mat*x T_Mat is n-by-m
% y - measurements
% T_Mat - combination of random matrix and sparse representation basis
% m - size of the original signal
% the sparsity is length(y)/4
n=length(y);
s=floor(n/4); % 测量值维数
hat_x=zeros(1m); % 待重构的谱域(变换域)向量
Aug_t=[]; % 增量矩阵(初始值为空矩阵)
r_n=y; % 残差值
for times=1:s; % 迭代次数(稀疏度是测量的1/4)
for col=1:288; % 恢复矩阵的所有列向量
product(col)=abs(T_Mat(:col)‘*r_n); % 恢复矩阵的列向量和残差的投影系数(内积值)
end
% product=abs(T_Mat‘*r_n);
[valpos]=max(product); % 最大投影系数对应的位置
Aug_t=[Aug_tT_Mat(:pos)]; % 矩阵扩充
T_Mat(:pos)=zeros(n1); % 选中的列置零(实质上应该去掉,为了简单将其置零)
aug_x=(Aug_t‘*Aug_t)^(-1)*Aug_t‘*y; % 最小二乘使残差最小
r_n=y-Aug_t*aug_x; % 残差
pos_array(times)=pos; % 纪录最大投影系数的位置
end
hat_x(pos_array)=aug_x; % 重构的向量
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-10-08 15:17 CS_OMP_MAIN\
文件 1371 2012-09-26 21:02 CS_OMP_MAIN\cs_omp.m
文件 4003 2012-09-26 21:34 CS_OMP_MAIN\cs_omp_main_1.m
文件 45619200 2006-04-22 05:18 CS_OMP_MAIN\foreman_cif.yuv
- 上一篇:编程之美微软面试心得
- 下一篇:微型计算机控制技术课件
相关资源
- David_A._Patterson_John_L._Hennessy_Computer_O
- ComputerOrganizationandDesign5th.pdf
- Arithmetic complexity of computations
- Cloud Computing Principles Systems and Applica
- 中文版无水印版计算机视觉:模型、
- Computer Arithmetic Algorithms
- Digital Design and Computer Architecture_2nd
- DevComponents.DotNetBar破解全集,其中有个
- Numerical Computation of INTERNAL AND EXTERNAL
- Computer-vision-for-visual-effects pdf
- Computer Graphics: Principles and Practice (
- CompTIA Security+ SY0-501 Cert Guide 4th Editi
- Learning OpenCV Computer Vision with the OpenC
- The Finite Volume Method in Computational Flui
- IocompV4Sp2完全破解版
- Computer Graphics Principles and Practice 3rd
- ComputerVisionAModernApproach(中文版).p
- Computer Controlled Systems (3rd edition)
- Matrix Computations 4th Edition G.H. Golub an
- 计算机动画算法与技术 Computer Animat
- Probability and Computing by Mitzenmacher and
- 编译原理经典用书Compilers-英文第二版
- 电磁兼容导论Introduction to Electromagne
- 广义主成因分析Generalized Principal Com
- ComputerArchitectureAQuantitativeApproach5th.p
- FinsGateway2003.part1
- BCI Competition IIIData Sets IIIb
- Cloud Computing 无水印pdf
- MIT机器视觉讲义2compute vision
- computer and robot vision
评论
共有 条评论