OpenCV  4.7.0
Open Source Computer Vision
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cv::DetectionBasedTracker Class Reference

#include <opencv2/objdetect/detection_based_tracker.hpp>

Classes

struct  ExtObject
 
class  IDetector
 
struct  InnerParameters
 
struct  Parameters
 
struct  TrackedObject
 

Public Types

typedef std::pair< cv::Rect, int > Object
 
enum  ObjectStatus {
  DETECTED_NOT_SHOWN_YET,
  DETECTED,
  DETECTED_TEMPORARY_LOST,
  WRONG_OBJECT
}
 

Public Member Functions

 DetectionBasedTracker (cv::Ptr< IDetector > mainDetector, cv::Ptr< IDetector > trackingDetector, const Parameters &params)
 
virtual ~DetectionBasedTracker ()
 
virtual int addObject (const cv::Rect &location)
 
virtual void getObjects (std::vector< cv::Rect > &result) const
 
virtual void getObjects (std::vector< Object > &result) const
 
virtual void getObjects (std::vector< ExtObject > &result) const
 
const ParametersgetParameters () const
 
virtual void process (const cv::Mat &imageGray)
 
virtual void resetTracking ()
 
virtual bool run ()
 
bool setParameters (const Parameters &params)
 
virtual void stop ()
 

Protected Member Functions

cv::Rect calcTrackedObjectPositionToShow (int i) const
 
cv::Rect calcTrackedObjectPositionToShow (int i, ObjectStatus &status) const
 
void detectInRegion (const cv::Mat &img, const cv::Rect &r, std::vector< cv::Rect > &detectedObjectsInRegions)
 
void updateTrackedObjects (const std::vector< cv::Rect > &detectedObjects)
 

Protected Attributes

cv::Ptr< IDetectorcascadeForTracking
 
InnerParameters innerParameters
 
int numTrackedSteps
 
Parameters parameters
 
cv::Ptr< SeparateDetectionWork > separateDetectionWork
 
std::vector< TrackedObjecttrackedObjects
 
std::vector< float > weightsPositionsSmoothing
 
std::vector< float > weightsSizesSmoothing
 

Friends

void * workcycleObjectDetectorFunction (void *p)
 

Member Typedef Documentation

◆ Object

Member Enumeration Documentation

◆ ObjectStatus

Enumerator
DETECTED_NOT_SHOWN_YET 
DETECTED 
DETECTED_TEMPORARY_LOST 
WRONG_OBJECT 

Constructor & Destructor Documentation

◆ DetectionBasedTracker()

cv::DetectionBasedTracker::DetectionBasedTracker ( cv::Ptr< IDetector mainDetector,
cv::Ptr< IDetector trackingDetector,
const Parameters params 
)

◆ ~DetectionBasedTracker()

virtual cv::DetectionBasedTracker::~DetectionBasedTracker ( )
virtual

Member Function Documentation

◆ addObject()

virtual int cv::DetectionBasedTracker::addObject ( const cv::Rect location)
virtual

◆ calcTrackedObjectPositionToShow() [1/2]

cv::Rect cv::DetectionBasedTracker::calcTrackedObjectPositionToShow ( int  i) const
protected

◆ calcTrackedObjectPositionToShow() [2/2]

cv::Rect cv::DetectionBasedTracker::calcTrackedObjectPositionToShow ( int  i,
ObjectStatus status 
) const
protected

◆ detectInRegion()

void cv::DetectionBasedTracker::detectInRegion ( const cv::Mat img,
const cv::Rect r,
std::vector< cv::Rect > &  detectedObjectsInRegions 
)
protected

◆ getObjects() [1/3]

virtual void cv::DetectionBasedTracker::getObjects ( std::vector< cv::Rect > &  result) const
virtual

◆ getObjects() [2/3]

virtual void cv::DetectionBasedTracker::getObjects ( std::vector< Object > &  result) const
virtual

◆ getObjects() [3/3]

virtual void cv::DetectionBasedTracker::getObjects ( std::vector< ExtObject > &  result) const
virtual

◆ getParameters()

const Parameters& cv::DetectionBasedTracker::getParameters ( ) const

◆ process()

virtual void cv::DetectionBasedTracker::process ( const cv::Mat imageGray)
virtual

◆ resetTracking()

virtual void cv::DetectionBasedTracker::resetTracking ( )
virtual

◆ run()

virtual bool cv::DetectionBasedTracker::run ( )
virtual

◆ setParameters()

bool cv::DetectionBasedTracker::setParameters ( const Parameters params)

◆ stop()

virtual void cv::DetectionBasedTracker::stop ( )
virtual

◆ updateTrackedObjects()

void cv::DetectionBasedTracker::updateTrackedObjects ( const std::vector< cv::Rect > &  detectedObjects)
protected

Friends And Related Function Documentation

◆ workcycleObjectDetectorFunction

void* workcycleObjectDetectorFunction ( void *  p)
friend

Member Data Documentation

◆ cascadeForTracking

cv::Ptr<IDetector> cv::DetectionBasedTracker::cascadeForTracking
protected

◆ innerParameters

InnerParameters cv::DetectionBasedTracker::innerParameters
protected

◆ numTrackedSteps

int cv::DetectionBasedTracker::numTrackedSteps
protected

◆ parameters

Parameters cv::DetectionBasedTracker::parameters
protected

◆ separateDetectionWork

cv::Ptr<SeparateDetectionWork> cv::DetectionBasedTracker::separateDetectionWork
protected

◆ trackedObjects

std::vector<TrackedObject> cv::DetectionBasedTracker::trackedObjects
protected

◆ weightsPositionsSmoothing

std::vector<float> cv::DetectionBasedTracker::weightsPositionsSmoothing
protected

◆ weightsSizesSmoothing

std::vector<float> cv::DetectionBasedTracker::weightsSizesSmoothing
protected

The documentation for this class was generated from the following file: