change to pointer
parent
93519e4cca
commit
1a2eb9a101
|
|
@ -91,7 +91,7 @@ void TranslationRecovery::addPrior(
|
|||
edge->key2(), scale * edge->measured().point3(), edge->noiseModel());
|
||||
}
|
||||
|
||||
Values TranslationRecovery::initializeRandomly(std::mt19937 &rng) const {
|
||||
Values TranslationRecovery::initializeRandomly(std::mt19937 *rng) const {
|
||||
uniform_real_distribution<double> randomVal(-1, 1);
|
||||
// Create a lambda expression that checks whether value exists and randomly
|
||||
// initializes if not.
|
||||
|
|
@ -121,7 +121,7 @@ Values TranslationRecovery::initializeRandomly(std::mt19937 &rng) const {
|
|||
}
|
||||
|
||||
Values TranslationRecovery::initializeRandomly() const {
|
||||
return initializeRandomly(kRandomNumberGenerator);
|
||||
return initializeRandomly(&kRandomNumberGenerator);
|
||||
}
|
||||
|
||||
Values TranslationRecovery::run(const double scale) const {
|
||||
|
|
|
|||
|
|
@ -16,16 +16,16 @@
|
|||
* @brief Recovering translations in an epipolar graph when rotations are given.
|
||||
*/
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <gtsam/geometry/Unit3.h>
|
||||
#include <gtsam/nonlinear/LevenbergMarquardtOptimizer.h>
|
||||
#include <gtsam/nonlinear/Values.h>
|
||||
#include <gtsam/sfm/BinaryMeasurement.h>
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace gtsam {
|
||||
|
||||
// Set up an optimization problem for the unknown translations Ti in the world
|
||||
|
|
@ -99,15 +99,15 @@ class TranslationRecovery {
|
|||
|
||||
/**
|
||||
* @brief Create random initial translations.
|
||||
*
|
||||
*
|
||||
* @param rng random number generator
|
||||
* @return Values
|
||||
*/
|
||||
Values initializeRandomly(std::mt19937 &rng) const;
|
||||
Values initializeRandomly(std::mt19937 *rng) const;
|
||||
|
||||
/**
|
||||
* @brief Version of initializeRandomly with a fixed seed.
|
||||
*
|
||||
*
|
||||
* @return Values
|
||||
*/
|
||||
Values initializeRandomly() const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue