38 using namespace gtsam;
46 SfmData db = SfmData::FromBalFile(filename);
61 double actualError = graph.
error(actual);
virtual const Values & optimize()
SfmData stores a bunch of SfmTracks.
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&... args)
Emplace a shared pointer to factor of given type.
static int runAllTests(TestResult &result)
A non-templated config holding any types of Manifold-group elements.
Factor Graph consisting of non-linear factors.
Values initialCamerasAndPointsEstimate(const SfmData &db)
This function creates initial values for cameras and points from db.
NonlinearFactorGraph graph
#define EXPECT_DOUBLES_EQUAL(expected, actual, threshold)
std::vector< SfmTrack > tracks
Sparse set of points.
GeneralSFMFactor< PinholeCamera< Cal3Bundler >, Point3 > sfmFactor
std::pair< size_t, Point2 > SfmMeasurement
A measurement with its camera index.
Data structure for dealing with Structure from Motion data.
A nonlinear optimizer that uses the Levenberg-Marquardt trust-region scheme.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
double error(const Values &values) const
GTSAM_EXPORT std::string findExampleDataFile(const std::string &name)
size_t numberTracks() const
The number of reconstructed 3D points.
a general SFM factor with an unknown calibration
Base class and parameters for nonlinear optimization algorithms.
utility functions for loading datasets
noiseModel::Base::shared_ptr SharedNoiseModel