Azzera filtri
Azzera filtri

baseline correction using media filter

9 visualizzazioni (ultimi 30 giorni)
sarmad m
sarmad m il 12 Mag 2017
Commentato: Star Strider il 17 Mag 2017
Hi
I have used median filter (medifilt1)to correct the baseline , is this method is correct ? or there is other methods that can give better results ?
close all
% plot default annotated peaks
subplot(2,1,1);
order =4 ;
framelen =13;
lx = 20;
% generate sinal
x = 1:1:1274;
y = (AV)';
y = sgolayfilt(y,order,framelen);
% get derivatives
dy = diff(y);
findpeaks(y -medfilt1(y,50) ,x,'Annotate','extents','MinPeakProminence',0.008);
[pks,locs,peakWidth1,p] = findpeaks(y -medfilt1(y,50),x,'MinPeakProminence',0.008);
subplot(212);
plot(x,y);
hold on
plot(locs,pks,'*m')
Thanks

Risposte (1)

Star Strider
Star Strider il 12 Mag 2017
Your medfilt approach seems to be giving appropriate results, but is not the approach I would use.
For initial EKG signal processing, I usually use a Chebyshev Type II filter with a low-frequency cutoff of 1 Hz and a high-frequency of 100 Hz, since that eliminates the low-frequency baseline variations and d-c (constant) offset, and high-frequency noise. (Even abnormal EKGs — for example atrial flutter and fibrillation — have a bandwidth of 0+ to 100 Hz. Everything greater than 100 Hz is noise.)
Your original EKG appears to have atrial fibrillation, possibly contaminated with EMG noise. I would be reluctant to use a Savitzky-Golay filter on an EKG, since it has the tendency to obscure potentially clinically-relevant details.
  8 Commenti
sarmad m
sarmad m il 17 Mag 2017
My data is from video file with 30 FPS and each video file generates different data . These peaks represents eye blinks .So , for each video file there is different number of peaks (blinks ). I used SG filter with median filter to correct baseline then findpeaks which gave me good baseline correction .
is Chebyshev filter is applicable in my case ?
Star Strider
Star Strider il 17 Mag 2017
The Chebyshev filter would still be applicable. Do a fft (link) on your signal to determine the signal frequencies and the noise frequencies. Then, design the filter passband to include the signal and eliminate as much of the noise as possible, as well as eliminate baseline variation.
Experiment with both approaches to see what the best and most efficient is.
The plot looks like an EKG with atrial flutter. EKG signal processing questions are frequent here.

Accedi per commentare.

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by