27 using namespace gtsam;
32 int main(
int argc,
char* argv[]) {
39 auto smartFactor = std::make_shared<SfmFactor>(
gNoiseModel);
43 smartFactor->add(z,
C(i));
static SharedNoiseModel gNoiseModel
SfmData stores a bunch of SfmTracks.
IsDerived< DERIVEDFACTOR > push_back(std::shared_ptr< DERIVEDFACTOR > factor)
Add a factor directly using a shared_ptr.
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.
Smart factor on cameras (pose + calibration)
SmartProjectionFactor< Camera > SfmFactor
Matrix< Scalar, Dynamic, Dynamic > C
std::vector< SfmCamera > cameras
Set of cameras.
SfmData preamble(int argc, char *argv[])
int optimize(const SfmData &db, const NonlinearFactorGraph &graph, const Values &initial, bool separateCalibration=false)
int main(int argc, char *argv[])
void insert(Key j, const Value &val)
size_t numberTracks() const
The number of reconstructed 3D points.
static const CalibratedCamera camera(kDefaultPose)
Calibration used by Bundler.
PinholeCamera< Cal3Bundler > Camera