assistive-rehab
|
Basic class for single keypoint of a skeleton. More...
#include <skeleton.h>
Public Member Functions | |
KeyPoint () | |
Default constructor. | |
KeyPoint (const std::string &tag_, const yarp::sig::Vector &point_=yarp::sig::Vector(3, std::numeric_limits< double >::quiet_NaN()), const yarp::sig::Vector &pixel_=yarp::sig::Vector(2, std::numeric_limits< double >::quiet_NaN()), const bool updated_=false) | |
Overloaded constructor. More... | |
KeyPoint (const KeyPoint &)=delete | |
Deleted copy constructor. | |
KeyPoint & | operator= (const KeyPoint &)=delete |
Deleted copy operator. | |
virtual | ~KeyPoint () |
Virtual destructor. | |
bool | isUpdated () const |
Return true if the keypoint has been updated. More... | |
const std::string & | getTag () const |
Return a reference to the tag of the keypoint. More... | |
const yarp::sig::Vector & | getPoint () const |
Return a reference to the vector containing the keypoint's x,y,z camera coordinates. More... | |
bool | setPoint (const yarp::sig::Vector &point) |
Set keypoint's x,y,z camera coordinates to a desired value. More... | |
bool | setPoint (const yarp::sig::Vector &point, const yarp::sig::Vector &pixel) |
Set keypoint's x,y,z camera coordinates as well as u,v, image coordinates to a desired value. More... | |
const yarp::sig::Vector & | getPixel () const |
Return a reference to the vector containing the keypoint's u,v image coordinates. More... | |
unsigned int | getNumParent () const |
Retrieve the number of parents of the keypoint. More... | |
const KeyPoint * | getParent (const unsigned int i) const |
Get a pointer to the parent of the keypoint specified by index. More... | |
unsigned int | getNumChild () const |
Retrieve the number of children of the keypoint. More... | |
const KeyPoint * | getChild (const unsigned int i) const |
Get a pointer to the child of the keypoint specified by index. More... | |
Friends | |
class | Skeleton |
class | SkeletonStd |
Basic class for single keypoint of a skeleton.
Definition at line 96 of file skeleton.h.
assistive_rehab::KeyPoint::KeyPoint | ( | const std::string & | tag_, |
const yarp::sig::Vector & | point_ = yarp::sig::Vector(3, std::numeric_limits< double >::quiet_NaN()) , |
||
const yarp::sig::Vector & | pixel_ = yarp::sig::Vector(2, std::numeric_limits< double >::quiet_NaN()) , |
||
const bool | updated_ = false |
||
) |
Overloaded constructor.
tag_ | string containing the keypoint's tag. |
point_ | vector containing the keypoint camera coordinates x,y,z. |
pixel_ | vector containing the keypoint image coordinates u,v. |
updated_ | true if the keypoint has been updated. |
const KeyPoint * KeyPoint::getChild | ( | const unsigned int | i | ) | const |
Get a pointer to the child of the keypoint specified by index.
i | int containing the index of the desired keypoint. |
Definition at line 101 of file skeleton.cpp.
|
inline |
Retrieve the number of children of the keypoint.
Definition at line 205 of file skeleton.h.
|
inline |
Retrieve the number of parents of the keypoint.
Definition at line 192 of file skeleton.h.
const KeyPoint * KeyPoint::getParent | ( | const unsigned int | i | ) | const |
Get a pointer to the parent of the keypoint specified by index.
i | int containing the index of the desired keypoint. |
Definition at line 96 of file skeleton.cpp.
|
inline |
Return a reference to the vector containing the keypoint's u,v image coordinates.
Definition at line 186 of file skeleton.h.
Referenced by assistive_rehab::Skeleton::get_ordered_withpixels(), assistive_rehab::Skeleton::print(), and assistive_rehab::Skeleton::update().
|
inline |
Return a reference to the vector containing the keypoint's x,y,z camera coordinates.
Definition at line 161 of file skeleton.h.
Referenced by assistive_rehab::Skeleton::get_ordered(), assistive_rehab::Skeleton::get_ordered_withpixels(), assistive_rehab::Skeleton::normalize(), assistive_rehab::Skeleton::print(), assistive_rehab::Skeleton::scale(), and assistive_rehab::Skeleton::update().
|
inline |
Return a reference to the tag of the keypoint.
Definition at line 153 of file skeleton.h.
Referenced by assistive_rehab::Skeleton::print().
|
inline |
Return true if the keypoint has been updated.
Definition at line 147 of file skeleton.h.
Referenced by assistive_rehab::Skeleton::print(), and assistive_rehab::Skeleton::update().
bool assistive_rehab::KeyPoint::setPoint | ( | const yarp::sig::Vector & | point | ) |
Set keypoint's x,y,z camera coordinates to a desired value.
point | vector containing the desider point. |
Referenced by assistive_rehab::Skeleton::update().
bool assistive_rehab::KeyPoint::setPoint | ( | const yarp::sig::Vector & | point, |
const yarp::sig::Vector & | pixel | ||
) |
Set keypoint's x,y,z camera coordinates as well as u,v, image coordinates to a desired value.
point | vector containing the desider point. |
pixel | vector containing the desider pixel. |