#include <ransac.h>
Static Public Member Functions | |
| template<class Estimator, class S, class T> | |
| std::vector< const T * > | compute (S ¶meters, std::vector< int > &inliers, const Estimator ¶mEstimator, const std::vector< T > &data, double desiredProbabilityForNoOutliers, double maximalOutlierPercentage) |
| Estimate the model parameters using the RanSac framework. | |
| template<class Estimator, class S, class T> | |
| std::vector< const T * > | compute (S ¶meters, const Estimator ¶mEstimator, const std::vector< T > &data) |
| Estimate the model parameters using the maximal consensus set by going over ALL possible subsets (brute force approach). | |
Static Private Member Functions | |
| unsigned int | choose (unsigned int n, unsigned int m) |
| Compute n choose m [ n!/(m!*(n-m)!)]. | |
| template<class Estimator, class T> | |
| void | computeAllChoices (const Estimator ¶mEstimator, const std::vector< T > &data, int numForEstimate, short *bestVotes, short *curVotes, int &numVotesForBest, int startIndex, int n, int k, int arrIndex, int *arr) |
| template<class Estimator, class T, class S> | |
| void | estimate (const Estimator ¶mEstimator, const std::vector< T > &data, int numForEstimate, short *bestVotes, short *curVotes, int &numVotesForBest, int *arr) |
Given data containing outliers we estimate the model parameters using sub-sets of the original data: 1. Choose the minimal subset from the data for computing the exact model parameters. 2. See how much of the input data agrees with the computed parameters. 3. Goto step 1. This can be done up to (m choose N) times, where m is the number of data objects required for an exact estimate and N is the total number of data objects. 4. Take the largest subset of objects which agreed on the parameters and compute a least squares fit using them.
This is based on: Fischler M.A., Bolles R.C., ``Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography'', Communications of the ACM, Vol. 24(6), 1981.
Hartely R., Zisserman A., "Multiple View Geometry in Computer Vision"
The class template parameters are T - objects used for the parameter estimation (e.g. Point2D in line estimation, std::pair<Point2D,Point2D> in homography estimation). S - type of parameters (e.g. std::vector<double>).
Author: Ziv Yaniv
Small modifications by Pablo d'Angelo: * allow arbitrary parameters, not just vector<S>
Definition at line 75 of file ransac.h.
|
||||||||||||
|
Compute n choose m [ n!/(m!*(n-m)!)].
Definition at line 424 of file ransac.h. Referenced by compute(). |
|
||||||||||||||||||||
|
Estimate the model parameters using the maximal consensus set by going over ALL possible subsets (brute force approach). Given: n - data.size() k - numForEstimate We go over all n choose k subsets n! ------------ (n-k)! * k!
Definition at line 331 of file ransac.h. References computeAllChoices(). |
|
||||||||||||||||||||||||||||||||
|
Estimate the model parameters using the RanSac framework.
Definition at line 175 of file ransac.h. References choose(), vigra_ext::log(), and vigra_ext::pow(). Referenced by HuginBase::RANSACOptimizer::findInliers(), and vigra_ext::optimizeVignettingQuotient(). |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 369 of file ransac.h. References estimate(). Referenced by compute(). |
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 391 of file ransac.h. Referenced by computeAllChoices(). |
1.3.9.1