DarkHelp  v1.9.2-1
C++ API for the neural network framework Darknet
Looking for a C++ dev who knows OpenCV?
I'm looking for work. Hire me!
DarkHelp::PositionTracker::Obj Struct Referencefinal

The position tracker uses Obj to keep information on objects that are being tracked. More...

#include "DarkHelpPositionTracker.hpp"

Collaboration diagram for DarkHelp::PositionTracker::Obj:

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...
 
Objclear ()
 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...
 

Detailed Description

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().

Since
May 2023

Constructor & Destructor Documentation

◆ Obj()

DarkHelp::PositionTracker::Obj::Obj ( )
inline

Constructor.

References clear().

Here is the call graph for this function:

◆ ~Obj()

DarkHelp::PositionTracker::Obj::~Obj ( )
inline

Destructor.

Member Function Documentation

◆ center()

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().

Here is the caller graph for this function:

◆ clear()

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().

Here is the caller graph for this function:

◆ empty()

bool DarkHelp::PositionTracker::Obj::empty ( ) const

Returns true if this object has no object ID or frame information.

◆ first_seen_frame_id()

size_t DarkHelp::PositionTracker::Obj::first_seen_frame_id ( ) const

Returns the frame where this object first appeared.

Referenced by DarkHelp::operator<<().

Here is the caller graph for this function:

◆ last_seen_frame_id()

size_t DarkHelp::PositionTracker::Obj::last_seen_frame_id ( ) const

Returns the most recent frame.

Referenced by DarkHelp::operator<<().

Here is the caller graph for this function:

◆ rect()

cv::Rect DarkHelp::PositionTracker::Obj::rect ( ) const

Returns the rectangle from the most recent frame.

◆ size()

cv::Size DarkHelp::PositionTracker::Obj::size ( ) const

The size of the object. This uses the most recent frame.

Referenced by DarkHelp::operator<<().

Here is the caller graph for this function:

Member Data Documentation

◆ classes

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().

◆ fids_and_rects

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().

◆ oid

size_t DarkHelp::PositionTracker::Obj::oid

A unique object ID assigned to this object.

Referenced by clear(), DarkHelp::operator<<(), and DarkHelp::PositionTracker::process().


The documentation for this struct was generated from the following files: