This example runs triangulation several times using 3 different approaches: LOST, DLT, and DLT with optimization. It reports the covariance and the runtime for each approach. More...
#include <gtsam/geometry/Cal3_S2.h>
#include <gtsam/geometry/PinholeCamera.h>
#include <gtsam/geometry/Point2.h>
#include <gtsam/geometry/Point3.h>
#include <gtsam/geometry/Pose3.h>
#include <gtsam/geometry/Rot3.h>
#include <gtsam/geometry/triangulation.h>
#include <chrono>
#include <iostream>
#include <random>
#include <optional>
Go to the source code of this file.
Functions | |
Point2Vector | AddNoiseToMeasurements (const Point2Vector &measurements, const double measurementSigma) |
void | GetLargeCamerasDataset (CameraSet< PinholeCamera< Cal3_S2 >> *cameras, std::vector< Pose3 > *poses, Point3 *point, Point2Vector *measurements) |
void | GetSmallCamerasDataset (CameraSet< PinholeCamera< Cal3_S2 >> *cameras, std::vector< Pose3 > *poses, Point3 *point, Point2Vector *measurements) |
int | main (int argc, char *argv[]) |
void | PrintCovarianceStats (const Matrix &mat, const std::string &method) |
void | PrintDuration (const std::chrono::nanoseconds dur, double num_samples, const std::string &method) |
static std::mt19937 | rng (42) |
This example runs triangulation several times using 3 different approaches: LOST, DLT, and DLT with optimization. It reports the covariance and the runtime for each approach.
Definition in file TriangulationLOSTExample.cpp.
Point2Vector AddNoiseToMeasurements | ( | const Point2Vector & | measurements, |
const double | measurementSigma | ||
) |
Definition at line 95 of file TriangulationLOSTExample.cpp.
void GetLargeCamerasDataset | ( | CameraSet< PinholeCamera< Cal3_S2 >> * | cameras, |
std::vector< Pose3 > * | poses, | ||
Point3 * | point, | ||
Point2Vector * | measurements | ||
) |
Definition at line 54 of file TriangulationLOSTExample.cpp.
void GetSmallCamerasDataset | ( | CameraSet< PinholeCamera< Cal3_S2 >> * | cameras, |
std::vector< Pose3 > * | poses, | ||
Point3 * | point, | ||
Point2Vector * | measurements | ||
) |
Definition at line 79 of file TriangulationLOSTExample.cpp.
Definition at line 108 of file TriangulationLOSTExample.cpp.
void PrintCovarianceStats | ( | const Matrix & | mat, |
const std::string & | method | ||
) |
Definition at line 39 of file TriangulationLOSTExample.cpp.
void PrintDuration | ( | const std::chrono::nanoseconds | dur, |
double | num_samples, | ||
const std::string & | method | ||
) |
Definition at line 47 of file TriangulationLOSTExample.cpp.
|
static |