# How to measure arm trajectory?

• msn009
Hi,In summary, you are looking for a way to compute the trajectory of an arm when it is curving or moving straight ahead. You have the points from the top and side view, but you need to use them to fit a curve to the data.f

#### msn009

I am not sure in which section this question should belong so I am placing it here for now. I have no experience in physics and body motion so appreciate some patience with my question.

the information i have are pixel coordinates of the head, shoulder, elbow, hand, knee, hips and leg of 2 people facing each other at every point.
this information is collected along a timeframe upto miliseconds so I have about 30 frames that has these coordinate information. Now I need to find a way to measure the trajectory of the arm when it is curving or moving straight ahead towards the person opposite. in the end the a single value result is expected to determine whether the trajectory was a curve or a straight move.

How can I use the points I have to compute this trajectory or perhaps references i can use to aid the thinking process?

Welcome to the PF. Do you have a view from the top as well as the side view? Or only the side view?

Hi msn, Not sure where the physics is in this one ? Looks more like image processing to me. All you want is one single number (curvature?), so you'll have to do a lot of distilling.

You forgot to define 'trajectory of the arm' in terms used before. Idem 'towards the person'.

Hi,
I have the video captures from the top but these points are translated into pixel points in a file. so i have the x and y pixel points for all these joints for each frame.
yes it is somewhat image processing but i have these values saved as points in an excel file. i understand that it might not be purely physics but i see the need to be able to understand the body motion to be able to know how best to compute these trajectories.

how best to compute these trajectories.
It seems like you need to fit a curve to each set of datapoints, and have some definition (tolerances) for what you consider "straight" versus "curved" motion...

https://en.wikipedia.org/wiki/Curve_fitting

so in this case, can i just use the x,y co-ordinates of the hand and try to plot a function that will show whether it is a curved or straight line over time? basically i need use the trajectory of these points to form the definition of whether it is a straight or curved motion

• berkeman
so in this case, can i just use the x,y co-ordinates of the hand and try to plot a function that will show whether it is a curved or straight line over time? basically i need use the trajectory of these points to form the definition of whether it is a straight or curved motion
Yes, I think so. At least that's where I would start. Is one of the issues that you don't have data that is regularly sampled, or are missing some datapoints?

Yes, I think so. At least that's where I would start. Is one of the issues that you don't have data that is regularly sampled, or are missing some datapoints?
yes, that would be a possibility but at this point i will only compute for those that has values in it.

You're describing 2D coordinates, but don't you have 3D motion and therefore need 3D coordinates?

If you have 2D images, I think you need 2 sets of them, with known offsets, to calculate the locations of the points in 3D space. Once you have x,y,z locations of the subject points, then it is just trigonometry calculations to find angles. E.G. if the pivot is at 0,0,0 and the other end of the arm at 1000,0,0 and a certain time later is at 707,707,0 it has rotated 45 degrees about the z axis.

these are 3D motion projected onto 2D so I only have the x,y coordinates for each joint.