Ejemplo n.º 1
0
 /**
  * \brief Constructor.
  * \param[in] adapter Visitor holding bearing vector correspondences etc.
  * \param[in] sampleSize Number of correspondences used for generating hypotheses.
  * \param[in] randomSeed Whether to seed the random number generator with
  *            the current time.
  */
 EigensolverSacProblem(adapter_t & adapter, size_t sampleSize,
                       bool randomSeed = true) :
     sac::SampleConsensusProblem<model_t> (randomSeed),
     _adapter(adapter),
     _sampleSize(sampleSize)
 {
   setUniformIndices(adapter.getNumberCorrespondences());
 };
Ejemplo n.º 2
0
 /**
  * \brief Constructor.
  * \param[in] adapter Visitor holding bearing vectors, world points, etc.
  * \param[in] algorithm The algorithm we want to use.
  * \param[in] randomSeed Whether to seed the random number generator with
  *            the current time.
  */
 AbsolutePoseSacProblem(adapter_t & adapter, algorithm_t algorithm,
     bool randomSeed = true) :
     sac::SampleConsensusProblem<model_t> (randomSeed),
     _adapter(adapter),
     _algorithm(algorithm)
 {
   setUniformIndices(adapter.getNumberCorrespondences());
 };
 /**
  * \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] 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);
 };
 /**
  * \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);
 };
Ejemplo n.º 6
0
 /**
  * \brief Constructor.
  * \param[in] adapter Visitor holding bearing vector correspondences etc.
  */
 TranslationOnlySacProblem(adapter_t & adapter) :
   SampleConsensusProblem<model_t> (),
   _adapter(adapter)
 {
   setUniformIndices(adapter.getNumberCorrespondences());
 };