Compression 基于DCT的压缩感知

Compression 基于DCT的压缩感知,compression,dct,Compression,Dct,我需要了解以下部分 **A=zeros(M,N);** **for k=1:M** **A(k,:)=dct(Phi(k,:));** **end** Result2 = BSBL_BO(A,y,groupStartLoc,0,'prune_gamma',-1, 'max_iters',20); 为什么作者要计算传感矩阵Phi的DCT 我知道的是 y=φ*DCT(x) 因此,我们需要求DCT(x),而不是DCT(Phi) 完整的代码 % Example showin

我需要了解以下部分

  **A=zeros(M,N);**
    **for k=1:M**
    **A(k,:)=dct(Phi(k,:));**
    **end**
Result2 = BSBL_BO(A,y,groupStartLoc,0,'prune_gamma',-1, 'max_iters',20);
为什么作者要计算传感矩阵Phi的DCT

我知道的是

y=φ*DCT(x) 因此,我们需要求DCT(x),而不是DCT(Phi)

完整的代码

% Example showing the ability of BSBL to recover non-sparse signals.
% The signal to recover is a real-world fetal ECG data
clear; close all;      
N = 250;
M = 125;
% load fetal ECG data
load ECGsegment.mat;
x = double(ecg);
% load a sparse binary matrix. 
load Phi.mat;
% =========================== Compress the ECG data ====================
y = Phi * x;

% First recover the signal's coefficients in the DCT domain;
% Then recover the signal using the DCT ceofficients and the DCT basis
% Look at the coefficients when representing the fetal ECG signal in DCT
% domain; Still, the coefficients are not sparse. To recover all the
% coefficients are not impossible for most compressed sensing algorithms!
set(0, 'DefaultFigurePosition', [400 150 500 400]);
figure(2);
plot(dct(ecg)); title('\bf DCT coefficients of the fetal ECG signal; They are still not sparse!');
% Now we use the BSBL-BO. Its' block size is randomly set ( = 25, as in the
% above experiment).

**A=zeros(M,N);
for k=1:M
A(k,:)=dct(Phi(k,:));
end**
Result2 = BSBL_BO(A,y,groupStartLoc,0,'prune_gamma',-1, 'max_iters',20);
signal_hat = idct(Result2.x);
set(0, 'DefaultFigurePosition', [800 150 500 400]);
figure(3);
subplot(211);plot(signal_hat); title('\bf Reconstructed by BSBL-BO from DCT Domain'); 
subplot(212);plot(x,'r');title('\bf Original ECG Signal');