Go to the documentation of this file.
27 #include <boost/multi_index/mem_fun.hpp>
28 #include <boost/multi_index/ordered_index.hpp>
29 #include <boost/multi_index_container.hpp>
33 #include <VisionX/interface/components/OpenPoseEstimationInterface.h>
38 checkInput(std::initializer_list<float> f)
43 <<
"Within KeypointManager it is asserted that every value is greater than or "
44 "equal to zero. That is not true for "
70 return std::isnan(
_x) || std::isnan(
_y);
82 const std::string& name,
83 float confidence = 0.0f);
86 const std::string& name,
87 float confidence = 0.0f);
91 const std::string& name,
92 float confidence = 0.0f);
112 unsigned int getId()
const;
123 DrawColor24Bit _dominantColor;
130 using boost::multi_index_container;
131 using namespace boost::multi_index;
134 indexed_by<ordered_unique<const_mem_fun<Keypoint, unsigned int, &Keypoint::getId>>,
135 ordered_non_unique<const_mem_fun<Keypoint, std::string, &Keypoint::getName>>>>;
140 using IdNameMap =
const std::map<unsigned int, std::string>&;
158 typename KeypointSetById::const_iterator begin()
const;
159 typename KeypointSetById::const_iterator end()
const;
161 KeypointPtr getNode(
const std::string& nodeName)
const;
164 void removeNode(
const std::string& nodeName);
165 void removeNode(
unsigned int id);
167 float getAverageDepth()
const;
169 Keypoint2DMap toIce2D(
IdNameMap idNameMap)
const;
176 std::string toString2D()
const;
183 class KeypointManager;
206 std::vector<KeypointObjectPtr>&
218 Keypoint2DMapList toIce2D()
const;
219 Keypoint2DMapList toIce2D_normalized(
int width,
int height)
const;
224 void filterToNearestN(
unsigned int n);
227 std::vector<KeypointObjectPtr> _objects;
void setConfidence(float confidence)
Point2D(float x, float y)
std::shared_ptr< KeypointManager > KeypointManagerPtr
std::shared_ptr< KeypointObject > KeypointObjectPtr
typename KeypointSet::nth_index< 0 >::type KeypointSetById
std::pair< Point2D, Point2D > getStereo2D() const
FramedPositionPtr get3D() const
multi_index_container< KeypointPtr, indexed_by< ordered_unique< const_mem_fun< Keypoint, unsigned int, &Keypoint::getId > >, ordered_non_unique< const_mem_fun< Keypoint, std::string, &Keypoint::getName > >> > KeypointSet
IdNameMap getIdNameMap() const
typename KeypointSet::nth_index< 1 >::type KeypointSetByName
std::shared_ptr< Keypoint > KeypointPtr
void setDominantColor(const DrawColor24Bit &color)
void set3D(FramedPositionPtr pose)
float getConfidence() const
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
void set2D(const Point2D &point)
const std::map< unsigned int, std::string > & IdNameMap
unsigned int getId() const
std::string getName() const
DrawColor24Bit getDominantColor() const
void setStereo2D(const Point2D &left, const Point2D &right)
std::string toString2D() const
std::vector< KeypointObjectPtr > & getData()
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class Robot > RobotPtr