28 using namespace gtsam;
33 int main(
int argc,
char* argv[]) {
50 initial.insert(
C(i++), camera);
52 initial.insert(
P(
j++), track.
p);
static SharedNoiseModel gNoiseModel
Define the structure for SfM data.
NonlinearFactorGraph graph
std::vector< SfmTrack > tracks
Sparse set of points.
Common code for timeSFMBAL scripts.
Base class for all pinhole cameras.
std::pair< size_t, Point2 > SfmMeasurement
A measurement with its camera index.
size_t number_tracks() const
The number of reconstructed 3D points.
IsDerived< DERIVEDFACTOR > emplace_shared(Args &&...args)
Emplace a shared pointer to factor of given type.
Define the structure for the 3D points.
PinholeCamera< Cal3Bundler > Camera
GeneralSFMFactor< Camera, Point3 > SfmFactor
Matrix< Scalar, Dynamic, Dynamic > C
int main(int argc, char *argv[])
std::vector< SfmCamera > cameras
Set of cameras.
SfmData preamble(int argc, char *argv[])
Point3 p
3D position of the point
int optimize(const SfmData &db, const NonlinearFactorGraph &graph, const Values &initial, bool separateCalibration=false)
static const CalibratedCamera camera(kDefaultPose)
a general SFM factor with an unknown calibration
Calibration used by Bundler.