The position tracker uses Obj
to keep information on objects that are being tracked.
More...
Public Member Functions | |
Obj () | |
Constructor. More... | |
~Obj () | |
Destructor. More... | |
Obj & | clear () |
Reset this object. Sets the oid to zero and removes any frames, rectangles, and classes. More... | |
bool | empty () const |
Returns true if this object has no object ID or frame information. More... | |
size_t | first_seen_frame_id () const |
Returns the frame where this object first appeared. More... | |
size_t | last_seen_frame_id () const |
Returns the most recent frame. More... | |
cv::Rect | rect () const |
Returns the rectangle from the most recent frame. More... | |
cv::Point | center () const |
The central point of the object. This uses the most recent frame. More... | |
cv::Size | size () const |
The size of the object. This uses the most recent frame. More... | |
Public Attributes | |
size_t | oid |
A unique object ID assigned to this object. More... | |
std::map< size_t, cv::Rect > | fids_and_rects |
Store an entry for every frame where this object was detected. More... | |
std::set< size_t > | classes |
Every class detected with a threshold > 0.2. This is used to find a match in new frames. More... | |
The position tracker uses Obj
to keep information on objects that are being tracked.
This includes the frame IDs and the bounding box rectangles for the object on each of those frames. If needed (for example to draw a tail showing where the object has been) these object structures can be obtained via PositionTracker::get().
|
inline |
Constructor.
|
inline |
Destructor.
DarkHelp::PositionTracker::Obj & DarkHelp::PositionTracker::Obj::clear | ( | ) |
Reset this object. Sets the oid to zero and removes any frames, rectangles, and classes.
bool DarkHelp::PositionTracker::Obj::empty | ( | ) | const |
Returns true
if this object has no object ID or frame information.
size_t DarkHelp::PositionTracker::Obj::first_seen_frame_id | ( | ) | const |
Returns the frame where this object first appeared.
size_t DarkHelp::PositionTracker::Obj::last_seen_frame_id | ( | ) | const |
Returns the most recent frame.
cv::Rect DarkHelp::PositionTracker::Obj::rect | ( | ) | const |
Returns the rectangle from the most recent frame.
cv::Point DarkHelp::PositionTracker::Obj::center | ( | ) | const |
The central point of the object. This uses the most recent frame.
cv::Size DarkHelp::PositionTracker::Obj::size | ( | ) | const |
The size of the object. This uses the most recent frame.
size_t DarkHelp::PositionTracker::Obj::oid |
A unique object ID assigned to this object.
std::map<size_t, cv::Rect> DarkHelp::PositionTracker::Obj::fids_and_rects |
Store an entry for every frame where this object was detected.
The key is the frame ID, and the value is the rectangle on that frame.
std::set<size_t> DarkHelp::PositionTracker::Obj::classes |
Every class detected with a threshold > 0.2. This is used to find a match in new frames.