OpenGV
A library for solving calibrated central and non-central geometric vision problems
Loading...
Searching...
No Matches
opengv::sac_problems::relative_pose::MultiCentralRelativePoseSacProblem Class Reference

#include <MultiCentralRelativePoseSacProblem.hpp>

Inheritance diagram for opengv::sac_problems::relative_pose::MultiCentralRelativePoseSacProblem:
opengv::sac::MultiSampleConsensusProblem< transformations_t >

Public Types

typedef transformations_t model_t
typedef opengv::relative_pose::RelativeMultiAdapterBase adapter_t
Public Types inherited from opengv::sac::MultiSampleConsensusProblem< transformations_t >
typedef transformations_t model_t

Public Member Functions

 MultiCentralRelativePoseSacProblem (adapter_t &adapter, int sampleSize, bool randomSeed=true)
 Constructor.
 MultiCentralRelativePoseSacProblem (adapter_t &adapter, const std::vector< std::vector< int > > &indices, int sampleSize, bool randomSeed=true)
 Constructor.
virtual ~MultiCentralRelativePoseSacProblem ()
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< transformations_t >
 MultiSampleConsensusProblem (bool randomSeed=true)
 Contructor.
virtual ~MultiSampleConsensusProblem ()
 Destructor.
virtual void getSamples (int &iterations, std::vector< std::vector< int > > &samples)
 Get samples for hypothesis generation.
virtual bool isSampleGood (const std::vector< std::vector< int > > &sample) const
 Check if a set of samples for model generation is degenerate.
std::shared_ptr< std::vector< std::vector< int > > > getIndices () const
 Get a pointer to the vector of multi-indices used.
void drawIndexSample (std::vector< std::vector< int > > &sample)
 Sub-function for getting samples for hypothesis generation.
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.
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.
virtual int countWithinDistance (const model_t &model_coefficients, const double threshold)
 Count all the inlier samples whith respect to given model coefficients.
void setIndices (const std::vector< std::vector< int > > &indices)
 Set the indices_ variable (see member-description).
void setUniformIndices (std::vector< int > N)
 Use this method if you want to use all samples.
int rnd ()
 Get a random number.

Protected Attributes

adapter_t_adapter
int _sampleSize

Additional Inherited Members

Public Attributes inherited from opengv::sac::MultiSampleConsensusProblem< transformations_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 multi relative-pose model to sets of bearing-vector correspondences between multiple viewpoints. Exploits mutual agreement. Used within a multi random-sample paradigm for rejecting outlier correspondences. Experimental! Currently using eightpt [9,10].

Member Typedef Documentation

◆ adapter_t

◆ model_t

The model we are trying to fit (multiple transformations)

Constructor & Destructor Documentation

◆ MultiCentralRelativePoseSacProblem() [1/2]

opengv::sac_problems::relative_pose::MultiCentralRelativePoseSacProblem::MultiCentralRelativePoseSacProblem ( adapter_t & adapter,
int sampleSize,
bool randomSeed = true )
inline

Constructor.

Parameters
[in]adapterVisitor holding bearing vector correspondences etc.
[in]sampleSizeThe number of samples for each "sub"-hypothesis.
[in]randomSeedWhether to seed the random number generator with the current time.

◆ MultiCentralRelativePoseSacProblem() [2/2]

opengv::sac_problems::relative_pose::MultiCentralRelativePoseSacProblem::MultiCentralRelativePoseSacProblem ( adapter_t & adapter,
const std::vector< std::vector< int > > & indices,
int sampleSize,
bool randomSeed = true )
inline

Constructor.

Parameters
[in]adapterVisitor holding bearing vector correspondences etc.
[in]indicesA vector of multi-indices to be used from all available correspondences.
[in]sampleSizeThe number of samples for each "sub"-hypothesis.
[in]randomSeedWhether to seed the random number generator with the current time.

◆ ~MultiCentralRelativePoseSacProblem()

virtual opengv::sac_problems::relative_pose::MultiCentralRelativePoseSacProblem::~MultiCentralRelativePoseSacProblem ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ computeModelCoefficients()

virtual bool opengv::sac_problems::relative_pose::MultiCentralRelativePoseSacProblem::computeModelCoefficients ( const std::vector< std::vector< int > > & indices,
model_t & outModel ) const
virtual

◆ getSampleSizes()

virtual std::vector< int > opengv::sac_problems::relative_pose::MultiCentralRelativePoseSacProblem::getSampleSizes ( ) const
virtual

◆ getSelectedDistancesToModel()

virtual void opengv::sac_problems::relative_pose::MultiCentralRelativePoseSacProblem::getSelectedDistancesToModel ( const model_t & model,
const std::vector< std::vector< int > > & indices,
std::vector< std::vector< double > > & scores ) const
virtual

◆ optimizeModelCoefficients()

virtual void opengv::sac_problems::relative_pose::MultiCentralRelativePoseSacProblem::optimizeModelCoefficients ( const std::vector< std::vector< int > > & inliers,
const model_t & model,
model_t & optimized_model )
virtual

Member Data Documentation

◆ _adapter

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

The adapter holding all input data.

◆ _sampleSize

int opengv::sac_problems::relative_pose::MultiCentralRelativePoseSacProblem::_sampleSize
protected

The number of samples for each "sub"-hypothesis.


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