Median filter C++ code sample |
This routine is much useful for detecting spikes on a variable baseline but performs superiorly to the low-pass filtered derivative when spikes frequency content is close to that of the baseline. The principle of this algorithm is comparable to a running-average, except that instead of computing an average, we estimate the median. This approach is more computer-intensive but works quite well on real data.
For more infos, please refer to :
L. Fiore, G. Corsini, L. Geppetti (1997) Application of
non-linear filters based on the median filter to
experimental and simulated multiunit neural recordings. Journal
of Neurosciences Methods 70: 177-184.
click here to get source code as a text file
Created: 07/16/97; last modification: 07/16/97