To plot a skeleton in MATLAB, you can follow these steps:
plot3
function to plot the joints as points in 3D space.plot3
function again to plot the connections between joints as lines.Here is an example MATLAB code that shows how to plot a simple skeleton consisting of three joints:
main.m493 chars13 lines
This will produce a 3D plot of the skeleton where the joints are shown as red dots and the connections between joints are shown as blue lines.
Note that in this example, the skeleton is defined in local coordinates (i.e. with respect to a reference frame centered at the first joint). If you want to plot a skeleton in global coordinates (i.e. with respect to a fixed reference frame), you need to apply a transformation to the joint positions before plotting.
gistlibby LogSnag