# How to display skeleton data

13 ビュー (過去 30 日間)
NGR MNFD 2023 年 11 月 4 日
コメント済み: Image Analyst 2023 年 11 月 5 日
Hello, I hope you have a good day...What MATLAB command can be used to display skeletal data in 3D from this matrix? He explained: The first line is related to the data recording time, and the second line is the joint number, and the third, fourth, and fifth lines are related to the x-axis, y-axis, and z-axis of the joint 0. It continues in the same way. How can the moving skeleton be displayed? Wrote? The data form is as follows.time, 0, joint0_x, joint0_y, joint0_z, 1, joint1_x, joint1_y, joint1_z, 2, joint2_x, joint2_y, joint2_z, .I know and have studied the skeleton display code on different sites, but I was confused about my own code. please guide me. tanx so much.

サインインしてコメントする。

### 回答 (1 件)

Image Analyst 2023 年 11 月 4 日
Try this:
% Plot the first 4 joint skeletons.
PlotJointNumber(data, 1)
PlotJointNumber(data, 2)
PlotJointNumber(data, 3)
PlotJointNumber(data, 4)
function PlotJointNumber(data, jointNumber)
% Plot this joint.
column = 4 * jointNumber - 1;
x = data(:, column);
y = data(:, column+1);
z = data(:, column+2);
nexttile
plot3(x, y, z, 'b.-', 'LineWidth', 2)
grid on;
fontSize = 20;
xlabel('x','FontSize',fontSize);
ylabel('y','FontSize',fontSize);
zlabel('z','FontSize',fontSize);
caption = sprintf('Joint #%d', jointNumber);
title(caption,'FontSize',fontSize);
end
##### 4 件のコメント2 件の古いコメントを表示2 件の古いコメントを非表示
NGR MNFD 2023 年 11 月 5 日
Just ignore the information about the first column of the human2_normal17_SkeletonData1.csv matrix. In fact, the new matrix obtained has 66 rows and one column, where we have a 25x3 matrix in each row.
Image Analyst 2023 年 11 月 5 日
The concept is the same. You just need to read in your data. Then parse it into arrays for x, y, and z. Then use plot3 or plot to plot them.
To learn other fundamental concepts, invest 2 hours of your time here:

サインインしてコメントする。

### カテゴリ

Help Center および File ExchangeMorphological Operations についてさらに検索

R2021b

### Community Treasure Hunt

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

Start Hunting!

Translated by