27 using namespace gtsam;
32 int main(
int argc,
char* argv[]) {
39 auto smartFactor = boost::make_shared<SfmFactor>(
gNoiseModel);
43 smartFactor->add(z,
C(i));
static SharedNoiseModel gNoiseModel
Define the structure for SfM data.
void insert(Key j, const Value &val)
IsDerived< DERIVEDFACTOR > push_back(boost::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.
size_t number_tracks() const
The number of reconstructed 3D points.
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[])
static const CalibratedCamera camera(kDefaultPose)
Calibration used by Bundler.
PinholeCamera< Cal3Bundler > Camera