3D plot of kinect x,y,z data over time - question

2 views (last 30 days)
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
darova
darova on 3 Oct 2019
Can you please show your attempts? What have you tried?
Jeroen Vermeulen
Jeroen Vermeulen on 8 Oct 2019
Edited: Jeroen Vermeulen on 8 Oct 2019
I only plotted 2D until now, in my case X, Y and Z over time. I'm not very experienced on the topic of 3D plots over time, which is why I came to this forum, in hope to see what you would recommend. Hope to hear!

Sign in to comment.

Answers (1)

darova
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
  1 Comment
Jeroen Vermeulen
Jeroen Vermeulen on 9 Oct 2019
Appreciated, thank you. I'll work on this method and will report back if I encounter problems.

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!