JeVois
1.22
JeVois Smart Embedded Machine Vision Toolkit
|
|
#include <jevois/Types/PoseSkeleton.H>
A simple skeleton class for pose detection deep neural networks.
This class simply represents a set of nodes and links with associated confidences and colors. In this class, you should only store nodes and links that have actually been detected.
Definition at line 45 of file PoseSkeleton.H.
Classes | |
struct | Link |
A pose skeleton link between two nodes. More... | |
struct | Node |
A pose skeleton node. More... | |
Public Member Functions | |
PoseSkeleton (std::shared_ptr< PoseSkeletonDefinition > def) | |
Constructor from a previously loaded definition. | |
unsigned int | numSkeletonNodes () const |
Get the total number of nodes in the skeleton. Node ID is from 0 to that total - 1. | |
unsigned int | numSkeletonLinks () const |
Get the total number of links in the skeleton. Link ID is from 0 to that total - 1. | |
char const * | nodeName (unsigned int id) const |
Get the name of a node from its ID. | |
unsigned int | nodeColor (unsigned int id) const |
Get draw color of a node from its ID, as 0xAABBGGRR (note: returned unsigned int is the same as ImU32) | |
unsigned int | linkColor (unsigned int id) const |
Get draw color of a node from its ID, as 0xAABBGGRR (note: returned unsigned int is the same as ImU32) | |
std::vector< std::pair< unsigned int, unsigned int > > const & | linkDefinitions () const |
Get a const ref to our link definitions, useful to iterate over. Each link is <node_id_1, node_id_2> | |
Public Attributes | |
std::vector< Node > | nodes |
The nodes we found in this detection. | |
std::vector< Link > | links |
The links we found in this detection. | |
jevois::PoseSkeleton::PoseSkeleton | ( | std::shared_ptr< PoseSkeletonDefinition > | def | ) |
Constructor from a previously loaded definition.
Definition at line 123 of file PoseSkeleton.C.
References LFATAL, and PoseSkeleton().
Referenced by PoseSkeleton().
unsigned int jevois::PoseSkeleton::linkColor | ( | unsigned int | id | ) | const |
Get draw color of a node from its ID, as 0xAABBGGRR (note: returned unsigned int is the same as ImU32)
Definition at line 154 of file PoseSkeleton.C.
References LFATAL.
std::vector< std::pair< unsigned int, unsigned int > > const & jevois::PoseSkeleton::linkDefinitions | ( | ) | const |
Get a const ref to our link definitions, useful to iterate over. Each link is <node_id_1, node_id_2>
Definition at line 161 of file PoseSkeleton.C.
Referenced by jevois::dnn::PostProcessorPose::process().
unsigned int jevois::PoseSkeleton::nodeColor | ( | unsigned int | id | ) | const |
Get draw color of a node from its ID, as 0xAABBGGRR (note: returned unsigned int is the same as ImU32)
Definition at line 147 of file PoseSkeleton.C.
References LFATAL.
char const * jevois::PoseSkeleton::nodeName | ( | unsigned int | id | ) | const |
Get the name of a node from its ID.
Definition at line 140 of file PoseSkeleton.C.
References LFATAL.
unsigned int jevois::PoseSkeleton::numSkeletonLinks | ( | ) | const |
Get the total number of links in the skeleton. Link ID is from 0 to that total - 1.
This is not the number of detected links for a particular detection, which is simply links.size()
Definition at line 136 of file PoseSkeleton.C.
unsigned int jevois::PoseSkeleton::numSkeletonNodes | ( | ) | const |
Get the total number of nodes in the skeleton. Node ID is from 0 to that total - 1.
This is not the number of detected nodes for a particular detection, which is simply nodes.size()
Definition at line 132 of file PoseSkeleton.C.
std::vector<Link> jevois::PoseSkeleton::links |
The links we found in this detection.
Definition at line 68 of file PoseSkeleton.H.
Referenced by jevois::dnn::PostProcessorPose::process().
std::vector<Node> jevois::PoseSkeleton::nodes |
The nodes we found in this detection.
Definition at line 67 of file PoseSkeleton.H.
Referenced by jevois::dnn::PostProcessorPose::process().