22 #ifndef PSI_HUMAN_BODY_PARTS_H
23 #define PSI_HUMAN_BODY_PARTS_H
41 enum Body_part_entity {
BODY,
HEAD,
CHEST,
LEFT_ELBOW,
LEFT_HAND,
LEFT_KNEE,
LEFT_FOOT,
RIGHT_ELBOW,
RIGHT_HAND,
RIGHT_KNEE,
RIGHT_FOOT};
60 const std::string& label_
91 Vector pos_3d = back_project(body_bottom[0], body_bottom[1]);
94 Vector part_pos_3d(pos_3d);
95 part_pos_3d[1] = part_height_3d;
113 typedef std::vector<Psi_body_part> Base;
126 (*this)[body_part] = part;
132 return (*
this)[body_part];
145 std::streamsize w = ost.width();
146 std::streamsize p = ost.precision();
147 std::ios::fmtflags f = ost.flags();
148 ost << std::scientific;
155 ost << part.
label <<
" "<< part.
lost <<
" "
156 << part.
occluded <<
" " << tl <<
" " << br;
177 std::ostream&
operator<<(std::ostream& out,
const Psi_skeleton& skeleton);
void set_body_part(Body_part_entity body_part, const Psi_body_part &part)
Definition: psi_skeleton.h:124
Definition: psi_skeleton.h:41
double get_width() const
returns the width of this bounding box
Definition: gr_2D_bounding_box.h:86
int occluded
Definition: psi_skeleton.h:102
Skeleton class, a vector of body parts.
Definition: psi_skeleton.h:110
Definition: psi_skeleton.h:41
std::ostream & operator<<(std::ostream &ost, const Action &action)
serialize an action
Definition: psi_action.cpp:333
Class that represents an axis-aligned 2D rectangle. It is defined in terms of its (2D) center...
Definition: gr_2D_bounding_box.h:51
Definition: psi_skeleton.h:41
bool empty() const
Returns true iff size is zero. Required to comply with stl Container concept.
Definition: m_vector.h:526
Bbox box
Definition: psi_skeleton.h:100
Definition: psi_skeleton.h:41
Definition: psi_skeleton.h:41
Definition: psi_skeleton.h:41
double get_height() const
returns the height of this bounding box
Definition: gr_2D_bounding_box.h:92
Definition: camera_backproject.h:113
friend std::ostream & operator<<(std::ostream &ost, const Psi_skeleton &skeleton)
read in Psi_body_part from stream
Definition: psi_skeleton.cpp:59
const Psi_body_part & get_body_part(const std::string &label) const
Definition: psi_skeleton.h:129
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
Definition: psi_skeleton.h:41
Definition: psi_skeleton.h:41
Body parts.
Definition: psi_skeleton.h:46
~Psi_skeleton()
Definition: psi_skeleton.h:122
Definition: perspective_camera.h:93
std::string label
Definition: psi_skeleton.h:103
Psi_skeleton()
Definition: psi_skeleton.h:118
const Vector & get_center() const
returns the center of this Axis_aligned_rectangle_2d
Definition: gr_2D_bounding_box.h:80
Definition: psi_skeleton.h:41
Vector get_3d_location(const Perspective_camera &camera, const Bbox &body_box, size_t image_width, size_t image_height) const
Get the face position in 3D based on the body 2D bounding box Note: Since the face_box and body_box a...
Definition: psi_skeleton.h:74
int lost
Definition: psi_skeleton.h:101
Body_part_entity get_body_part_entity(const std::string &label) const
Definition: psi_skeleton.cpp:48
Body_part_entity
Definition: psi_skeleton.h:41
void standardize(Vector &v, double cam_width, double cam_height)
Changes Vector to standard (camera) coordinate system.
Definition: pt_util.h:47
Psi_body_part()
Definition: psi_skeleton.h:48
Support for error handling exception classes in libKJB.
double get_3d_height(const Vector &bottom_2d, const Vector &top_2d, const Perspective_camera &camera)
Back project the 2d points to find the height in 3D. Assume that the bottom is on the ground...
Definition: camera_backproject.h:177
Definition: psi_skeleton.h:41
Vector get_bottom_center() const
Definition: gr_2D_bounding_box.h:105
std::vector< Psi_skeleton > parse_skeleton(std::istream &ist)
read skeleton from stream
Definition: psi_skeleton.cpp:93
Definition: psi_skeleton.h:41