资源简介
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
相关资源
- 微博自动评论助手.crx
- Axure高保真原型:移动客户端的设计与
- 200套PPT模版_带有索引.txt
- 飞狐加速器E版.rar
- CNNIC数字证书工具1.2和rootsupd.exe.zip
- rar(9)
- 课程设计.doc
- 20161031133804181.rar
- Vectorcontrolinductionmotor.rar
- bp.rar
- bianma.rar
- 学生选课系统.rar
- PTHCJIEYA密碼.txt
- GodOfHacker-master.zip
- 中华石杉.txt
- ANSYS19.2破解版.zip
- WindowsServer2008R2(X64)MSDN镜像简体中文
- SAP视频教程地址.docx
- 帝国cmspaypal付款插件.rar
- 全国气象站stations.zip
- sklearn说明.txt
- pb.11.5.2506.rar
- 百度网盘地址.txt
- maxwell最全资料附Maxwell2019最新款.txt
- 小甲鱼课件视频全套.txt
- DJKK音乐器.rar
- 获取腾讯真实视频地址.zip
- gcc-g++.txt
- 相关内容地址.txt
- UDPServerClientTest.zip
评论
共有 条评论