MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / Detection

Class Detection

detection/include/open_ptrack/detection/detection.h:54–203  ·  view source on GitHub ↗

\brief Detection represents information about a people detection */

Source from the content-addressed store, hash-verified

52 {
53 /** \brief Detection represents information about a people detection */
54 class Detection
55 {
56
57 protected:
58 /** \brief ROS message containing detection information */
59 opt_msgs::Detection detection_msg_;
60
61 /** \brief Detection source which produced the detection */
62 open_ptrack::detection::DetectionSource* source_;
63
64 /** \brief Detection centroid in world reference frame */
65 Eigen::Vector3d world_centroid_;
66
67 /** \brief Detection bottom point in world reference frame */
68 Eigen::Vector3d world_bottom_;
69
70 /** \brief Detection top point in world reference frame */
71 Eigen::Vector3d world_top_;
72
73 /**
74 * \brief Converts a BoundingBox2D message into a cv::Rect.
75 *
76 * \param[in] bb The BoundingBox2D to convert.
77 *
78 * \return the converted cv::Rect.
79 */
80 cv::Rect
81 BoundingBox2D2cvRect(const opt_msgs::BoundingBox2D& bb);
82
83 /**
84 * \brief Converts a BoundingBox2D message into a cv::Rect.
85 *
86 * \param[in] bb The BoundingBox2D to convert.
87 * \param[in] rect The converted cv::Rect.
88 */
89 void
90 BoundingBox2D2cvRect(const opt_msgs::BoundingBox2D& bb, cv::Rect& rect);
91
92 public:
93
94 /** \brief Constructor. */
95 Detection(opt_msgs::Detection detection, open_ptrack::detection::DetectionSource* source);
96
97 /** \brief Destructor. */
98 virtual ~Detection();
99
100 /**
101 * \brief Returns a pointer to the DetectionSource which generated the detection.
102 *
103 * \return a pointer to the DetectionSource which generated the detection.
104 */
105 open_ptrack::detection::DetectionSource*
106 getSource();
107
108 /**
109 * \brief Returns the detection centroid in world reference frame.
110 *
111 * \return the detection centroid in world reference frame.

Callers 5

SkeletonDetectionMethod · 0.85
detection_cbFunction · 0.85
detection_cbFunction · 0.85
detection_cbFunction · 0.85
detection_cbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected