mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-18 08:44:11 +08:00
The implementation of particle filtering tracker
This contribution aims to implement the sampler based on particle filtering within a generic tracking API that opencv has. It still remains to write the documentation.
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "feature.hpp"
|
||||
#include "onlineMIL.hpp"
|
||||
#include "onlineBoosting.hpp"
|
||||
#include "opencv2/optim.hpp"
|
||||
#include <iostream>
|
||||
|
||||
/*
|
||||
@@ -796,6 +797,25 @@ class CV_EXPORTS_W TrackerSamplerCS : public TrackerSamplerAlgorithm
|
||||
|
||||
};
|
||||
|
||||
class CV_EXPORTS_W TrackerSamplerPF : public TrackerSamplerAlgorithm{
|
||||
public:
|
||||
struct CV_EXPORTS Params
|
||||
{
|
||||
Params();
|
||||
int iterationNum;
|
||||
int particlesNum;
|
||||
double alpha;
|
||||
Mat_<double> std;
|
||||
};
|
||||
TrackerSamplerPF(const Mat& chosenRect,const TrackerSamplerPF::Params ¶meters = TrackerSamplerPF::Params());
|
||||
protected:
|
||||
bool samplingImpl( const Mat& image, Rect boundingBox, std::vector<Mat>& sample );
|
||||
private:
|
||||
Params params;
|
||||
Ptr<optim::Solver> _solver;
|
||||
Ptr<optim::Solver::Function> _function;
|
||||
};
|
||||
|
||||
/************************************ Specific TrackerFeature Classes ************************************/
|
||||
|
||||
/**
|
||||
@@ -1015,7 +1035,6 @@ class CV_EXPORTS_W TrackerBoosting : public Tracker
|
||||
Params params;
|
||||
AlgorithmInfo* info() const;
|
||||
};
|
||||
|
||||
} /* namespace cv */
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user