OpenGV
A library for solving calibrated central and non-central geometric vision problems
opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem Class Reference

#include <MultiNoncentralRelativePoseSacProblem.hpp>

Inheritance diagram for opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem:
opengv::sac::MultiSampleConsensusProblem< transformation_t >

Public Types

enum  Algorithm { SIXPT = 0, GE = 1, SEVENTEENPT = 2 }
 
typedef transformation_t model_t
 
typedef opengv::relative_pose::RelativeMultiAdapterBase adapter_t
 
typedef enum opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem::Algorithm algorithm_t
 
- Public Types inherited from opengv::sac::MultiSampleConsensusProblem< transformation_t >
typedef transformation_t model_t
 

Public Member Functions

 MultiNoncentralRelativePoseSacProblem (adapter_t &adapter, algorithm_t algorithm, bool asCentral=false, bool randomSeed=true)
 Constructor. More...
 
 MultiNoncentralRelativePoseSacProblem (adapter_t &adapter, algorithm_t algorithm, const std::vector< std::vector< int > > &indices, bool asCentral=false, bool randomSeed=true)
 Constructor. More...
 
virtual ~MultiNoncentralRelativePoseSacProblem ()
 
virtual bool computeModelCoefficients (const std::vector< std::vector< int > > &indices, model_t &outModel) const
 See parent-class.
 
virtual void getSelectedDistancesToModel (const model_t &model, const std::vector< std::vector< int > > &indices, std::vector< std::vector< double > > &scores) const
 See parent-class.
 
virtual void optimizeModelCoefficients (const std::vector< std::vector< int > > &inliers, const model_t &model, model_t &optimized_model)
 See parent-class.
 
virtual std::vector< int > getSampleSizes () const
 See parent-class.
 
- Public Member Functions inherited from opengv::sac::MultiSampleConsensusProblem< transformation_t >
 MultiSampleConsensusProblem (bool randomSeed=true)
 Contructor. More...
 
virtual ~MultiSampleConsensusProblem ()
 Destructor.
 
virtual void getSamples (int &iterations, std::vector< std::vector< int > > &samples)
 Get samples for hypothesis generation. More...
 
virtual bool isSampleGood (const std::vector< std::vector< int > > &sample) const
 Check if a set of samples for model generation is degenerate. More...
 
std::shared_ptr< std::vector< std::vector< int > > > getIndices () const
 Get a pointer to the vector of multi-indices used. More...
 
void drawIndexSample (std::vector< std::vector< int > > &sample)
 Sub-function for getting samples for hypothesis generation. More...
 
virtual void getDistancesToModel (const model_t &model_coefficients, std::vector< std::vector< double > > &distances)
 Compute the distances of all samples which respect to given model coefficients. More...
 
virtual void selectWithinDistance (const model_t &model_coefficients, const double threshold, std::vector< std::vector< int > > &inliers)
 Select all the inlier samples whith respect to given model coefficients. More...
 
virtual int countWithinDistance (const model_t &model_coefficients, const double threshold)
 Count all the inlier samples whith respect to given model coefficients. More...
 
void setIndices (const std::vector< std::vector< int > > &indices)
 Set the indices_ variable (see member-description). More...
 
void setUniformIndices (std::vector< int > N)
 Use this method if you want to use all samples. More...
 
int rnd ()
 Get a random number. More...
 

Protected Attributes

adapter_t_adapter
 
algorithm_t _algorithm
 
bool _asCentral
 

Additional Inherited Members

- Public Attributes inherited from opengv::sac::MultiSampleConsensusProblem< transformation_t >
int max_sample_checks_
 
std::shared_ptr< std::vector< std::vector< int > > > indices_
 
std::vector< std::vector< int > > shuffled_indices_
 
std::mt19937 rng_alg_
 std-based random number generator algorithm.
 
std::shared_ptr< std::uniform_int_distribution<> > rng_dist_
 std-based random number generator distribution.
 
std::shared_ptr< std::function< int()> > rng_gen_
 std-based random number generator.
 

Detailed Description

Functions for fitting a relative-pose model to a set of bearing-vector correspondences from a multi-camera system (non-central). Can switch back to central as well in case only one camera is present. Otherwise using seventeenpt [12]. Uses RelativeMultiAdapterBase for managing correspondence-lists between individual pairs of views, enabling homogeneous sampling over the views. Used in a random-sample paradigm for rejecting outlier correspondences.

Member Typedef Documentation

Member Enumeration Documentation

Constructor & Destructor Documentation

opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem::MultiNoncentralRelativePoseSacProblem ( adapter_t adapter,
algorithm_t  algorithm,
bool  asCentral = false,
bool  randomSeed = true 
)
inline

Constructor.

Parameters
[in]adapterVisitor holding bearing vector correspondences etc.
[in]algorithmThe algorithm to use.
[in]asCentralSolve problem with only one camera?
[in]randomSeedWhether to seed the random number generator with the current time.
opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem::MultiNoncentralRelativePoseSacProblem ( adapter_t adapter,
algorithm_t  algorithm,
const std::vector< std::vector< int > > &  indices,
bool  asCentral = false,
bool  randomSeed = true 
)
inline

Constructor.

Parameters
[in]adapterVisitor holding bearing vector correspondences etc.
[in]algorithmThe algorithm to use.
[in]indicesA vector of multi-indices to be used from all available correspondences.
[in]asCentralSolve problem with only one camera?
[in]randomSeedWhether to seed the random number generator with the current time.
virtual opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem::~MultiNoncentralRelativePoseSacProblem ( )
inlinevirtual

Destructor.

Member Data Documentation

adapter_t& opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem::_adapter
protected

The adapter holding all input data.

algorithm_t opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem::_algorithm
protected

The algorithm we are using.

bool opengv::sac_problems::relative_pose::MultiNoncentralRelativePoseSacProblem::_asCentral
protected

Use the central algorithm? (only one camera?).


The documentation for this class was generated from the following file: