OpenCV  4.1.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

Member Enumeration Documentation

Enumerator
DETECTED_NOT_SHOWN_YET 
DETECTED 
DETECTED_TEMPORARY_LOST 
WRONG_OBJECT 

Constructor & Destructor Documentation

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

Member Function Documentation

virtual int cv::DetectionBasedTracker::addObject ( const cv::Rect location)
virtual
cv::Rect cv::DetectionBasedTracker::calcTrackedObjectPositionToShow ( int  i) const
protected
cv::Rect cv::DetectionBasedTracker::calcTrackedObjectPositionToShow ( int  i,
ObjectStatus status 
) const
protected
void cv::DetectionBasedTracker::detectInRegion ( const cv::Mat img,
const cv::Rect r,
std::vector< cv::Rect > &  detectedObjectsInRegions 
)
protected
virtual void cv::DetectionBasedTracker::getObjects ( std::vector< cv::Rect > &  result) const
virtual
virtual void cv::DetectionBasedTracker::getObjects ( std::vector< Object > &  result) const
virtual
virtual void cv::DetectionBasedTracker::getObjects ( std::vector< ExtObject > &  result) const
virtual
const Parameters& cv::DetectionBasedTracker::getParameters ( ) const
virtual void cv::DetectionBasedTracker::process ( const cv::Mat imageGray)
virtual
virtual void cv::DetectionBasedTracker::resetTracking ( )
virtual
virtual bool cv::DetectionBasedTracker::run ( )
virtual
bool cv::DetectionBasedTracker::setParameters ( const Parameters params)
virtual void cv::DetectionBasedTracker::stop ( )
virtual
void cv::DetectionBasedTracker::updateTrackedObjects ( const std::vector< cv::Rect > &  detectedObjects)
protected

Friends And Related Function Documentation

void* workcycleObjectDetectorFunction ( void *  p)
friend

Member Data Documentation

cv::Ptr<IDetector> cv::DetectionBasedTracker::cascadeForTracking
protected
InnerParameters cv::DetectionBasedTracker::innerParameters
protected
int cv::DetectionBasedTracker::numTrackedSteps
protected
Parameters cv::DetectionBasedTracker::parameters
protected
cv::Ptr<SeparateDetectionWork> cv::DetectionBasedTracker::separateDetectionWork
protected
std::vector<TrackedObject> cv::DetectionBasedTracker::trackedObjects
protected
std::vector<float> cv::DetectionBasedTracker::weightsPositionsSmoothing
protected
std::vector<float> cv::DetectionBasedTracker::weightsSizesSmoothing
protected

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