I'm working on a project for college and need to determine the onsets and offsets of ECG segments. I have detected all the peaks but need to do a zero-crossing, and I do not know how to put the isoelectric line on the 0 level. It can be noticed from the following pictures
that the isoelectric line isn't always a straight line.
Any suggestions are very welcome. Thank you