Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Motion Capture
Replies: 0

 Mary Posts: 20 Registered: 12/7/10
Motion Capture
Posted: Apr 22, 2013 11:51 AM

Good Morning!

I am trying to process some motion capture data I obtained from a small scale experiment I am running.

The motion capture data essentially places out the markers on a x,y,z grid over time.
The current markers are:
- x2 on the wrist
- X1 on the elbow
- x1 on the shoulder
- x3 on the chest (triangle pattern- under the clavicle and 2 on RandL collarbones)

I've read several articles on how to go about calculating joint angles from markers like this, but I think I have my math/code wrong somewhere:

This is what I have so far:
TimeVec=Data(:,2);
Nt=length(TimeVec);
WR=Data(:,3:5);
WU=Data(:,6:8);
Wri=(WR+WU)/2;
EL=Data(:,9:11);

Xmax=max(max(Data(:,3:3:end)));
Ymax=max(max(Data(:,4:3:end)));
Zmax=max(max(Data(:,5:3:end)));
Xmin=min(min(Data(:,3:3:end)));
Ymin=min(min(Data(:,4:3:end)));
Zmin=min(min(Data(:,5:3:end)));

figure, FigInd=gcf;
for k=1:Nt

% Animation
figure(FigInd)
plot3(WR(k,1),WR(k,2),WR(k,3),'o'); hold on
plot3(WU(k,1),WU(k,2),WU(k,3),'o');
plot3(EL(k,1),EL(k,2),EL(k,3),'o');
plot3(SH(k,1),SH(k,2),SH(k,3),'o');
plot3(C1(k,1),C1(k,2),C1(k,3),'o');
plot3(C2(k,1),C2(k,2),C2(k,3),'o');
plot3(C3(k,1),C3(k,2),C3(k,3),'o');

plot3([WR(k,1) WU(k,1)],[WR(k,2) WU(k,2)],[WR(k,3) WU(k,3)],'b');
plot3([WR(k,1) EL(k,1)],[WR(k,2) EL(k,2)],[WR(k,3) EL(k,3)],'b');
plot3([WU(k,1) EL(k,1)],[WU(k,2) EL(k,2)],[WU(k,3) EL(k,3)],'b');
plot3([EL(k,1) SH(k,1)],[EL(k,2) SH(k,2)],[EL(k,3) SH(k,3)],'b');
plot3([SH(k,1) C1(k,1)],[SH(k,2) C1(k,2)],[SH(k,3) C1(k,3)],'b');
hold off, grid on, axis equal;
axis([Xmin Xmax Ymin Ymax Zmin Zmax]);
if k==1
pause
[a,b]=view;
end
view(a,b);
pause(0.01)
end

I'm not sure how I should go about extracting joint angles !
Any input would be greatly appreciated!