I'm working on a project that involves the analysis of motion data, to compare and give a similarity score. I am at the point in my application where I can collect and display data, and now need some algorithmic direction.
Goal: given two (x,y,z) time series of motion data recorded from the accelerometer, compute a similarity score (real number, eventually 0 to 100) that gives a measure of how similar the motion was, from the recordings.
Examples: Here are some images from my software, giving an idea of the data I've collected (and my opinions on what their similarity scores should be):
This one should score quite well
Maybe this should score worse
Should not score well
Pretty terrible
Alright score
Pretty good
Not good
Some ideas: I have some experience in audio processing and computer vision, so my initial ideas come from there. To start I was thinking of low-pass filtering (q: which LPF? There's a lot.) the signals, then trying dynamic time warping. I would compare x1 to x2, y1 to y2, etc in this way. However, this seems to me to lose important information such as how the x1 series relates to z1, compared to how x2 relates to z2 series.
Another thought I had was doing analysis in the frequency domain, perhaps using MFCCs. This is a common technique in speech recognition from what I understand.
There's also the approach of "screw it, machine learning." I could store templated gestures and run some sort of magic to make them recognizable. This is not my preference (I'd like to be able to pull this off without requiring tons of training data), but if someone knows of a scheme where you're like "Oh this would definitely work well", then sure.
Software + Implementation: This project is being done in Java, and my data is in the form:
float[150] x1;
float[150] y1;
float[150] z1; //note: x2,y2,z2 will be of different length, but similar
So it should be pretty easy to work with, if anyone wants to recommend libraries to use based on algorithm suggestions.
Other: There is the issue of orientation. However, my plan is to take one of the samples as the "reference" and rotate every x[i],y[i],z[i]
point of the other to match it. Then do the comparison. Current plan for this is using this rotation formula: Rodrigues' rotation formula Does this make sense?