Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Motion Capture
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Mary

Posts: 20
Registered: 12/7/10
Motion Capture
Posted: Apr 22, 2013 11:51 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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:
Data=dlmread('MLTask1t1.csv',',');
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!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.