5#ifndef OPENCV_VIDEO_DETAIL_TRACKING_HPP
6#define OPENCV_VIDEO_DETAIL_TRACKING_HPP
18#include "opencv2/core.hpp"
22inline namespace tracking {
86 void clearResponses();
87 bool blockAddTrackerFeature;
157 bool blockAddTrackerSampler;
328 void clearCurrentConfidenceMap();
399 std::vector<Mat> sampleImage(
const Mat& img,
int x,
int y,
int w,
int h,
float inrad,
float outrad = 0,
int maxnum = 1000000);
n-dimensional dense array class
Definition mat.hpp:812
Random Number Generator.
Definition core.hpp:2889
Template class for 2D rectangles.
Definition types.hpp:444
Class that manages the extraction and selection of features.
Definition tracking.detail.hpp:60
void extraction(const std::vector< Mat > &images)
Extract features from the images collection.
bool addTrackerFeature(const Ptr< TrackerFeature > &feature)
Add TrackerFeature in the collection. Return true if TrackerFeature is added, false otherwise.
const std::vector< Mat > & getResponses() const
Get the responses.
const std::vector< Ptr< TrackerFeature > > & getTrackerFeatures() const
Get the TrackerFeature collection (TrackerFeature name, TrackerFeature pointer)
Abstract base class for TrackerFeature that represents the feature.
Definition tracking.detail.hpp:33
void compute(const std::vector< Mat > &images, Mat &response)
Compute the features in the images collection.
virtual ~TrackerFeature()
virtual bool computeImpl(const std::vector< Mat > &images, Mat &response)=0
Abstract class that represents the model of the target.
Definition tracking.detail.hpp:277
bool setTrackerStateEstimator(Ptr< TrackerStateEstimator > trackerStateEstimator)
Set TrackerEstimator, return true if the tracker state estimator is added, false otherwise.
Ptr< TrackerStateEstimator > getTrackerStateEstimator() const
Get the TrackerStateEstimator.
Ptr< TrackerStateEstimator > stateEstimator
Definition tracking.detail.hpp:332
int maxCMLength
Definition tracking.detail.hpp:335
virtual void modelUpdateImpl()=0
Trajectory trajectory
Definition tracking.detail.hpp:334
ConfidenceMap currentConfidenceMap
Definition tracking.detail.hpp:333
void modelUpdate()
Update the model.
void modelEstimation(const std::vector< Mat > &responses)
Estimate the most likely target location.
Ptr< TrackerTargetState > getLastTargetState() const
Get the last TrackerTargetState from Trajectory.
void setLastTargetState(const Ptr< TrackerTargetState > &lastTargetState)
Set the current TrackerTargetState in the Trajectory.
std::vector< ConfidenceMap > confidenceMaps
Definition tracking.detail.hpp:331
virtual void modelEstimationImpl(const std::vector< Mat > &responses)=0
bool runStateEstimator()
Run the TrackerStateEstimator, return true if is possible to estimate a new state,...
const ConfidenceMap & getLastConfidenceMap() const
Get the last ConfidenceMap for the current frame.
const std::vector< ConfidenceMap > & getConfidenceMaps() const
Get the list of the ConfidenceMap.
Abstract base class for TrackerSamplerAlgorithm that represents the algorithm for the specific sample...
Definition tracking.detail.hpp:99
virtual bool sampling(const Mat &image, const Rect &boundingBox, std::vector< Mat > &sample)=0
Computes the regions starting from a position in an image.
virtual ~TrackerSamplerAlgorithm()
TrackerSampler based on CSC (current state centered), used by MIL algorithm TrackerMIL.
Definition tracking.detail.hpp:350
void setMode(int samplingMode)
Set the sampling mode of TrackerSamplerCSC.
bool sampling(const Mat &image, const Rect &boundingBox, std::vector< Mat > &sample) CV_OVERRIDE
Computes the regions starting from a position in an image.
TrackerSamplerCSC(const TrackerSamplerCSC::Params ¶meters=TrackerSamplerCSC::Params())
Constructor.
MODE
Definition tracking.detail.hpp:355
Class that manages the sampler in order to select regions for the update the model of the tracker [AA...
Definition tracking.detail.hpp:129
bool addTrackerSamplerAlgorithm(const Ptr< TrackerSamplerAlgorithm > &sampler)
Add TrackerSamplerAlgorithm in the collection. Return true if sampler is added, false otherwise.
const std::vector< Ptr< TrackerSamplerAlgorithm > > & getSamplers() const
Return the collection of the TrackerSamplerAlgorithm.
const std::vector< Mat > & getSamples() const
Return the samples from all TrackerSamplerAlgorithm, Fig. 1 variable Sk.
void sampling(const Mat &image, Rect boundingBox)
Computes the regions starting from a position in an image.
Abstract base class for TrackerStateEstimator that estimates the most likely target state.
Definition tracking.detail.hpp:231
static Ptr< TrackerStateEstimator > create(const String &trackeStateEstimatorType)
Create TrackerStateEstimator by tracker state estimator type.
void update(std::vector< ConfidenceMap > &confidenceMaps)
Update the ConfidenceMap with the scores.
virtual Ptr< TrackerTargetState > estimateImpl(const std::vector< ConfidenceMap > &confidenceMaps)=0
virtual void updateImpl(std::vector< ConfidenceMap > &confidenceMaps)=0
String getClassName() const
Get the name of the specific TrackerStateEstimator.
Ptr< TrackerTargetState > estimate(const std::vector< ConfidenceMap > &confidenceMaps)
Estimate the most likely target state, return the estimated state.
String className
Definition tracking.detail.hpp:265
virtual ~TrackerStateEstimator()
Abstract base class for TrackerTargetState that represents a possible state of the target.
Definition tracking.detail.hpp:172
Point2f getTargetPosition() const
Get the position.
int getTargetHeight() const
Get the height of the target.
void setTargetHeight(int height)
Set the height of the target.
void setTargetPosition(const Point2f &position)
Set the position.
Point2f targetPosition
Definition tracking.detail.hpp:204
int targetHeight
Definition tracking.detail.hpp:206
int targetWidth
Definition tracking.detail.hpp:205
virtual ~TrackerTargetState()
Definition tracking.detail.hpp:174
void setTargetWidth(int width)
Set the width of the target.
int getTargetWidth() const
Get the width of the target.
CvRNG * rng
Definition core_c.h:1250
const CvArr CvArr * x
Definition core_c.h:1195
const CvArr * y
Definition core_c.h:1187
#define CV_EXPORTS
Definition cvdef.h:435
#define CV_OVERRIDE
Definition cvdef.h:792
std::vector< Ptr< TrackerTargetState > > Trajectory
Represents the estimate states for all frames.
Definition tracking.detail.hpp:222
std::vector< std::pair< Ptr< TrackerTargetState >, float > > ConfidenceMap
Represents the model of the target at frame (all states and scores)
Definition tracking.detail.hpp:214
const IplImage * image
Definition videoio_c.h:131
"black box" representation of the file storage associated with a file on disk.
Definition calib3d.hpp:441
Definition cvstd_wrapper.hpp:74
Definition tracking.detail.hpp:364
int trackMaxNegNum
Definition tracking.detail.hpp:371
float initInRad
radius for gathering positive instances during init
Definition tracking.detail.hpp:366
float trackInPosRad
radius for gathering positive instances during tracking
Definition tracking.detail.hpp:367
int initMaxNegNum
Definition tracking.detail.hpp:369
float searchWinSize
size of search window
Definition tracking.detail.hpp:368
int trackMaxPosNum
Definition tracking.detail.hpp:370