22 using namespace gtsam;
35 for (
const Point3&
p : points) {
44 for (
size_t i = 0;
i < 2;
i++)
48 data.
tracks.push_back(track);
63 vector<Point3> points = {
64 {0, 0, 1}, {-0.1, 0, 1}, {0.1, 0, 1}, {0, 0.5, 0.5}, {0, -0.5, 0.5}};
67 const string filename =
"../../examples/Data/5pointExample1.txt";
80 vector<Point3> points = {{0, 0, 100}, {-10, 0, 100}, {10, 0, 100},
81 {0, 50, 50}, {0, -50, 50}, {-20, 0, 80},
85 const string filename =
"../../examples/Data/5pointExample2.txt";
99 vector<Point3> points = {
100 {0, 0, 1}, {-0.1, 0, 1}, {0.1, 0, 1},
101 {0, 0.5, 0.5}, {0, -0.5, 0.5}, {-1, -0.5, 2},
102 {-1, 0.5, 2}, {0.25, -0.5, 1.5}, {0.25, 0.5, 1.5},
103 {-0.1, -0.5, 0.5}, {0.1, -0.5, 1}, {0.1, 0.5, 1},
104 {-0.1, 0, 0.5}, {-0.1, 0.5, 0.5}, {0, 0, 0.5},
105 {0.1, -0.5, 0.5}, {0.1, 0, 0.5}, {0.1, 0.5, 0.5}};
108 const string filename =
"../../examples/Data/18pointExample1.txt";
112 int main(
int argc,
char* argv[]) {
void create5PointExample2()
SfmData stores a bunch of SfmTracks.
static Cal3_S2 K(500, 500, 0.1, 640/2, 480/2)
void create5PointExample1()
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
std::vector< SfmTrack > tracks
Sparse set of points.
std::vector< SfmMeasurement > measurements
The 2D image projections (id,(u,v))
void create18PointExample1()
static const Pose3 pose1(Rot3(), Point3(0, 1, 0.5))
Calibrated camera for which only pose is unknown.
int main(int argc, char *argv[])
std::vector< SfmCamera > cameras
Set of cameras.
Calibration used by Bundler.
void createExampleBALFile(const string &filename, const vector< Point3 > &points, const Pose3 &pose1, const Pose3 &pose2, const Cal3Bundler &K=Cal3Bundler())
Point3 p
3D position of the point
float b
RGB color of the 3D point.
PinholeCamera< Cal3Bundler > SfmCamera
Define the structure for the camera poses.
utility functions for loading datasets
bool writeBAL(const std::string &filename, const SfmData &data)
This function writes a "Bundle Adjustment in the Large" (BAL) file from a SfmData structure...