 |
AliceVision
Photogrammetric Computer Vision Framework
|
9 #include <aliceVision/numeric/numeric.hpp>
10 #include <aliceVision/numeric/Container.hpp>
15 namespace robustEstimation {
20 template<
typename ModelT_>
42 virtual void solve(
const Mat& x1,
const Mat& x2, std::vector<ModelT_>& models)
const = 0;
51 virtual void solve(
const Mat& x1,
const Mat& x2, std::vector<ModelT_>& models,
const std::vector<double>& weights)
const = 0;
57 template<
typename ModelT_>
63 throw std::runtime_error(
"Undefined solver used in kernel.");
69 throw std::runtime_error(
"Undefined solver used in kernel.");
73 void solve(
const Mat& x1,
const Mat& x2, std::vector<ModelT_>& models)
const override
75 throw std::runtime_error(
"Undefined solver used in kernel.");
78 void solve(
const Mat& x1,
const Mat& x2, std::vector<ModelT_>& models,
const std::vector<double>& weights)
const override
80 throw std::runtime_error(
"Undefined solver used in kernel.");
87 template<
typename MatrixT>
96 inline const MatrixT& getMatrix()
const {
return _matrix; }
98 inline MatrixT& getMatrix() {
return _matrix; }
100 inline void setMatrix(
const MatrixT& matrix) { _matrix = matrix; }
virtual std::size_t getMinimumNbRequiredSamples() const =0
Return the minimum number of required samples.
void solve(const Mat &x1, const Mat &x2, std::vector< ModelT_ > &models, const std::vector< double > &weights) const override
Solve the problem.
Definition: ISolver.hpp:78
virtual void solve(const Mat &x1, const Mat &x2, std::vector< ModelT_ > &models) const =0
Solve the problem.
Definition: checkerDetector.cpp:32
void solve(const Mat &x1, const Mat &x2, std::vector< ModelT_ > &models) const override
Solve the problem.
Definition: ISolver.hpp:73
Matrix based model to be used in a solver.
Definition: ISolver.hpp:88
std::size_t getMinimumNbRequiredSamples() const override
Return the minimum number of required samples.
Definition: ISolver.hpp:61
std::size_t getMaximumNbModels() const override
Return the maximum number of models.
Definition: ISolver.hpp:67
virtual std::size_t getMaximumNbModels() const =0
Return the maximum number of models.
Generic solver interface.
Definition: ISolver.hpp:21
An Undefined Solver.
Definition: ISolver.hpp:58