Public Member Functions | Protected Attributes

skeleton_state< observation_type > Class Template Reference

#include <skeleton_state.h>

Inheritance diagram for skeleton_state< observation_type >:
state< observation_type > angle_bgsub_state< observation_type > angle_state< observation_type > bgsub_state< observation_type > hull_state< observation_type > projection_state< observation_type > stick2d_state< observation_type > stick_state< observation_type > brownian_state< observation_type > brownian_stick_state< observation_type > KBK_stick_state< observation_type > pik_state< observation_type > pik_stick_state< observation_type > tangent_state< observation_type >

List of all members.

Public Member Functions

 skeleton_state (const options &opts, const calibration &_calib, const bool _for_show=true)
void prepare_mesh ()
bool bone_to_ellipsoid (const_bone_iter &bone, ellipsoid &E) const
void show (const double gray_level=0.25) const
void make_every_bone_an_end_effector ()
size_t count_num_end_effectors () const
void save (const std::string filename) const
void save (std::ofstream &file) const
bool load (const std::string filename)
bool load (std::ifstream &file)
void compute_pose ()
skeleton_stateoperator= (skeleton_state &new_state)
solver_type::vector_typeget_theta ()
const solver_type::vector_typeget_theta () const
double get_theta (const int idx) const
void set_theta (const solver_type::vector_type &new_theta)
void set_theta (const int idx, const double val)
int theta_size () const
skeleton_typeget_skeleton ()
const skeleton_typeget_skeleton () const
double get_min_limit (unsigned int idx) const
double get_max_limit (unsigned int idx) const
void project_limits ()
const vector3get_root () const
void set_root (vector3 &new_root)
bone_iter bone_begin ()
bone_iter bone_end ()
const_bone_iter bone_begin () const
const_bone_iter bone_end () const
solver_typeget_solver ()
const mesh_typeget_mesh () const

Protected Attributes

const calibration calib
solver_type::vector_type theta
solver_type::vector_type min_limits
solver_type::vector_type max_limits
skeleton_type skeleton
vector3 root
solver_type solver
const vector3 cam
const size_t line_offset
mesh_type isosurface
grid_type grid
const bool for_show
std::string limits_file

Detailed Description

template<class observation_type>
class skeleton_state< observation_type >

The most basic class for representing the state of the tracker, i.e. to represent the skeleton. Other states inherit from this one.


Constructor & Destructor Documentation

template<class observation_type>
skeleton_state< observation_type >::skeleton_state ( const options opts,
const calibration _calib,
const bool  _for_show = true 
) [inline]
Parameters:
[in] opts Options for controlling the run-time behaviour.
[in] calib Calibration of the different world coordinate systems.
[in] _for_show Should the state be used for visualisation or not? States that are visualised have further computational demands.

Member Function Documentation

template<class observation_type>
bone_iter skeleton_state< observation_type >::bone_begin (  )  [inline]
Returns:
An iterator for the first bone in the skeleton.
template<class observation_type>
const_bone_iter skeleton_state< observation_type >::bone_begin (  )  const [inline]
Returns:
A const iterator for the first bone in the skeleton.
template<class observation_type>
bone_iter skeleton_state< observation_type >::bone_end (  )  [inline]
Returns:
An iterator for the last bone in the skeleton.
template<class observation_type>
const_bone_iter skeleton_state< observation_type >::bone_end (  )  const [inline]
Returns:
A const iterator for the last bone in the skeleton.
template<class observation_type>
bool skeleton_state< observation_type >::bone_to_ellipsoid ( const_bone_iter bone,
ellipsoid E 
) const [inline]

Wrap an ellipsoid arround a given bone. This is used for skinning.

Parameters:
[in] bone The bone to be used.
[out] ellipsoid. The resulting ellipsoid.
Returns:
TRUE on succes; FALSE otherwise.
template<class observation_type>
void skeleton_state< observation_type >::compute_pose (  )  [inline]

Perform forward kinematics.

template<class observation_type>
size_t skeleton_state< observation_type >::count_num_end_effectors (  )  const [inline]
Returns:
Number of bones marked as end-effectors.
template<class observation_type>
double skeleton_state< observation_type >::get_max_limit ( unsigned int  idx  )  const [inline]

Get a specific upper joint limit.

Parameters:
[in] idx The index of the specific joint angle.
Returns:
The specific upper joint limit.
template<class observation_type>
const mesh_type& skeleton_state< observation_type >::get_mesh (  )  const [inline]
Returns:
A reference to the mesh used for representing the skin.
template<class observation_type>
double skeleton_state< observation_type >::get_min_limit ( unsigned int  idx  )  const [inline]

Get a specific lower joint limit.

Parameters:
[in] idx The index of the specific joint angle.
Returns:
The specific lower joint limit.
template<class observation_type>
const vector3& skeleton_state< observation_type >::get_root (  )  const [inline]
Returns:
The 3D coordinate of the root of the skeleton.
template<class observation_type>
skeleton_type& skeleton_state< observation_type >::get_skeleton (  )  [inline]
Returns:
A reference to the skeleton.
template<class observation_type>
const skeleton_type& skeleton_state< observation_type >::get_skeleton (  )  const [inline]
Returns:
A reference to the skeleton.
template<class observation_type>
solver_type& skeleton_state< observation_type >::get_solver (  )  [inline]
Returns:
A reference to the IK solver.
template<class observation_type>
const solver_type::vector_type& skeleton_state< observation_type >::get_theta (  )  const [inline]

Get current joint angles.

Returns:
A reference to a vector of joint angles.
template<class observation_type>
solver_type::vector_type& skeleton_state< observation_type >::get_theta (  )  [inline]

Get current joint angles.

Returns:
A vector of joint angles.
template<class observation_type>
double skeleton_state< observation_type >::get_theta ( const int  idx  )  const [inline]

Get a specific joint angle.

Parameters:
[in] idx The index of the specific joint angle.
Returns:
The angle value.
template<class observation_type>
void skeleton_state< observation_type >::make_every_bone_an_end_effector (  )  [inline]

Mark all bones as end-effectors for the IK solver. This is used by the manifold-valued approaches to tracking.

template<class observation_type>
skeleton_state& skeleton_state< observation_type >::operator= ( skeleton_state< observation_type > &  new_state  )  [inline]

Copy a skeleton to another.

template<class observation_type>
void skeleton_state< observation_type >::prepare_mesh (  )  [inline]

Initialise mesh for representing the skin.

template<class observation_type>
void skeleton_state< observation_type >::project_limits (  )  [inline]

Enforce joint constraints.

template<class observation_type>
void skeleton_state< observation_type >::save ( const std::string  filename  )  const [inline, virtual]

Write the pose parameters to a file.

Parameters:
[in] filename The name of the output file.

Implements state< observation_type >.

template<class observation_type>
void skeleton_state< observation_type >::save ( std::ofstream &  file  )  const [inline, virtual]

Write the pose parameters to a stream. This is useful for batch saves.

Parameters:
[in] file A stream representing the open file.

Implements state< observation_type >.

template<class observation_type>
void skeleton_state< observation_type >::set_root ( vector3 new_root  )  [inline]

Set new root position.

Parameters:
[in] new_root The new position of the skeleton root.
template<class observation_type>
void skeleton_state< observation_type >::set_theta ( const solver_type::vector_type new_theta  )  [inline]

Set current joint angles. This function does not recompute joint positions.

Parameters:
[in] new_theta A vector of new joint angles.
template<class observation_type>
void skeleton_state< observation_type >::set_theta ( const int  idx,
const double  val 
) [inline]

Set a specific joint angle to a given value.

Parameters:
[in] idx The index of the specific joint angle.
[in] val The new value of the joint angle.
template<class observation_type>
void skeleton_state< observation_type >::show ( const double  gray_level = 0.25  )  const [inline, virtual]

Draw the skeleton in 3D.

Parameters:
[in] gray_level The gray scale color of the skeleton (should be between 0 and 1).

Implements state< observation_type >.

template<class observation_type>
int skeleton_state< observation_type >::theta_size (  )  const [inline]
Returns:
The number of joint angles in the skeleton.

Member Data Documentation

template<class observation_type>
const calibration skeleton_state< observation_type >::calib [protected]
template<class observation_type>
const vector3 skeleton_state< observation_type >::cam [protected]
template<class observation_type>
const bool skeleton_state< observation_type >::for_show [protected]
template<class observation_type>
grid_type skeleton_state< observation_type >::grid [protected]
template<class observation_type>
mesh_type skeleton_state< observation_type >::isosurface [protected]
template<class observation_type>
std::string skeleton_state< observation_type >::limits_file [protected]
template<class observation_type>
const size_t skeleton_state< observation_type >::line_offset [protected]
template<class observation_type>
solver_type::vector_type skeleton_state< observation_type >::max_limits [protected]
template<class observation_type>
solver_type::vector_type skeleton_state< observation_type >::min_limits [protected]
template<class observation_type>
vector3 skeleton_state< observation_type >::root [protected]
template<class observation_type>
skeleton_type skeleton_state< observation_type >::skeleton [protected]
template<class observation_type>
solver_type skeleton_state< observation_type >::solver [protected]
template<class observation_type>
solver_type::vector_type skeleton_state< observation_type >::theta [protected]

The documentation for this class was generated from the following file: