![]() |
![]() |
![]() |
Skeltrack - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define SKELTRACK_JOINT_MAX_JOINTS typedef SkeltrackJointList; enum SkeltrackJointId; struct SkeltrackJoint; gpointer skeltrack_joint_copy (SkeltrackJoint *joint
); void skeltrack_joint_free (SkeltrackJoint *joint
); void skeltrack_joint_list_free (SkeltrackJointList list
); SkeltrackJointList skeltrack_joint_list_new (void
); SkeltrackJoint * skeltrack_joint_list_get_joint (SkeltrackJointList list
,SkeltrackJointId id
);
A SkeltrackJoint is built automatically by SkeltrackSkeleton when it finds a skeleton joint and can be used to get information about it. Each SkeltrackJoint holds an id, given by SkeltrackJointId that indicates which of the human skeleton joints it represents.
Spacial information about a joint is given by the x
, y
and z
coordinates.
To represent the joint in a 2D, the variables screen_x
and
screen_y
will indicate the joint's position in the screen and are calculated
taking into account the "dimension-reduction" (it will
be multiplied by this value).
The tracked list of joints is represented by SkeltrackJointList and given
by skeltrack_skeleton_track_joints_finish()
.
To get a SkeltrackJoint from a SkeltrackJointList object, use the
skeltrack_joint_list_get_joint()
indicating the needed SkeltrackJointId.
A SkeltrackJointList can be freed by using skeltrack_joint_list_free()
.
A SkeltrackJoint can be copied by skeltrack_joint_copy()
and freed by
skeltrack_joint_free()
.
typedef enum { SKELTRACK_JOINT_ID_HEAD, SKELTRACK_JOINT_ID_LEFT_SHOULDER, SKELTRACK_JOINT_ID_RIGHT_SHOULDER, SKELTRACK_JOINT_ID_LEFT_ELBOW, SKELTRACK_JOINT_ID_RIGHT_ELBOW, SKELTRACK_JOINT_ID_LEFT_HAND, SKELTRACK_JOINT_ID_RIGHT_HAND } SkeltrackJointId;
Available joint ids.
The head | |
The left shoulder | |
The right shoulder | |
The left elbow | |
The right elbow | |
The left hand | |
The right hand |
struct SkeltrackJoint { SkeltrackJointId id; gint x; gint y; gint z; gint screen_x; gint screen_y; };
SkeltrackJointId |
The id of the joint |
The x coordinate of the joint in the space (in mm) | |
The y coordinate of the joint in the space (in mm) | |
The z coordinate of the joint in the space (in mm) | |
The x coordinate of the joint in the screen (in pixels) | |
The y coordinate of the joint in the screen (in pixels) |
gpointer skeltrack_joint_copy (SkeltrackJoint *joint
);
Makes an exact copy of a SkeltrackJoint object.
|
The SkeltrackJoint to copy |
Returns : |
A newly created SkeltrackJoint. Use
skeltrack_joint_free() to free it. [transfer full]
|
void skeltrack_joint_free (SkeltrackJoint *joint
);
Frees a SkeltrackJoint object.
|
The SkeltrackJoint to free |
void skeltrack_joint_list_free (SkeltrackJointList list
);
Frees a SkeltrackJointList object and each SkeltrackJoint in it.
|
The SkeltrackJointList to free |
SkeltrackJointList skeltrack_joint_list_new (void
);
Created a new list of SkeltrackJointsList with its joints as NULL.
When it is no longer needed, free it with skeltrack_joint_list_free()
.
Returns : |
A newly allocated SkeltrackJointList. [transfer full] |
SkeltrackJoint * skeltrack_joint_list_get_joint (SkeltrackJointList list
,SkeltrackJointId id
);
Gets a joint from a list of skeleton joints. The joint
returned needs to be freed by using skeltrack_joint_free()
or,
alternatively, the whole list and its joints can be freed by using
skeltrack_joint_list_free()
.
|
The SkeltrackJointList |
|
The SkeltrackJointId of the joint to get |
Returns : |
The SkeltrackJoint that corresponds to
the given id or NULL if that joint wasn't found. [transfer full]
|