/** * \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); };