0
$\begingroup$

I've posed the similiar question

I appreciate that the former replier tells me the process is about Hilber transform,but I'm still confused with the positive frequency.

The paper process a cardiac cycles, using a lock-in amplifaction. Chose a region mean pixel value as the time domain signal. After that, it operates fft on the singnal and band pass only calculating on positive frequency wjich in [0.7~1.5]Hz as in the picture C1 and C2.Therefor, operating ifft on the spectrum gets the reference function.The process is the same in the picture.

enter image description here

I got 3 questions.

first of all,

Does the 'calculating on positive frequency' mean calculating on the analytic signal? How should I understand the negetive frequency? Should I do any process like fft then cut-off the unwanted frequency or hilber transform then cut-off the real and imag part,or just don't do anything.

Second, The paper shows the processed spectrum ifft will be a complex number, and the complex number real part and image part would be orthogonal.Does Hilbert transform satisfy the required?

for i = 1:1024
   filename = ['image' num2str(i) '.tiff'];
   img(:,:,i)= imread(filename);  %1024 points
   rawdata(i) = mean2(img(110:140,110:140,i))  % image ROI pixel mean as time signal
end
nfft=1024/2;
[row,column]=size(img(:,:,1));
ldf=samplerate/(nfft-1);          % calculate band pass location
Freq_range=[0.7 1.5];
R1 = round(Freq_range(1)/ldf);
R2 = round(Freq_range(2)/ldf);
Y=fft(rawdata);
Y(1:R1)=0;                       % band pass 
Y(R2:nfft+1)=0;
[m,p]=max(Y(1:nfft+1));          % the dominate frequency
Rcfeq_MXfeq=p*ldf;
BP_data=ifft(Y);                 % ifft signal is a complex number

%% lock in amplification
corrematrix = zeros(row,column);
for i = 1: length(rawdata)
    corrematrix = corrematrix +raw_img(:,:,i)*BP_data(i);
end

t = [0:1023]/samplerate; % 時間向量
for j = 1 : length(rawdata)
        H = real(corrematrix)*cos(2*pi*Rcfeq_MXfeq*t(j))+imag(corrematrix)*sin(2*pi*Rcfeq_MXfeq*t(j));

Last, How to implement the band pass filter to my signal would be mach the paper result , my code is like below.

The former replier had told me do fft on the analytic signal wolud be only positive component.Does it mean I just doing band pass on the analytic signal and the ifft would be the result.

```samplerate=30;      
for i = 1:1024
   filename = ['image' num2str(i) '.tiff'];
   img(:,:,i)= imread(filename);  %1024 points
   rawdata(i) = mean2(img(110:140,110:140,i))  % image ROI pixel mean as time signal
end
nfft=1024/2;
[row,column]=size(img(:,:,1));
ldf=samplerate/(nfft-1);          % calculate band pass location
Freq_range=[0.7 1.5];
R1 = round(Freq_range(1)/ldf);
R2 = round(Freq_range(2)/ldf);
rawdata_a=hilbert(rawdata)       % hilbert transform
Y=fft(rawdata_a);
Y(1:R1)=0;                       % band pass 
Y(R2:nfft+1)=0;
[m,p]=max(Y(1:nfft+1));          % the dominate frequency
Rcfeq_MXfeq=p*ldf;
BP_data=ifft(Y);                 % ifft signal is a complex number

The artical is Photoplethysmographic imaging of high spatial resolution

DOI is 10.1364/BOE.2.000996

$\endgroup$
2
  • 4
    $\begingroup$ I’m sorry, but rather than asking the same question twice, please edit your previous question! fast fourier transform band pass filter only on positive frequency $\endgroup$
    – Jdip
    Commented Sep 10, 2023 at 14:48
  • $\begingroup$ Since your question seems to revolve around not understanding the Hilbert transform I suggest that rather than asking your whole question again, you first search the web for information on why signal processing folks talk about positive and negative frequencies (there's plenty of answers here on Stack Exchange), then why the Hilbert transform is used, ditto. $\endgroup$
    – TimWescott
    Commented Sep 11, 2023 at 1:06

0

Browse other questions tagged or ask your own question.