gtsam 4.1.1
gtsam
dataset.h File Reference

utility functions for loading datasets More...

Go to the source code of this file.

Classes

struct  gtsam::SfmTrack
 Define the structure for the 3D points. More...
 
struct  gtsam::traits< SfmTrack >
 traits More...
 
struct  gtsam::SfmData
 Define the structure for SfM data. More...
 
struct  gtsam::traits< SfmData >
 traits More...
 

Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.
 

Typedefs

typedef std::pair< size_t, Pose2 > gtsam::IndexedPose
 Return type for auxiliary functions.
 
typedef std::pair< size_t, Point2 > gtsam::IndexedLandmark
 
typedef std::pair< std::pair< size_t, size_t >, Pose2 > gtsam::IndexedEdge
 
using gtsam::GraphAndValues = std::pair< NonlinearFactorGraph::shared_ptr, Values::shared_ptr >
 Return type for load functions, which return a graph and initial values. More...
 
typedef std::pair< size_t, Point2 > gtsam::SfmMeasurement
 A measurement with its camera index.
 
typedef std::pair< size_t, size_t > gtsam::SiftIndex
 Sift index for SfmTrack.
 
typedef PinholeCamera< Cal3Bundler > gtsam::SfmCamera
 Define the structure for the camera poses.
 
using gtsam::BetweenFactorPose2s = std::vector< BetweenFactor< Pose2 >::shared_ptr >
 
using gtsam::BetweenFactorPose3s = std::vector< BetweenFactor< Pose3 >::shared_ptr >
 
using gtsam::BinaryMeasurementsUnit3 = std::vector< BinaryMeasurement< Unit3 > >
 

Enumerations

enum  gtsam::NoiseFormat {
  gtsam::NoiseFormatG2O , gtsam::NoiseFormatTORO , gtsam::NoiseFormatGRAPH , gtsam::NoiseFormatCOV ,
  gtsam::NoiseFormatAUTO
}
 Indicates how noise parameters are stored in file. More...
 
enum  gtsam::KernelFunctionType { KernelFunctionTypeNONE , KernelFunctionTypeHUBER , KernelFunctionTypeTUKEY }
 Robust kernel type to wrap around quadratic noise model.
 

Functions

string gtsam::findExampleDataFile (const std::string &name)
 Find the full path to an example dataset distributed with gtsam. More...
 
string gtsam::createRewrittenFileName (const std::string &name)
 Creates a temporary file name that needs to be ignored in .gitingnore for checking read-write oprations.
 
template<typename T >
GTSAM_EXPORT std::map< size_t, T > gtsam::parseVariables (const std::string &filename, size_t maxIndex=0)
 Parse variables in a line-based text format (like g2o) into a map. More...
 
template<typename T >
GTSAM_EXPORT std::vector< BinaryMeasurement< T > > gtsam::parseMeasurements (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model=nullptr, size_t maxIndex=0)
 Parse binary measurements in a line-based text format (like g2o) into a vector. More...
 
template<typename T >
GTSAM_EXPORT std::vector< typename BetweenFactor< T >::shared_ptr > gtsam::parseFactors (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model=nullptr, size_t maxIndex=0)
 Parse BetweenFactors in a line-based text format (like g2o) into a vector of shared pointers. More...
 
boost::optional< IndexedPose > gtsam::parseVertexPose (std::istream &is, const std::string &tag)
 Parse TORO/G2O vertex "id x y yaw". More...
 
boost::optional< IndexedLandmark > gtsam::parseVertexLandmark (std::istream &is, const std::string &tag)
 Parse G2O landmark vertex "id x y". More...
 
boost::optional< IndexedEdge > gtsam::parseEdge (std::istream &is, const std::string &tag)
 Parse TORO/G2O edge "id1 id2 x y yaw". More...
 
GTSAM_EXPORT GraphAndValues gtsam::load2D (std::pair< std::string, SharedNoiseModel > dataset, size_t maxIndex=0, bool addNoise=false, bool smart=true, NoiseFormat noiseFormat=NoiseFormatAUTO, KernelFunctionType kernelFunctionType=KernelFunctionTypeNONE)
 Load TORO 2D Graph. More...
 
GraphAndValues gtsam::load2D (const std::string &filename, SharedNoiseModel model=SharedNoiseModel(), size_t maxIndex=0, bool addNoise=false, bool smart=true, NoiseFormat noiseFormat=NoiseFormatAUTO, KernelFunctionType kernelFunctionType=KernelFunctionTypeNONE)
 Load TORO/G2O style graph files. More...
 
GraphAndValues gtsam::load2D_robust (const string &filename, const noiseModel::Base::shared_ptr &model, size_t maxIndex)
 
void gtsam::save2D (const NonlinearFactorGraph &graph, const Values &config, const noiseModel::Diagonal::shared_ptr model, const std::string &filename)
 save 2d graph
 
GraphAndValues gtsam::readG2o (const std::string &g2oFile, const bool is3D=false, KernelFunctionType kernelFunctionType=KernelFunctionTypeNONE)
 This function parses a g2o file and stores the measurements into a NonlinearFactorGraph and the initial guess in a Values structure. More...
 
void gtsam::writeG2o (const NonlinearFactorGraph &graph, const Values &estimate, const std::string &filename)
 This function writes a g2o file from NonlinearFactorGraph and a Values structure. More...
 
GraphAndValues gtsam::load3D (const std::string &filename)
 Load TORO 3D Graph.
 
bool gtsam::readBundler (const std::string &filename, SfmData &data)
 This function parses a bundler output file and stores the data into a SfmData structure. More...
 
bool gtsam::readBAL (const std::string &filename, SfmData &data)
 This function parses a "Bundle Adjustment in the Large" (BAL) file and stores the data into a SfmData structure. More...
 
SfmData gtsam::readBal (const std::string &filename)
 This function parses a "Bundle Adjustment in the Large" (BAL) file and returns the data as a SfmData structure. More...
 
bool gtsam::writeBAL (const std::string &filename, SfmData &data)
 This function writes a "Bundle Adjustment in the Large" (BAL) file from a SfmData structure. More...
 
bool gtsam::writeBALfromValues (const std::string &filename, const SfmData &data, Values &values)
 This function writes a "Bundle Adjustment in the Large" (BAL) file from a SfmData structure and a value structure (measurements are the same as the SfM input data, while camera poses and values are read from Values) More...
 
Pose3 gtsam::openGL2gtsam (const Rot3 &R, double tx, double ty, double tz)
 This function converts an openGL camera pose to an GTSAM camera pose. More...
 
Pose3 gtsam::gtsam2openGL (const Rot3 &R, double tx, double ty, double tz)
 This function converts a GTSAM camera pose to an openGL camera pose. More...
 
Pose3 gtsam::gtsam2openGL (const Pose3 &PoseGTSAM)
 This function converts a GTSAM camera pose to an openGL camera pose. More...
 
Values gtsam::initialCamerasEstimate (const SfmData &db)
 This function creates initial values for cameras from db. More...
 
Values gtsam::initialCamerasAndPointsEstimate (const SfmData &db)
 This function creates initial values for cameras and points from db. More...
 
BetweenFactorPose2s gtsam::parse2DFactors (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model, size_t maxIndex)
 
BetweenFactorPose3s gtsam::parse3DFactors (const std::string &filename, const noiseModel::Diagonal::shared_ptr &model, size_t maxIndex)
 

Detailed Description

utility functions for loading datasets

Date
Jan 22, 2010
Author
Ni Kai
Luca Carlone
Varun Agrawal