Nazurah88
Newbie level 1
imageshac.kus
hi and good day,
im currently doing final project on electrocardiograph segmentation using hidden markov model
for the database i make use of the qt database which are available from Physionet.
first, i preprocess the data by doing baseline wonder removal and denoising, making use of wavelet(which im not sure is it the correct method)
the code i make use is as below:
%**************************************************************************
clc; clear all; close all;
%**************************************************************************
% Get Data & User Inputs
%**************************************************************************
File_Name = sel30.txt %% % ECG Text File
ECG_Data = load(File_Name); % Load The Text File
Time = ECG_Data,1); % First Column Of File
ECG_1 = ECG_Data,2); % Second Column Of File (lead 1)
ECG_2 = ECG_Data,3); % Third Column Of File (lead 2)
Time_Adjusted = Time; % Time In Seconds Already
%%%Eliminate Baseline Drift
Base_1=smooth(ECG_1,150);ecgsmooth1=ECG_1-Base_1;
Base_2=smooth(ECG_2,150);ecgsmooth=ECG_2-Base_2;
%%%apply Wavelet Transform
[C,L]=wavedec(ecgsmooth1,8,'db4');
[d1,d2,d3,d4,d5,d6,d7,d8]=detcoef(C,L,[1,2,3,4,5,6,7,8]);
%%%Denoise
[thr,sorh,keepapp]=ddencmp('den','wv',ecgsmooth1);
cleanecg1=wdencmp('gbl',C,L,'db4',8,thr,sorh,keepapp);
%%%apply Wavelet Transform
[C1,L1]=wavedec(ecgsmooth,8,'db4');
[a1,a2,a3,a4,a5,a6,a7,a8]=detcoef(C1,L1,[1,2,3,4,5,6,7,8]);
%%%Denoise
[thr1,sorh1,keepapp1]=ddencmp('den','wv',ecgsmooth);
cleanecg=wdencmp('gbl',C1,L1,'db4',8,thr1,sorh1,keepapp1);
i hope some one could help me to supervise whether im on the right path of ecg preprocessing or not.
then, i should proceed with mexican hat Continuous wavelet transform method and im totally lost. i think the coding should be as below,
c = cwt(cleanecg1,1:32,'mexh');
but im not sure because its not the same as what it shows in papers, journals, nor proceedings that make use CWT
i want the result to be as below:
**broken link removed**
but i have no one here at my university that could help me..
i really hope that someone could help me..if you could help me, please mail me at nurnazurah@gmail.com
your help and guidance really help me a LOT..
thank you very much!
really appreciate it!!!
hi and good day,
im currently doing final project on electrocardiograph segmentation using hidden markov model
for the database i make use of the qt database which are available from Physionet.
first, i preprocess the data by doing baseline wonder removal and denoising, making use of wavelet(which im not sure is it the correct method)
the code i make use is as below:
%**************************************************************************
clc; clear all; close all;
%**************************************************************************
% Get Data & User Inputs
%**************************************************************************
File_Name = sel30.txt %% % ECG Text File
ECG_Data = load(File_Name); % Load The Text File
Time = ECG_Data,1); % First Column Of File
ECG_1 = ECG_Data,2); % Second Column Of File (lead 1)
ECG_2 = ECG_Data,3); % Third Column Of File (lead 2)
Time_Adjusted = Time; % Time In Seconds Already
%%%Eliminate Baseline Drift
Base_1=smooth(ECG_1,150);ecgsmooth1=ECG_1-Base_1;
Base_2=smooth(ECG_2,150);ecgsmooth=ECG_2-Base_2;
%%%apply Wavelet Transform
[C,L]=wavedec(ecgsmooth1,8,'db4');
[d1,d2,d3,d4,d5,d6,d7,d8]=detcoef(C,L,[1,2,3,4,5,6,7,8]);
%%%Denoise
[thr,sorh,keepapp]=ddencmp('den','wv',ecgsmooth1);
cleanecg1=wdencmp('gbl',C,L,'db4',8,thr,sorh,keepapp);
%%%apply Wavelet Transform
[C1,L1]=wavedec(ecgsmooth,8,'db4');
[a1,a2,a3,a4,a5,a6,a7,a8]=detcoef(C1,L1,[1,2,3,4,5,6,7,8]);
%%%Denoise
[thr1,sorh1,keepapp1]=ddencmp('den','wv',ecgsmooth);
cleanecg=wdencmp('gbl',C1,L1,'db4',8,thr1,sorh1,keepapp1);
i hope some one could help me to supervise whether im on the right path of ecg preprocessing or not.
then, i should proceed with mexican hat Continuous wavelet transform method and im totally lost. i think the coding should be as below,
c = cwt(cleanecg1,1:32,'mexh');
but im not sure because its not the same as what it shows in papers, journals, nor proceedings that make use CWT
i want the result to be as below:
**broken link removed**
but i have no one here at my university that could help me..
i really hope that someone could help me..if you could help me, please mail me at nurnazurah@gmail.com
your help and guidance really help me a LOT..
thank you very much!
really appreciate it!!!