GTSAM
4.0.2
C++ library for smoothing and mapping (SAM)
|
SfmData stores a bunch of SfmTracks. More...
#include <SfmData.h>
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) More... | |
NonlinearFactorGraph | sfmFactorGraph (const SharedNoiseModel &model=noiseModel::Isotropic::Sigma(2, 1.0), std::optional< size_t > fixedCamera=0, std::optional< size_t > fixedPoint=0) const |
Create factor graph with projection factors and gauge fix. More... | |
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. More... | |
static SfmData | FromBalFile (const std::string &filename) |
Parse a "Bundle Adjustment in the Large" (BAL) file and return result as SfmData instance. More... | |
Public Attributes | |
std::vector< SfmCamera > | cameras |
Set of cameras. | |
std::vector< SfmTrack > | tracks |
Sparse set of points. | |
SfmData stores a bunch of SfmTracks.
|
static |
Parse a "Bundle Adjustment in the Large" (BAL) file and return result as SfmData instance.
filename | The name of the BAL file. |
|
static |
Parses a bundler output file and return result as SfmData instance.
filename | The name of the bundler file |
data | SfM structure where the data is stored |
NonlinearFactorGraph gtsam::SfmData::generalSfmFactors | ( | const SharedNoiseModel & | model = noiseModel::Isotropic::Sigma(2, 1.0) | ) | const |
Create projection factors using keys i and P(j)
model | a noise model for projection errors |
NonlinearFactorGraph gtsam::SfmData::sfmFactorGraph | ( | const SharedNoiseModel & | model = noiseModel::Isotropic::Sigma(2, 1.0) , |
std::optional< size_t > | fixedCamera = 0 , |
||
std::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).
model | a noise model for projection errors |
fixedCamera | which camera to fix, if any (use std::nullopt if none) |
fixedPoint | which point to fix, if any (use std::nullopt if none) |