I am trying to detect peaks in the accelerometer data so I can find the number of steps. The speed I have it polling on it is game. I think that should be a good speed to give me data but not to give me too many data points. Are there any algorithms you recommend to figure out the peak? I currently have the data in and excel and I tried graphing it out but there are way too many little jumps up and down.
Asked
Active
Viewed 2,319 times
1
-
Dup of http://stackoverflow.com/questions/3260/peak-detection-of-measured-signal? – lreeder Aug 02 '13 at 18:42
-
I've looked into that. I am not sure which of those algs I could use for this. Since I am looking for step detection I think it has to be within a certain range. I know what range the data should be for a step. – Aug 02 '13 at 18:45
1 Answers
0
I once used peak detection algorithm for some computer vision application. There are many sophisticated techniques, but I wrote very raw approach myself:
I used windowed averaging
filter which smoothed all the local ups and downs (if your peak is narrow used smaller window size).
Then I took discrete derivative
and find all points where derivative sign-ess changed from +ve
to -ve
. Then finally I took average of values around all those points and applied threshold
around 1/3 of average
.
It's not best approach but worked out for me well. You can play around with different discrete filters either in matlab
or python
. There is a very good plugin in python
called scipy
it can make ur life easy.

Shivam
- 2,134
- 1
- 18
- 28