Should I apply low-pass filters to all recordings to enhance signal quality? ECG frequencies fall in the range of 0.5 to 150 Hz. If your sampling rate is above 300 Hz, you should first add a lowpass filter with cutoff frequency at 150 Hz. However, you should always take a look at the spectrum of your signal to detect if it has unwanted artifacts. In case you decide to filter your signals, you must filter them all with the same filter to mantain uniformity in your results.
What are your recommendations on managing noise while preserving the integrity of PQRST segments? It all comes to visualizing a clean spectrum. Take a look at the following code.
pspectrum(ecg,fs,'Leakage',1)
This ECG seems to have line noise, based on the spike that shows at 60 Hz. The other spikes are due to the fundamental frequency (FF) of the ECG ranging from 1 to 1.67 Hz. The frequency at which the first spike appears is the FF and can be used to obtain the heart rate (HR = 60*FF). The other spikes show FF harmonics, which are just repetitions of the first spike that are spaced over the spectrum with a uniform separation of its FF.
In other words, the FF of the figure above is 1.5 Hz, so the next spikes appear at 3, 4.5, 6 Hz and so on. You should see its amplitude reduce as the frequency increases, so you must not filter out these spikes.
In this case, it is recommended to apply a lowpass filter with a cutoff frequency below 60 Hz, or a bandstop filter rejecting this unwanted frequency.
To compare both
ecg_filt = lowpass(ecg,50,fs);
title('Filtered ECG (Lowpass fc = 50 Hz)')
pspectrum(ecg_filt,fs,'Leakage',1)
ecg_filt2 = bandstop(ecg,[59 61],fs);
title('Filtered ECG (Bandstop fp = 60 Hz)')
pspectrum(ecg_filt2,fs,'Leakage',1)
As you can see, after filtering with both types of filter, the quality of the signal improves a lot, and the PQRST waves appear properly in both cases (this is a healty subject). It's up to you to determine if your signals need extra filtering or not.
Should I perform segmentation separately for each of the 12 leads, or should I merge them before segmentation? What would be the pros and cons of each approach? You should apply the segmentation individually for each of the leads of your interest. Each lead considers a different electrode placement at the moment of capturing the ECG, and these changes in position translates into obtaining different information from each of them. There are no pros but cons to merging the 12 leads into one signal. You loose relevant information. In certain pathologies, some waves have abnormal amplitudes, and these changes are best appreciated only in certain leads. This is why the ECG is taken with many leads in the first place.
Appart from that, you should keep the procedure of segmentation uniform, so that your segmentations come out consistent.
Regards,
Diego.