The position tracker uses Obj
to keep information on objects that are being tracked.
More...
#include "DarkHelpPositionTracker.hpp"
Public Member Functions | |
Obj () | |
Constructor. More... | |
~Obj () | |
Destructor. More... | |
cv::Point | center () const |
The central point of the object. This uses the most recent frame. 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::Size | size () const |
The size of the object. This uses the most recent frame. More... | |
Public Attributes | |
std::set< size_t > | classes |
Every class detected with a threshold > 0.2. This is used to find a match in new frames. More... | |
std::map< size_t, cv::Rect > | fids_and_rects |
Store an entry for every frame where this object was detected. More... | |
size_t | oid |
A unique object ID assigned to this object. 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 |
|
inline |
Destructor.
cv::Point DarkHelp::PositionTracker::Obj::center | ( | ) | const |
The central point of the object. This uses the most recent frame.
Referenced by DarkHelp::operator<<(), and DarkHelp::PositionTracker::process().
DarkHelp::PositionTracker::Obj & DarkHelp::PositionTracker::Obj::clear | ( | ) |
Reset this object. Sets the oid to zero and removes any frames, rectangles, and classes.
References classes, fids_and_rects, and oid.
Referenced by Obj().
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.
Referenced by DarkHelp::operator<<().
size_t DarkHelp::PositionTracker::Obj::last_seen_frame_id | ( | ) | const |
Returns the most recent frame.
Referenced by DarkHelp::operator<<().
cv::Rect DarkHelp::PositionTracker::Obj::rect | ( | ) | const |
Returns the rectangle from the most recent frame.
cv::Size DarkHelp::PositionTracker::Obj::size | ( | ) | const |
The size of the object. This uses the most recent frame.
Referenced by DarkHelp::operator<<().
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.
Referenced by clear(), and DarkHelp::PositionTracker::process().
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.
Referenced by clear(), DarkHelp::operator<<(), and DarkHelp::PositionTracker::process().
size_t DarkHelp::PositionTracker::Obj::oid |
A unique object ID assigned to this object.
Referenced by clear(), DarkHelp::operator<<(), and DarkHelp::PositionTracker::process().