baseline correction using media filter
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 ?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164016/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164018/image.jpeg)
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
0 commentaires
Réponses (1)
Star Strider
le 12 Mai 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 commentaires
Star Strider
le 17 Mai 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.
Voir également
Catégories
En savoir plus sur Digital Filtering dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!