I'm looking for some advice on where and what to start reading for learning to solve this.
I've the time series of the position coordinates (x,y) of an animal in an open field (just a cage). I want to detect the time instants when the animal stops or starts "walking" (i.e.: moving from one place to another, not in the same place). I thought it couldnt be so difficult, but I'm finding some trouble solving it.
So, I'm looking for the times from which the signal will be flat, or the instant where the signal starts changing from flatness:
I think this thing may be related with step detection but I'm not sure. I would start with just one coordinate for simplicity. Is seems that step detection could be what im looking for, but: a. my signal "baseline" will be different every time. the animal will move and stop somewhere else, and so. b. the signal can be VERY "noisy" since the animal could and will move a lot while staying in the same place (ie: grooming) c. this changes can be whether slow or fast, and I need both.
Firstly, i ll be glad if i can solve this problem for just one coordinate, although I will have to look for this changes in the two coordinate system.
so, my questions are: 1. is step detection a good aproach to this problem? what else if not? 2. any suggestion in doing this for both (x,y) coordinates?
thanks in advance
EDIT: I get (x,y) coordinates by acquiring an overhead image with a camera and tracking a led attached to the animal's head. Tracking is done by color filtering.
EDIT2: copy of the data:
https://www.dropbox.com/s/oph33szu891rgrl/data_sample.txt
https://www.dropbox.com/s/idulfdr965eeh7i/data_sample.mat
data format is (x,y,t)
EDIT3: I've been trying smoothing the data but it is not really what I expected. I need to clean not high frequencies but low amplitudes. The movements I look for can be either fast or slow, but with big amplitude. here, an example of signal with matlab function smooth() note that I'm looking for the green moments, which I lose when smoothing