DCT на основе сжатия сжатия - PullRequest
1 голос
/ 10 октября 2019

Мне нужно, пожалуйста, понять следующие части.

  **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);

почему автор вычисляет DCT сенсорной матрицы Phi?

я знаю, что

y = Phi * 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'); 
...