1
0
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:
Alex Leontiev
2013-09-22 21:30:54 +08:00
parent 7c4aeaddfc
commit 2fda95b80f
7 changed files with 406 additions and 38 deletions

View File

@@ -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 &parameters = 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