0

I had a nice project in mind, which I will probably not going to do because of a lack of time, but I had some theoretical problem I faced there, which still bother me and might be interesting for you too.

I have a data from an animal, which moves in a discrete way. It move for few frames and then stop for few frames and keep going.

I have the distances between each successive frames of the tip of the tail of the animal. For example if we had 5 frames, I have a list of length of 4, the first value is the Euclidean distance between the tip of its tail in the first frame to the tip of the tail in the second frame, the second value is the distance between the second frame and the third frame and so on..

I believe when the animal is moving the distance is greater then it stays in the place (There is no affect of a dog wagging its tail) and I have an assumption that a movement, and the inter bouts interval are longer then a single frame. Units of movement are irrelevant of course.

Given that signal I wish to tell in which frames was the animal moving. Let examine a plot for example: enter image description here

My first attempt was to use a Gaussian filter, this would look roughly like this: enter image description here

Now taking a median as a threshold might work, but looks like it can leads to some bad decisions, like the last 2 bouts might be separated, might be not. Looking in the original graph make me think they are separated. I am not sure this method is getting the best from it.

What do you think? any ideas? Sorry for my English.. I believe a suggest to correction will arrive right away :)

Shaq
  • 303
  • 1
  • 10
  • I’m voting to close this question because it doesn't look like a programming problem. Rather it seems to be a question about zoological methodology. – High Performance Mark Aug 26 '20 at 10:17
  • I am curious about algorithms that quantities continuous signal to binary signal. Don't take the story too hard .. In every program writing there is a story behind – Shaq Aug 26 '20 at 10:24
  • 1
    This is an interesting problem, but since it requires discussion, it's not suitable for SO. Try stats.stackexchange.com or dsp.stackexchange.com. This problem is actually very difficult; the kind of segmentation and motion detection which our brains do automatically is quite complex and hard to automate. Good luck and have fun. – Robert Dodier Aug 26 '20 at 16:40
  • Also, keep in mind that the "best" way to quantize the continuous signal depends entirely on the purpose for which you need to use it, so, when you post your question in another forum, be sure to explain for what purpose you are trying to do this. – Robert Dodier Aug 26 '20 at 16:43
  • Thanks! I got the same feeling about our brain do automatically but hard to set mathematical rules for them. This make me think maybe machine learning will suit it best. But for this I need data :) – Shaq Aug 26 '20 at 21:03
  • What do you mean it depends on the purpose? I want to classify a noisy binary signal into a binary signal. Why it depends on the purpose? And thanks again for the advice, I will try there. Didnt know SO is not for that kind of questions – Shaq Aug 26 '20 at 21:06

1 Answers1

0

You can smooth the data with a Gaussian kernel. In order to make the problem binary, you can set a fix threshold at e.g. 7.5. The binary vector then is assigned a "1" whenever the values in the smoothed vector are above the threshold, else the value is 0.

drops
  • 1,524
  • 1
  • 11
  • 20
  • A fix threshold is not a good solution, it won't feet between different signals. I suggested setting the median as the threshold, and it still doesn't feel like smart enough – Shaq Aug 26 '20 at 11:47