Automatization of movement phase detection

4 views (last 30 days)
Hello everyone:)
I have the following challenge:
I work with a motion capture task where people grasp different sized cylinders and monitor the flexion angles of their finger joints. I wanna determine the initiation of the flexion as well as the end automatically (since I may have between 2000-4000 curves). The big increase of the three angle curves you can see below is the mentioned flexion in all three finger joints. In order to determine the points I look for, I used findpeaks of the differentiated angle which gives me the highest slope of the curves (red circles - peak of smoothed slope and blue circles - peak of noisy data). I choose the max of the smoothed slope of the red curve (which turns out to be the most reliable one) and move from this point to both directions using two different approaches. The first approach is also just findpeaks which results in the stars colored magenta.The second approach is a moving window that calculates the variance within the window and plots the points in red when a certain threshold is reached.
As you can see in the first image, that works quite okay with plots that have a clear local minima and maxima:
The points of the same type (start/end) on the different curves should be at least in proximity (regarding the x-axis) since the movement of the fingers is synchronized. This looks quite good here. However, this also results in the challenge of high accuracy since the final outcome parameter I want to investigate is the timely difference at flexion initation and the timely difference at flexion end.
The problem I have is that the human grip is enormously variable. You see almost everything from a peak at beginning/end, just flattening, flattening with a later peak and so on. So, I don't always get clear curves like this. As you can see on the second imagethis is an example with some curves more or less flattening out.
The determined points on the red curve seem reasonably well. On the green curve I would prefer the variance approach (red star) whereas on the blue both points are too late since one can recognize the clear trend of flattening beforehand (that is not sufficient for the threshold).
In other cases I got even crazier curves like the red one which I not yet have found a solution for.
Another thing I thought about is the function findchangepts but have not yet found an optimal solution with it.
I am really looking forward to hear your ideas, it would mean a lot to me!!:)

Answers (0)

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!