This is one example (targeted at solvers that operate on correspondences between two views) that shows the "kernel" part of a robust fitting problem:
More...
|
|
| PointFittingKernel (const Mat &x1, const Mat &x2) |
| |
| std::size_t | getMinimumNbRequiredSamples () const |
| | Return the minimum number of required samples. More...
|
| |
| std::size_t | getMaximumNbModels () const |
| | Return the maximum number of models. More...
|
| |
| virtual void | fit (const std::vector< std::size_t > &samples, std::vector< ModelT > &models) const |
| | Extract required sample and fit model(s) to the sample. More...
|
| |
| virtual double | error (std::size_t sample, const ModelT &model) const |
| | Return the error associated to the model and a sample point. More...
|
| |
| virtual void | errors (const ModelT &model, std::vector< double > &errors) const |
| | Return the errors associated to the model and each sample point. More...
|
| |
| std::size_t | nbSamples () const |
| | get the number of putative points More...
|
| |
template<typename SolverT_, typename ErrorT_, typename ModelT_ = Mat3Model>
class aliceVision::robustEstimation::PointFittingKernel< SolverT_, ErrorT_, ModelT_ >
This is one example (targeted at solvers that operate on correspondences between two views) that shows the "kernel" part of a robust fitting problem:
- The model; Mat3Model in the case of the F or H matrix.
- The minimum number of samples needed to fit; 7 or 8 (or 4).
- A way to convert samples to a model.
- A way to convert a sample and a model to an error.
Of particular note is that the kernel does not expose what the samples are. All the robust fitting algorithm sees is that there is some number of samples; it is able to fit subsets of them (via the kernel) and check their error, but can never access the samples themselves.
The Kernel objects must follow the following concept so that the robust fitting algorithm can fit this type of relation: ModelT
- kernel.getMaximumNbModels()
- kernel.getMinimumNbRequiredSamples()
- kernel.fit(std::vector<std::size_t>, std::vector<ModelT>&)
- kernel.error(std::size_t, ModelT) -> error
The fit routine must not clear existing entries in the vector of models; it should append new solutions to the end.