30 using namespace gtsam;
39 int main(
int argc,
char* argv[]) {
65 v9 << Pose3::Logmap(openGLpose), camera.
calibration();
Adaptor for Ceres style auto-differentiated functions.
const Pose3 & pose() const
return pose
static SharedNoiseModel gNoiseModel
Define the structure for SfM data.
void insert(Key j, const Value &val)
Pose3 gtsam2openGL(const Rot3 &R, double tx, double ty, double tz)
This function converts a GTSAM camera pose to an openGL camera pose.
int main(int argc, char *argv[])
const Calibration & calibration() const override
return calibration
NonlinearFactorGraph graph
std::vector< SfmTrack > tracks
Sparse set of points.
Common code for timeSFMBAL scripts.
std::pair< size_t, Point2 > SfmMeasurement
A measurement with its camera index.
size_t number_tracks() const
The number of reconstructed 3D points.
Define the structure for the 3D points.
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)
static const CalibratedCamera camera(kDefaultPose)
PinholeCamera< Cal3Bundler > Camera