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
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.
void addExpressionFactor(const SharedNoiseModel &R, const T &z, const Expression< T > &h)
Matrix< Scalar, Dynamic, Dynamic > C
std::vector< SfmCamera > cameras
Set of cameras.
int main(int argc, char *argv[])
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)
void insert(Key j, const Value &val)
Line3 transformTo(const Pose3 &wTc, const Line3 &wL, OptionalJacobian< 4, 6 > Dpose, OptionalJacobian< 4, 4 > Dline)
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)