28 using namespace gtsam;
30 int main(
int argc,
char* argv[]) {
60 bool separateCalibration =
true;
61 return optimize(db, graph, initial, separateCalibration);
static Point2 project(const Pose3 &pose, const Unit3 &pointAtInfinity, const Cal3_S2::shared_ptr &cal)
static SharedNoiseModel gNoiseModel
SfmData stores a bunch of SfmTracks.
static Cal3_S2 K(500, 500, 0.1, 640/2, 480/2)
const Calibration & calibration() const override
return calibration
NonlinearFactorGraph graph
Pose3 inverse() const
inverse transformation with derivatives
std::vector< SfmTrack > tracks
Sparse set of points.
const Pose3 & pose() const
return pose
Common code for timeSFMBAL scripts.
std::pair< size_t, Point2 > SfmMeasurement
A measurement with its camera index.
Point3_ transformFrom(const Pose3_ &x, const Point3_ &p)
void addExpressionFactor(const SharedNoiseModel &R, const T &z, const Expression< T > &h)
Matrix< Scalar, Dynamic, Dynamic > C
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)
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.
Point2 uncalibrate(const CAL &K, const Point2 &p, OptionalJacobian< 2, 5 > Dcal, OptionalJacobian< 2, 2 > Dp)