资源简介
CS_recovery_algorithms_OMP_SP_IHT.zip

代码片段和文件信息
% 感谢亲亲使用此代码,此代码解决您的问题了吗~(@^_^@)~
% 没解决的话告诉亲亲一个好消息,登录淘宝店铺“大成软件工作室”,可以下载(????)1分钱成品代码(′▽‘〃)哦~
% 是的,亲亲真的没有看错,挠破头皮的问题真的1分钱就可以解决了(づ??????)づ
% 小的这就把传送门给您,记得要收藏好哦(づ ̄3 ̄)づ╭?~
% 传送门:https://item.taobao.com/item.htm?spm=a1z10.1-c.w4004-15151018122.5.uwGoq5&id=538759553146
% 如果传送门失效,亲亲可以来店铺讨要,客服MM等亲亲来骚扰哦~(*/ω╲*)
function Demo_CS_CoSaMP()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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: D. Deedell andJ. Tropp “COSAMP: Iterative Signal Recovery from
% Incomplete and Inaccurate Samples” 2008.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%------------ read in the image --------------
img=imread(‘lena.bmp‘); % testing image
img=double(img);
[heightwidth]=size(img);
%------------ form the measurement matrix and base matrix ---------------
Phi=randn(floor(height/3)width); % only keep one third of the original data
Phi = Phi./repmat(sqrt(sum(Phi.^21))[floor(height/3)1]); % normalize each column
mat_dct_1d=zeros(256256); % building the DCT basis (corresponding to each column)
for k=0:1:255
dct_1d=cos([0:1:255]‘*k*pi/256);
if k>0
dct_1d=dct_1d-mean(dct_1d);
end;
mat_dct_1d(:k+1)=dct_1d/norm(dct_1d);
end
%--------- projection ---------
img_cs_1d=Phi*img; % treat each column as a independent signal
%-------- recover using omp ------------
sparse_rec_1d=zeros(heightwidth);
Theta_1d=Phi*mat_dct_1d;
for i=1:width
column_rec=cs_cosamp(img_cs_1d(:i)Theta_1dheight);
sparse_rec_1d(:i)=column_rec‘; % sparse representation
end
img_rec_1d=mat_dct_1d*sparse_rec_1d; % inverse transform
%------------ show the results --------------------
figure(1)
subplot(221)imagesc(img)title(‘original image‘)
subplot(222)imagesc(Phi)title(‘measurement mat‘)
subplot(223)imagesc(mat_dct_1d)title(‘1d dct mat‘)
psnr = 20*log10(255/sqrt(mean((img(:)-img_rec_1d(:)).^2)))
subplot(224)imagesc(img_rec_1d)title(strcat(‘1d rec img ‘num2str(psnr)‘dB‘))
disp(‘over‘)
%************************************************************************%
function hat_x=cs_cosamp(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); % length of measurements
s=floor(n/4); % sparsity
r_n=y; % initial residuals
sig_pos_lt=[]; % significant pos for last time iteration
for times=1:s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2010-07-23 10:18 CS_recovery_algorithms_OMP_SP_IHT\
文件 428181 2010-07-23 10:17 CS_recovery_algorithms_OMP_SP_IHT\CS Recovery Algorithms.pdf
目录 0 2010-07-23 10:18 CS_recovery_algorithms_OMP_SP_IHT\software\
文件 3932 2016-09-22 15:42 CS_recovery_algorithms_OMP_SP_IHT\software\Demo_CS_CoSaMP.m
文件 8752 2016-09-22 15:43 CS_recovery_algorithms_OMP_SP_IHT\software\Demo_CS_GBP.m
文件 3378 2016-09-22 15:43 CS_recovery_algorithms_OMP_SP_IHT\software\Demo_CS_IHT.m
文件 3377 2016-09-22 15:43 CS_recovery_algorithms_OMP_SP_IHT\software\Demo_CS_IRLS.m
文件 3814 2016-09-22 15:43 CS_recovery_algorithms_OMP_SP_IHT\software\Demo_CS_OMP.m
文件 3908 2016-09-22 15:43 CS_recovery_algorithms_OMP_SP_IHT\software\Demo_CS_SP.m
文件 66614 2010-05-11 20:29 CS_recovery_algorithms_OMP_SP_IHT\software\lena.bmp
- 上一篇:ZTE2017算法大赛题目及作品
- 下一篇:bianma.rar
相关资源
- 计算机图形学 边填充算法实现代码
- 电力系统潮流计算程序集合
- oracle数据迁移项目实施方案
- Web Api 通过文件流 文件到本地
- Visio图标-最新最全的网络通信图标库
- Spire API文档
- OpenGL参考手册
- Python中Numpy库最新教程
- SPD博士V5.3.exe
- 直流无刷电机方波驱动 stm32 例程代码
- layui后台管理模板
- 仿知乎界面小程序源代码
- 云平台-阿里云详细介绍
- photoshop经典1000例
- scratch垃圾分类源码(最终版本).sb
- IAR ARM 7.8破解
- TI CCS V5.4 安装步骤及破解文件
- 松下plc FP-XH的驱动
- 局域网硬件信息收集工具
- 加快Windows XP操作系统开机速度
- 联想启天M4350 BIOS升级文件
- 操作系统教程课后答案华中科技大学
- 用友ERP考试系统练习题库及答案
- 北京邮电大学数据结构历年考研真题
- 真正!!!概率论与数理统计浙江大
- TMS320VC5509A_开发板使用手册
- hxdef100源码、远控、后门
- CentOS-6.7-x86_64-bin-DVD1to2
- 点阵字库显示中英文
- caxa实体设计2019破解补丁
评论
共有 条评论