• 大小: 2.67MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-12
  • 语言: 其他
  • 标签: 压缩感知  

资源简介

压缩感知重建算法中重建效果好,速度快的一类算法,其中包含GPSR-BB、GPSR-Basic两类算法代码

资源截图

代码片段和文件信息


close all
% n is the original signal length
n = 2^12;

% k is number of observations to make
k = 2^10;

% number of spikes to put down
% n_spikes = floor(.01*n);
n_spikes = 160;


% random +/- 1 signal
f = zeros(n1);
q = randperm(n);
f(q(1:n_spikes)) = sign(randn(n_spikes1));
%f(q(1:n_spikes)) = randn(n_spikes1);

% measurement matrix
disp(‘Creating measurement matrix...‘);
R = randn(kn);

% orthonormalize rows
R = orth(R‘)‘;

if n == 8192  
   % in this case we load a precomputed
   % matrix to save some time
   load Rmatrix_2048_8192.mat
end
%
disp(‘Finished creating matrix‘);

hR = @(x) R*x;
hRt = @(x) R‘*x;

% noisy observations
sigma = 0; 
y = hR(f) + sigma*randn(k1);

% regularization parameter
tau = 0.005*max(abs(R‘*y));

first_tau_factor = 0.8*(max(abs(R‘*y))/tau);
steps = 5;

debias = 0;

stopCri=3;
tolA=1.e-5;

disp(‘Starting GPSR BB monotonic‘)
[x_BB_monox_debias_BB_monoobj_BB_mono...
    times_BB_monodebias_start_BB_monomse_BB_mono]= ...
         GPSR_BB(yRtau...
         ‘Debias‘debias...
         ‘Monotone‘1...
         ‘Initialization‘0...
         ‘MaxiterA‘10000...
         ‘True_x‘f...
         ‘StopCriterion‘stopCri...
         ‘ToleranceA‘tolA...
         ‘Verbose‘0);
t_BB_mono = times_BB_mono(end);


disp(‘Starting GPSR BB monotonic with continuation‘)
[x_BB_mono_contx_debias_BB_mono_contobj_BB_mono_cont...
    times_BB_mono_contdebias_start_BB_monomse_BB_mono_cont]= ...
         GPSR_BB(yRtau...
         ‘Debias‘debias...
         ‘Continuation‘1...
         ‘ContinuationSteps‘steps...
         ‘FirstTauFactor‘first_tau_factor...
         ‘Monotone‘1...
         ‘Initialization‘0...
         ‘True_x‘f...
         ‘StopCriterion‘stopCri...
         ‘ToleranceA‘tolA...
         ‘Verbose‘0);
t_BB_mono_cont = times_BB_mono_cont(end);

disp(‘Starting GPSR Basic‘)
[x_Basicx_debias_Basicobj_Basic...
    times_Basicdebias_start_Basicmse_Basic]= ...
         GPSR_Basic(yRtau...
         ‘Debias‘debias...
         ‘Initialization‘0...
         ‘MaxiterA‘10000...
         ‘True_x‘f...
         ‘StopCriterion‘stopCri...
         ‘ToleranceA‘tolA...
         ‘Verbose‘0);
t_Basic = times_Basic(end);

disp(‘Starting GPSR Basic with continuation‘)
[x_Basic_contx_debias_Basic_contobj_Basic_cont...
    times_Basic_contdebias_start_Basicmse_Basic_cont]= ...
         GPSR_Basic(yRtau...
         ‘Debias‘debias...
         ‘Continuation‘1...
         ‘ContinuationSteps‘steps...
         ‘FirstTauFactor‘first_tau_factor...
         ‘Initialization‘0...
         ‘True_x‘f...
         ‘StopCriterion‘stopCri...
         ‘ToleranceA‘tolA...
         ‘Verbose‘0);
t_Basic_cont = times_Basic_cont(end);



fprintf(1‘\n\n-------------------------------------------------\n‘)   
fprintf(1‘-------------------------------------------------\n‘)   
fprintf(1‘Problem: n = %g  k = %g number of spikes = %g\n‘nkn_spikes)
fprintf(1‘Parameters: sigma = %g 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-11-15 15:43  GPSR_6.0\
     文件        6148  2007-12-04 11:46  GPSR_6.0\.DS_Store
     文件       65126  2007-01-25 13:54  GPSR_6.0\Camera.tif
     文件        7046  2007-09-23 20:49  GPSR_6.0\demo_continuation.m
     文件        5849  2007-07-13 16:40  GPSR_6.0\demo_image_deblur.m
     文件        8489  2007-10-19 16:40  GPSR_6.0\figures_1_2_3.m
     文件        5225  2007-09-12 18:21  GPSR_6.0\figure_4.m
     文件        5276  2007-12-04 11:46  GPSR_6.0\figure_5.m
     文件        2377  2007-07-12 18:41  GPSR_6.0\figure_6.m
     文件       21922  2008-01-15 16:22  GPSR_6.0\GPSR_Basic.m
     文件       23882  2009-01-16 13:25  GPSR_6.0\GPSR_BB.m
     文件     1296396  2008-04-30 17:42  GPSR_6.0\immi1.mat
     文件       12630  2007-09-06 15:10  GPSR_6.0\IST.m
     文件        8569  2007-06-16 15:41  GPSR_6.0\l1_ls.m
     文件        3178  2007-12-05 19:06  GPSR_6.0\README.txt
     目录           0  2012-11-15 10:59  GPSR_6.0\ricedsp-rwt-ae0d13a\
     目录           0  2012-11-15 10:59  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\
     目录           0  2012-11-15 10:59  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.01\
     目录           0  2012-11-15 10:59  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.01\doc\
     文件        2459  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.01\doc\index.html
     文件        1891  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.01\INSTALL
     文件        3190  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.01\README
     文件      672780  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.01\RWT-2.01.tar.Z
     目录           0  2012-11-15 10:59  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.3\
     文件         867  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.3\INSTALL
     文件         415  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.3\INSTALL_PRECOMPILED
     文件        2094  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.3\LICENSE
     文件        1367  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.3\README
     文件       23793  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.3\rwt-lnx.tar.gz
     文件       23698  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.3\rwt-sol.tar.gz
     文件       15557  2011-09-15 15:33  GPSR_6.0\ricedsp-rwt-ae0d13a\dist\2.3\rwt.tar.gz
............此处省略68个文件信息

评论

共有 条评论