OpenGV
A library for solving calibrated central and non-central geometric vision problems
Lmeds.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * Authors: Johannes Mikulasch *
3 * License: Copyright (c) 2013 Laurent Kneip, ANU. All rights reserved. *
4 * *
5 * Redistribution and use in source and binary forms, with or without *
6 * modification, are permitted provided that the following conditions *
7 * are met: *
8 * * Redistributions of source code must retain the above copyright *
9 * notice, this list of conditions and the following disclaimer. *
10 * * Redistributions in binary form must reproduce the above copyright *
11 * notice, this list of conditions and the following disclaimer in the *
12 * documentation and/or other materials provided with the distribution. *
13 * * Neither the name of ANU nor the names of its contributors may be *
14 * used to endorse or promote products derived from this software without *
15 * specific prior written permission. *
16 * *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"*
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
20 * ARE DISCLAIMED. IN NO EVENT SHALL ANU OR THE CONTRIBUTORS BE LIABLE *
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL *
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR *
23 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
24 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY *
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF *
27 * SUCH DAMAGE. *
28 ******************************************************************************/
29
30//Note: has been derived from Ransac which has been derived from ROS
31
37#ifndef OPENGV_SAC_LMEDS_HPP_
38#define OPENGV_SAC_LMEDS_HPP_
39
40#include <vector>
42#include <cstdio>
43
47namespace opengv
48{
52namespace sac
53{
54
58template<typename PROBLEM_T>
59class Lmeds : public SampleConsensus<PROBLEM_T>
60{
61public:
63 typedef PROBLEM_T problem_t;
65 typedef typename problem_t::model_t model_t;
66
75
80 int maxIterations = 1000,
81 double threshold = 1.0,
82 double probability = 0.99);
86 virtual ~Lmeds();
87
91 bool computeModel( int debug_verbosity_level = 0 );
92};
93
94} // namespace sac
95} // namespace opengv
96
97#include "implementation/Lmeds.hpp"
98
99#endif /* OPENGV_SAC_LMEDS_HPP_ */
This is a base class for sample consensus methods such as Ransac. Derivatives call the three basic fu...
Definition: Lmeds.hpp:60
Lmeds(int maxIterations=1000, double threshold=1.0, double probability=0.99)
Constructor.
problem_t::model_t model_t
Definition: Lmeds.hpp:65
virtual ~Lmeds()
Destructor.
PROBLEM_T problem_t
Definition: Lmeds.hpp:63
bool computeModel(int debug_verbosity_level=0)
Fit the model.
Definition: SampleConsensus.hpp:62
std::vector< int > model_
Definition: SampleConsensus.hpp:109
double probability_
Definition: SampleConsensus.hpp:105
int max_iterations_
Definition: SampleConsensus.hpp:99
double threshold_
Definition: SampleConsensus.hpp:103
model_t model_coefficients_
Definition: SampleConsensus.hpp:107
std::vector< int > inliers_
Definition: SampleConsensus.hpp:111
std::shared_ptr< PROBLEM_T > sac_model_
Definition: SampleConsensus.hpp:113
int iterations_
Definition: SampleConsensus.hpp:101
The namespace of this library.
Definition: AbsoluteAdapterBase.hpp:48