1 算法介绍

     Snapshot compressive imaging (SCI) refers to compressive imaging systems where multiple frames are mapped into a single measurement, with video compressive imaging and hyperspectral compressive imaging as two representative applications. Though exciting results of high-speed videos and hyperspectral images have been demonstrated, the poor reconstruction quality precludes SCI from wide applications. This paper aims to boost the reconstruction quality of SCI via exploiting the high-dimensional structure in the desired signal. We build a joint model to integrate the nonlocal self-similarity of video/hyperspectral frames and the rank minimization approach with the SCI sensing process. Following this, an alternating minimization algorithm is developed to solve this non-convex problem. We further investigate the special structure of the sampling process in SCI to tackle the computational workload and memory issues in SCI reconstruction. Both simulation and real data (captured by four different SCI cameras) results demonstrate that our proposed algorithm leads to significant improvements compared with current state-of-the-art algorithms. We hope our results will encourage the researchers and engineers to pursue further in compressive imaging for real applications.

【压缩感知】基于DeSCI算法实现视频压缩感知matlab源码_视频压缩感知

 【压缩感知】基于DeSCI算法实现视频压缩感知matlab源码_视频压缩感知_02

【压缩感知】基于DeSCI算法实现视频压缩感知matlab源码_视频压缩感知_03​ 

【压缩感知】基于DeSCI算法实现视频压缩感知matlab源码_视频压缩感知_04​ 

2 部分代码

% 'test_DeSCI.m' tests 'decompress snapshot compressive imaging (DeSCI)' algorithm for video reconstruction in
% 'coded aperture compressive temporal imaging (CACTI)'







%% [0] environment configuration
clear;
clc;
close all

addpath(genpath('./DeSCI_algorithm')); % algorithms
datasetdir = './dataset'; % dataset dictionary

para.dataname = 'meas_waterBalloon_cr_10'; % selected 2D measurement
para.cr = str2double(para.dataname(end-1:end)); % compression ratio of the selected measurement, i.e., number of video frames to be recovered from each single 2D measurement
para.numRec = 1; % number of measurement frames to be reconstructed

datapath = sprintf('%s/%s.mat',datasetdir,para.dataname); % path of the selected 2D measurement

%% [1] load dataset

load(datapath); % load measurement
load('./dataset/mask.mat'); % load mask

meas = meas(:,:,1:para.numRec);
meas = 1850*meas./max(meas(:));
mask = double(mask(:,:,1:para.cr));

[nrow,ncol,~] = size(meas);

%% [2] ADMM-WNNM-TV
para.nframe = para.numRec;
para.MAXB = 255;
MAXB = para.MAXB;

para.Mfunc = @(z) A_xy(z,mask);
para.Mtfunc = @(z) At_xy_nonorm(z,mask);
para.Phisum = sum(mask.^2,3);
para.Phisum(para.Phisum==0) = 1;

para.flag_iqa = false; % disable image quality assessments in iterations
para.acc = 1; % enable acceleration
para.flag_iqa = false; % disable image quality assessments in iterations
para.projmeth = 'admm_res'; % projection method
% (GAP for noiseless or ADMM for noisy)
para.gamma = 1; % regularization factor for noise suppression
para.denoiser = 'wnnm'; % WNNM denoising
para.wnnm_int_fwise = true; % enable GAP-WNNM integrated (with frame-wise denoising)
para.blockmatch_period = 20; % period of block matching
para.sigma = [50 45 40]/MAXB; % noise deviation (to be estimated and adapted)
para.vrange = 1; % range of the signal
para.maxiter = [50 50 50]; % first trial
para.patchsize = 24; % patch size
para.iternum = 1; % iteration number in WNNM
para.enparfor = true; % enable parfor
para.numworkers = 12;
if para.enparfor % if parfor is enabled, start parpool in advance
mycluster = parcluster('local');
delete(gcp('nocreate')); % delete current parpool
ord = 0;
while para.cr/2^ord > mycluster.NumWorkers
ord = ord+1;
end
poolobj = parpool(mycluster,min(max(floor(para.cr/2^ord),1),para.numworkers));
end

[vadmmwnnmtv,~,~,tadmmwnnm] = ...
admmdenoise_cacti(mask,meas,[],[],para);

%% [3] show results in figure

% [3.0] rotate and crop
recon = vadmmwnnmtv;
recon_rotate = zeros(725,725,para.numRec*para.cr);

for np=1:para.numRec*para.cr
recon_rotate(:,:,np) = imrotate(recon(:,:,np),-135);
end

recon_rotate = recon_rotate(182:182+363,182:182+363,:);
recon_rotate = recon_rotate/max(recon_rotate(:));

% [3.1] show results in figure
figure;
for i=1:para.numRec*para.cr
imshow(recon_rotate(:,:,i));
pause(0.2);
end

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.

3 仿真结果

【压缩感知】基于DeSCI算法实现视频压缩感知matlab源码_视频压缩感知_05

 【压缩感知】基于DeSCI算法实现视频压缩感知matlab源码_视频压缩感知_06

4 参考文献

 [1] M. Qiao, Z. Meng, J. Ma, X. Yuan, Deep learning for video compressive sensing, APL Photonics 5, 030801 (2020).

[2] Y. Liu, X. Yuan, J. Suo, D.J. Brady, and Q. Dai, Rank Minimization  for Snapshot Compressive Imaging, IEEE Trans. Pattern Anal. Mach.  Intell. (TPAMI), DOI:10.1109/TPAMI.2018.2873587, 2018.

5 代码下载

​​【压缩感知】基于DeSCI算法实现视频压缩感知matlab源码_视频压缩感知_07​​