/**
  * \brief Constructor.
  * \param[in] adapter Visitor holding bearing vector correspondences etc.
  * \param[in] algorithm The algorithm to use.
  * \param[in] asCentral Solve problem with only one camera?
  */
 NoncentralRelativePoseSacProblem(
     adapter_t & adapter, algorithm_t algorithm, bool asCentral = false ) :
     SampleConsensusProblem<model_t> (),
     _adapter(adapter),
     _algorithm(algorithm),
     _asCentral(asCentral)
 {
   setUniformIndices(adapter.getNumberCorrespondences());
 };
 /**
  * \brief Constructor.
  * \param[in] adapter Visitor holding bearing vector correspondences etc.
  * \param[in] sampleSize The number of samples for each "sub"-hypothesis.
  */
 MultiCentralRelativePoseSacProblem(adapter_t & adapter, int sampleSize ) :
   sac::MultiSampleConsensusProblem<model_t> (),
   _adapter(adapter),
   _sampleSize(sampleSize)
 {
   std::vector<int> numberCorrespondences;
   for(size_t i = 0; i < adapter.getNumberPairs(); i++)
     numberCorrespondences.push_back(adapter.getNumberCorrespondences(i));
   setUniformIndices(numberCorrespondences);
 };
 /**
  * \brief Constructor.
  * \param[in] adapter Visitor holding bearing vector correspondences etc.
  * \param[in] asCentral Solve problem with only one camera?
  */
 MultiNoncentralRelativePoseSacProblem(adapter_t & adapter, bool asCentral = false ) :
     MultiSampleConsensusProblem<model_t> (),
     _adapter(adapter),
     _asCentral(asCentral)
 {
     std::vector<int> numberCorrespondences;
     for(size_t i = 0; i < adapter.getNumberPairs(); i++)
         numberCorrespondences.push_back(adapter.getNumberCorrespondences(i));
     setUniformIndices(numberCorrespondences);
 };
Exemplo n.º 4
0
 /**
  * \brief Constructor.
  * \param[in] adapter Visitor holding bearing vector correspondences etc.
  */
 TranslationOnlySacProblem(adapter_t & adapter) :
   SampleConsensusProblem<model_t> (),
   _adapter(adapter)
 {
   setUniformIndices(adapter.getNumberCorrespondences());
 };