OpenCV
3.3.0
Open Source Computer Vision
|
Classes | |
class | cv::BaseClassifier |
class | cv::ClassifierThreshold |
class | cv::ClfMilBoost |
class | cv::ClfOnlineStump |
class | cv::CvFeatureEvaluator |
class | cv::CvFeatureParams |
class | cv::CvHaarEvaluator |
class | cv::CvHaarFeatureParams |
class | cv::CvHOGEvaluator |
struct | cv::CvHOGFeatureParams |
class | cv::CvLBPEvaluator |
struct | cv::CvLBPFeatureParams |
class | cv::CvParams |
class | cv::Detector |
class | cv::EstimatedGaussDistribution |
class | cv::MultiTracker |
This class is used to track multiple objects using the specified tracker algorithm. The MultiTracker is naive implementation of multiple object tracking. It process the tracked objects independently without any optimization accross the tracked objects. More... | |
class | cv::MultiTracker_Alt |
Base abstract class for the long-term Multi Object Trackers: More... | |
class | cv::MultiTrackerTLD |
Multi Object Tracker for TLD. TLD is a novel tracking framework that explicitly decomposes the long-term tracking task into tracking, learning and detection. More... | |
class | cv::StrongClassifierDirectSelection |
class | cv::Tracker |
Base abstract class for the long-term tracker: More... | |
class | cv::TrackerBoosting |
This is a real-time object tracking based on a novel on-line version of the AdaBoost algorithm. More... | |
class | cv::TrackerFeature |
Abstract base class for TrackerFeature that represents the feature. More... | |
class | cv::TrackerFeatureFeature2d |
TrackerFeature based on Feature2D. More... | |
class | cv::TrackerFeatureHAAR |
TrackerFeature based on HAAR features, used by TrackerMIL and many others algorithms. More... | |
class | cv::TrackerFeatureHOG |
TrackerFeature based on HOG. More... | |
class | cv::TrackerFeatureLBP |
TrackerFeature based on LBP. More... | |
class | cv::TrackerFeatureSet |
Class that manages the extraction and selection of features. More... | |
class | cv::TrackerGOTURN |
GOTURN ([72]) is kind of trackers based on Convolutional Neural Networks (CNN). While taking all advantages of CNN trackers, GOTURN is much faster due to offline training without online fine-tuning nature. GOTURN tracker addresses the problem of single target tracking: given a bounding box label of an object in the first frame of the video, we track that object through the rest of the video. NOTE: Current method of GOTURN does not handle occlusions; however, it is fairly robust to viewpoint changes, lighting changes, and deformations. Inputs of GOTURN are two RGB patches representing Target and Search patches resized to 227x227. Outputs of GOTURN are predicted bounding box coordinates, relative to Search patch coordinate system, in format X1,Y1,X2,Y2. Original paper is here: http://davheld.github.io/GOTURN/GOTURN.pdf As long as original authors implementation: https://github.com/davheld/GOTURN#train-the-tracker Implementation of training algorithm is placed in separately here due to 3d-party dependencies: https://github.com/Auron-X/GOTURN_Training_Toolkit GOTURN architecture goturn.prototxt and trained model goturn.caffemodel are accessible on opencv_extra GitHub repository. More... | |
class | cv::TrackerKCF |
KCF is a novel tracking framework that utilizes properties of circulant matrix to enhance the processing speed. This tracking method is an implementation of [73] which is extended to KFC with color-names features ([34]). The original paper of KCF is available at http://home.isr.uc.pt/~henriques/circulant/index.html as well as the matlab implementation. For more information about KCF with color-names features, please refer to http://www.cvl.isy.liu.se/research/objrec/visualtracking/colvistrack/index.html. More... | |
class | cv::TrackerMedianFlow |
Median Flow tracker implementation. More... | |
class | cv::TrackerMIL |
The MIL algorithm trains a classifier in an online manner to separate the object from the background. More... | |
class | cv::TrackerModel |
Abstract class that represents the model of the target. It must be instantiated by specialized tracker. More... | |
class | cv::TrackerSampler |
Class that manages the sampler in order to select regions for the update the model of the tracker [AAM] Sampling e Labeling. See table I and section III B. More... | |
class | cv::TrackerSamplerAlgorithm |
Abstract base class for TrackerSamplerAlgorithm that represents the algorithm for the specific sampler. More... | |
class | cv::TrackerSamplerCS |
TrackerSampler based on CS (current state), used by algorithm TrackerBoosting. More... | |
class | cv::TrackerSamplerCSC |
TrackerSampler based on CSC (current state centered), used by MIL algorithm TrackerMIL. More... | |
class | cv::TrackerSamplerPF |
This sampler is based on particle filtering. More... | |
class | cv::TrackerStateEstimator |
Abstract base class for TrackerStateEstimator that estimates the most likely target state. More... | |
class | cv::TrackerStateEstimatorAdaBoosting |
TrackerStateEstimatorAdaBoosting based on ADA-Boosting. More... | |
class | cv::TrackerStateEstimatorMILBoosting |
TrackerStateEstimator based on Boosting. More... | |
class | cv::TrackerStateEstimatorSVM |
TrackerStateEstimator based on SVM. More... | |
class | cv::TrackerTargetState |
Abstract base class for TrackerTargetState that represents a possible state of the target. More... | |
class | cv::TrackerTLD |
TLD is a novel tracking framework that explicitly decomposes the long-term tracking task into tracking, learning and detection. More... | |
class | cv::WeakClassifierHaarFeature |
Macros | |
#define | CC_FEATURE_PARAMS "featureParams" |
#define | CC_FEATURE_SIZE "featSize" |
#define | CC_FEATURES FEATURES |
#define | CC_ISINTEGRAL "isIntegral" |
#define | CC_MAX_CAT_COUNT "maxCatCount" |
#define | CC_NUM_FEATURES "numFeat" |
#define | CC_RECT "rect" |
#define | CC_RECTS "rects" |
#define | CC_TILTED "tilted" |
#define | CV_HAAR_FEATURE_MAX 3 |
#define | CV_SUM_OFFSETS(p0, p1, p2, p3, rect, step) |
#define | CV_TILTED_OFFSETS(p0, p1, p2, p3, rect, step) |
#define | FEATURES "features" |
#define | HFP_NAME "haarFeatureParams" |
#define | HOGF_NAME "HOGFeatureParams" |
#define | LBPF_NAME "lbpFeatureParams" |
#define | N_BINS 9 |
#define | N_CELLS 4 |
Typedefs | |
typedef std::vector< std::pair< Ptr< TrackerTargetState >, float > > | cv::ConfidenceMap |
Represents the model of the target at frame \(k\) (all states and scores) More... | |
typedef std::vector< Ptr< TrackerTargetState > > | cv::Trajectory |
Represents the estimate states for all frames. More... | |
Functions | |
template<class Feature > | |
void | cv::_writeFeatures (const std::vector< Feature > features, FileStorage &fs, const Mat &featureMap) |
float | cv::CvHOGEvaluator::Feature::calc (const std::vector< Mat > &_hists, const Mat &_normSum, size_t y, int featComponent) const |
uchar | cv::CvLBPEvaluator::Feature::calc (const Mat &_sum, size_t y) const |
float | cv::calcNormFactor (const Mat &sum, const Mat &sqSum) |
virtual float | cv::CvHOGEvaluator::operator() (int varIdx, int sampleIdx) |
Long-term optical tracking is one of most important issue for many computer vision applications in real world scenario. The development in this area is very fragmented and this API is an unique interface useful for plug several algorithms and compare them. This work is partially based on [150] and [101] .
This algorithms start from a bounding box of the target and with their internal representation they avoid the drift during the tracking. These long-term trackers are able to evaluate online the quality of the location of the target in the new frame, without ground truth.
There are three main components: the TrackerSampler, the TrackerFeatureSet and the TrackerModel. The first component is the object that computes the patches over the frame based on the last target location. The TrackerFeatureSet is the class that manages the Features, is possible plug many kind of these (HAAR, HOG, LBP, Feature2D, etc). The last component is the internal representation of the target, it is the appearence model. It stores all state candidates and compute the trajectory (the most likely target states). The class TrackerTargetState represents a possible state of the target. The TrackerSampler and the TrackerFeatureSet are the visual representation of the target, instead the TrackerModel is the statistical model.
A recent benchmark between these algorithms can be found in [193]
To see how API works, try tracker demo: https://github.com/lenlen/opencv/blob/tracking_api/samples/cpp/tracker.cpp
If you want create a new tracker, here's what you have to do. First, decide on the name of the class for the tracker (to meet the existing style, we suggest something with prefix "tracker", e.g. trackerMIL, trackerBoosting) – we shall refer to this choice as to "classname" in subsequent. Also, you should decide upon the name of the tracker, is it will be known to user (the current style suggests using all capitals, say MIL or BOOSTING) –we'll call it a "name".
Every tracker has three component TrackerSampler, TrackerFeatureSet and TrackerModel. The first two are instantiated from Tracker base class, instead the last component is abstract, so you must implement your TrackerModel.
TrackerSampler is already instantiated, but you should define the sampling algorithm and add the classes (or single class) to TrackerSampler. You can choose one of the ready implementation as TrackerSamplerCSC or you can implement your sampling method, in this case the class must inherit TrackerSamplerAlgorithm. Fill the samplingImpl method that writes the result in "sample" output argument.
Example of creating specialized TrackerSamplerAlgorithm TrackerSamplerCSC : :
Example of adding TrackerSamplerAlgorithm to TrackerSampler : :
TrackerFeatureSet is already instantiated (as first) , but you should define what kinds of features you'll use in your tracker. You can use multiple feature types, so you can add a ready implementation as TrackerFeatureHAAR in your TrackerFeatureSet or develop your own implementation. In this case, in the computeImpl method put the code that extract the features and in the selection method optionally put the code for the refinement and selection of the features.
Example of creating specialized TrackerFeature TrackerFeatureHAAR : :
Example of adding TrackerFeature to TrackerFeatureSet : :
TrackerModel is abstract, so in your implementation you must develop your TrackerModel that inherit from TrackerModel. Fill the method for the estimation of the state "modelEstimationImpl", that estimates the most likely target location, see [150] table I (ME) for further information. Fill "modelUpdateImpl" in order to update the model, see [150] table I (MU). In this class you can use the :cConfidenceMap and :cTrajectory to storing the model. The first represents the model on the all possible candidate states and the second represents the list of all estimated states.
Example of creating specialized TrackerModel TrackerMILModel : :
And add it in your Tracker : :
In the last step you should define the TrackerStateEstimator based on your implementation or you can use one of ready class as TrackerStateEstimatorMILBoosting. It represent the statistical part of the model that estimates the most likely target state.
Example of creating specialized TrackerStateEstimator TrackerStateEstimatorMILBoosting : :
And add it in your TrackerModel : :
During this step, you should define your TrackerTargetState based on your implementation. TrackerTargetState base class has only the bounding box (upper-left position, width and height), you can enrich it adding scale factor, target rotation, etc.
Example of creating specialized TrackerTargetState TrackerMILTargetState : :
To try your tracker you can use the demo at https://github.com/lenlen/opencv/blob/tracking_api/samples/cpp/tracker.cpp.
The first argument is the name of the tracker and the second is a video source.
#define CC_FEATURE_PARAMS "featureParams" |
#define CC_FEATURE_SIZE "featSize" |
#define CC_FEATURES FEATURES |
#define CC_ISINTEGRAL "isIntegral" |
#define CC_MAX_CAT_COUNT "maxCatCount" |
#define CC_NUM_FEATURES "numFeat" |
#define CC_RECT "rect" |
#define CC_RECTS "rects" |
#define CC_TILTED "tilted" |
#define CV_HAAR_FEATURE_MAX 3 |
#define CV_SUM_OFFSETS | ( | p0, | |
p1, | |||
p2, | |||
p3, | |||
rect, | |||
step | |||
) |
#define CV_TILTED_OFFSETS | ( | p0, | |
p1, | |||
p2, | |||
p3, | |||
rect, | |||
step | |||
) |
#define FEATURES "features" |
#define HFP_NAME "haarFeatureParams" |
#define HOGF_NAME "HOGFeatureParams" |
#define LBPF_NAME "lbpFeatureParams" |
#define N_BINS 9 |
#define N_CELLS 4 |
typedef std::vector<std::pair<Ptr<TrackerTargetState>, float> > cv::ConfidenceMap |
Represents the model of the target at frame \(k\) (all states and scores)
See [150] The set of the pair \(\langle \hat{x}^{i}_{k}, C^{i}_{k} \rangle\)
typedef std::vector<Ptr<TrackerTargetState> > cv::Trajectory |
Represents the estimate states for all frames.
[150] \(x_{k}\) is the trajectory of the target up to time \(k\)
void cv::_writeFeatures | ( | const std::vector< Feature > | features, |
FileStorage & | fs, | ||
const Mat & | featureMap | ||
) |
|
inline |
|
inlinevirtual |
Implements cv::CvFeatureEvaluator.