Loading...
Searching...
No Matches
gtsam::SfmData Struct Reference
SFM

## Detailed Description

SfmData stores a bunch of SfmTracks.

## Serialization

class | boost::serialization::access
| Serialization function.
template<class Archive>
void | serialize (Archive &ar, const unsigned int)

## Public Member Functions

Standard Interface
void | addTrack (const SfmTrack &t)
| Add a track to SfmData.
void | addCamera (const SfmCamera &cam)
| Add a camera to SfmData.
size_t | numberTracks () const
| The number of reconstructed 3D points.
size_t | numberCameras () const
| The number of cameras.
const SfmTrack & | track (size_t idx) const
| The track formed by series of landmark measurements.
const SfmCamera & | camera (size_t idx) const
| The camera pose at frame index idx.
const std::vector< SfmCamera > & | cameraList () const
| Getters.
const std::vector< SfmTrack > & | trackList () const
NonlinearFactorGraph | generalSfmFactors (const SharedNoiseModel &model=noiseModel::Isotropic::Sigma(2, 1.0)) const
| Create projection factors using keys i and P(j).
NonlinearFactorGraph | sfmFactorGraph (const SharedNoiseModel &model=noiseModel::Isotropic::Sigma(2, 1.0), boost::optional< size_t > fixedCamera=0, boost::optional< size_t > fixedPoint=0) const
| Create factor graph with projection factors and gauge fix.
Testable
void | print (const std::string &s="") const
| print
bool | equals (const SfmData &sfmData, double tol=1e-9) const
| assert equality up to a tolerance

## Static Public Member Functions

Create from file
static SfmData | FromBundlerFile (const std::string &filename)
| Parses a bundler output file and return result as SfmData instance.
static SfmData | FromBalFile (const std::string &filename)
| Parse a "Bundle Adjustment in the Large" (BAL) file and return result as SfmData instance.

## Public Attributes

std::vector< SfmCamera > | cameras
| Set of cameras.
std::vector< SfmTrack > | tracks
| Sparse set of points.

## Member Function Documentation

## FromBalFile()

SfmData gtsam::SfmData::FromBalFile | ( | const std::string & | filename | ) |

static

Parse a "Bundle Adjustment in the Large" (BAL) file and return result as SfmData instance.

Parameters

  filename | The name of the BAL file.

Returns
  SfM structure where the data is stored.

## FromBundlerFile()

SfmData gtsam::SfmData::FromBundlerFile | ( | const std::string & | filename | ) |

static

Parses a bundler output file and return result as SfmData instance.

Parameters

  filename | The name of the bundler file
  data | SfM structure where the data is stored

Returns
  true if the parsing was successful, false otherwise

## generalSfmFactors()

NonlinearFactorGraph gtsam::SfmData::generalSfmFactors | ( | const SharedNoiseModel & | model = noiseModel::Isotropic::Sigma(2, 1.0) | ) | const

Create projection factors using keys i and P(j).

Parameters

  model | a noise model for projection errors

Returns
  NonlinearFactorGraph

## sfmFactorGraph()

NonlinearFactorGraph gtsam::SfmData::sfmFactorGraph | ( | const SharedNoiseModel & | model = noiseModel::Isotropic::Sigma(2, 1.0),
|  | boost::optional< size_t > | fixedCamera = 0,
|  | boost::optional< size_t > | fixedPoint = 0 ) const

Create factor graph with projection factors and gauge fix.

Note: pose keys are simply integer indices, points use Symbol('p', j).

Parameters

  model | a noise model for projection errors
  fixedCamera | which camera to fix, if any (use boost::none if none)
  fixedPoint | which point to fix, if any (use boost::none if none)

Returns
  NonlinearFactorGraph

The documentation for this struct was generated from the following files:

- /build/gtsam-RkN8wG/gtsam-4.2.2+dfsg/gtsam/sfm/SfmData.h
- /build/gtsam-RkN8wG/gtsam-4.2.2+dfsg/gtsam/sfm/SfmData.cpp