3D plot of kinect x,y,z data over time - question
2 views (last 30 days)
Show older comments
Dear Matlab forum,
I recorded data with kinect sensors that gave me 19 columns of 220 consecutive rows for multiple subject.
The rows are filled filled with x, y and z data. The 19 columns in this dataset represent 19 different joint locations. I want to make a dynamical plot of the 19 joint points moving in x, y and z direction over time. I'm posting my situation in hope to gain insight on the methods you can recommend me to use. A simple and effective method might be most favorable in my situation.
I added the dataset of 1 subject, so you can display the situation.
Hope to hear from you!
-Jerome
2 Comments
Answers (1)
darova
on 8 Oct 2019
I give a start
clc,clear
cla
A = xlsread('pp1_trial1.xls');
nn = 1:19;
X = A(:,nn); % read first 19 columns
Y = A(:,nn+19);
Z = A(:,nn+19*2);
cla
axis equal
% set axis limits
xlim([min(X(:)) max(X(:))])
ylim([min(Y(:)) max(Y(:))])
zlim([min(Z(:)) max(Z(:))])
% let's identificate some lines
% hand-wrist-elbow-shoulder-spinShoulder-shoulder-elbow-wrist-hand
ind1 = [6 5 4 3 19 7 8 9 10];
hold on
for i = 1:size(X,1)
% draw all points
h(1) = plot3(X(i,:),Y(i,:),Z(i,:),'.r');
% draw some lines
h(2) = plot3(X(i,ind1),Y(i,ind1),Z(i,ind1),'-b');
pause(0.1) % wait a bit
delete(h) % delete all
end
hold off
See Also
Categories
Find more on Kinect For Windows Sensor in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!