User`s guide
 Using Skeleton Viewer for Kinect Skeletal Data
12-25
SkeletonConnectionMap = [[1 2]; % Spine
 [2 3];
 [3 4];
 [3 5]; %Left Hand
 [5 6];
 [6 7];
 [7 8];
 [3 9]; %Right Hand
 [9 10];
 [10 11];
 [11 12];
 [1 17]; % Right Leg
 [17 18];
 [18 19];
 [19 20];
 [1 13]; % Left Leg
 [13 14];
 [14 15];
 [15 16]];
5
Draw the skeletons on the RGB image.
for i = 1:19
 if nSkeleton > 0
 X1 = [skeleton(SkeletonConnectionMap(i,1),1,1) skeleton(SkeletonConnectionMap(i,2),1,1)];
 Y1 = [skeleton(SkeletonConnectionMap(i,1),2,1) skeleton(SkeletonConnectionMap(i,2),2,1)];
 line(X1,Y1, 'LineWidth', 1.5, 'LineStyle', '-', 'Marker', '+', 'Color', 'r');
 end
 if nSkeleton > 1
 X2 = [skeleton(SkeletonConnectionMap(i,1),1,2) skeleton(SkeletonConnectionMap(i,2),1,2)];
 Y2 = [skeleton(SkeletonConnectionMap(i,1),2,2) skeleton(SkeletonConnectionMap(i,2),2,2)]; 
 line(X2,Y2, 'LineWidth', 1.5, 'LineStyle', '-', 'Marker', '+', 'Color', 'g');
 end
 hold on;
 end
 hold off;
The viewer will show the following for this example, which contains the color image
of one person, with the skeletal data overlaid on the image.










