Public Types | Public Member Functions | Protected Attributes | Private Types | Private Member Functions | Friends | List of all members
gtsam::SmartProjectionPoseFactor< CALIBRATION > Class Template Reference

#include <SmartProjectionPoseFactor.h>

Inheritance diagram for gtsam::SmartProjectionPoseFactor< CALIBRATION >:
Inheritance graph
[legend]

Public Types

typedef boost::shared_ptr< Thisshared_ptr
 shorthand for a smart pointer to a factor More...
 
- Public Types inherited from gtsam::SmartProjectionFactor< PinholePose< CALIBRATION > >
typedef CameraSet< PinholePose< CALIBRATION > > Cameras
 shorthand for a set of cameras More...
 
typedef boost::shared_ptr< Thisshared_ptr
 shorthand for a smart pointer to a factor More...
 
- Public Types inherited from gtsam::SmartFactorBase< PinholePose< CALIBRATION > >
typedef CameraSet< PinholePose< CALIBRATION > > Cameras
 We use the new CameraSte data structure to refer to a set of cameras. More...
 
typedef std::vector< MatrixZD, Eigen::aligned_allocator< MatrixZD > > FBlocks
 
typedef Eigen::Matrix< double, ZDim, DimMatrixZD
 
- Public Types inherited from gtsam::NonlinearFactor
typedef boost::shared_ptr< Thisshared_ptr
 
- Public Types inherited from gtsam::Factor
typedef KeyVector::const_iterator const_iterator
 Const iterator over keys. More...
 
typedef KeyVector::iterator iterator
 Iterator over keys. More...
 

Public Member Functions

const boost::shared_ptr< CALIBRATION > calibration () const
 
Base::Cameras cameras (const Values &values) const override
 
bool equals (const NonlinearFactor &p, double tol=1e-9) const override
 equals More...
 
double error (const Values &values) const override
 
void print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
 
 SmartProjectionPoseFactor ()
 
 SmartProjectionPoseFactor (const SharedNoiseModel &sharedNoiseModel, const boost::shared_ptr< CALIBRATION > K, const SmartProjectionParams &params=SmartProjectionParams())
 
 SmartProjectionPoseFactor (const SharedNoiseModel &sharedNoiseModel, const boost::shared_ptr< CALIBRATION > K, const boost::optional< Pose3 > body_P_sensor, const SmartProjectionParams &params=SmartProjectionParams())
 
 ~SmartProjectionPoseFactor () override
 
- Public Member Functions inherited from gtsam::SmartProjectionFactor< PinholePose< CALIBRATION > >
void computeJacobiansWithTriangulatedPoint (std::vector< typename Base::MatrixZD, Eigen::aligned_allocator< typename Base::MatrixZD > > &Fblocks, Matrix &E, Vector &b, const Cameras &cameras) const
 
boost::shared_ptr< RegularHessianFactor< Base::Dim > > createHessianFactor (const Cameras &cameras, const double lambda=0.0, bool diagonalDamping=false) const
 linearize returns a Hessianfactor that is an approximation of error(p) More...
 
boost::shared_ptr< JacobianFactorQ< Base::Dim, 2 > > createJacobianQFactor (const Cameras &cameras, double lambda) const
 create factor More...
 
boost::shared_ptr< JacobianFactorQ< Base::Dim, 2 > > createJacobianQFactor (const Values &values, double lambda) const
 Create a factor, takes values. More...
 
boost::shared_ptr< JacobianFactorcreateJacobianSVDFactor (const Cameras &cameras, double lambda) const
 different (faster) way to compute Jacobian factor More...
 
boost::shared_ptr< RegularImplicitSchurFactor< PinholePose< CALIBRATION > > > createRegularImplicitSchurFactor (const Cameras &cameras, double lambda) const
 
bool decideIfTriangulate (const Cameras &cameras) const
 Check if the new linearization point is the same as the one used for previous triangulation. More...
 
bool equals (const NonlinearFactor &p, double tol=1e-9) const override
 equals More...
 
double error (const Values &values) const override
 Calculate total reprojection error. More...
 
bool isDegenerate () const
 
bool isFarPoint () const
 
bool isOutlier () const
 
bool isPointBehindCamera () const
 
bool isValid () const
 Is result valid? More...
 
boost::shared_ptr< GaussianFactorlinearize (const Values &values) const override
 linearize More...
 
boost::shared_ptr< GaussianFactorlinearizeDamped (const Cameras &cameras, const double lambda=0.0) const
 
boost::shared_ptr< GaussianFactorlinearizeDamped (const Values &values, const double lambda=0.0) const
 
virtual boost::shared_ptr< RegularHessianFactor< Base::Dim > > linearizeToHessian (const Values &values, double lambda=0.0) const
 linearize to a Hessianfactor More...
 
virtual boost::shared_ptr< RegularImplicitSchurFactor< PinholePose< CALIBRATION > > > linearizeToImplicit (const Values &values, double lambda=0.0) const
 linearize to an Implicit Schur factor More...
 
virtual boost::shared_ptr< JacobianFactorQ< Base::Dim, 2 > > linearizeToJacobian (const Values &values, double lambda=0.0) const
 linearize to a JacobianfactorQ More...
 
TriangulationResult point () const
 
TriangulationResult point (const Values &values) const
 
void print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
 
Vector reprojectionErrorAfterTriangulation (const Values &values) const
 Calculate vector of re-projection errors, before applying noise model. More...
 
 SmartProjectionFactor ()
 
 SmartProjectionFactor (const SharedNoiseModel &sharedNoiseModel, const SmartProjectionParams &params=SmartProjectionParams())
 
double totalReprojectionError (const Cameras &cameras, boost::optional< Point3 > externalPoint=boost::none) const
 
bool triangulateAndComputeE (Matrix &E, const Cameras &cameras) const
 
bool triangulateAndComputeE (Matrix &E, const Values &values) const
 
bool triangulateAndComputeJacobians (std::vector< typename Base::MatrixZD, Eigen::aligned_allocator< typename Base::MatrixZD > > &Fblocks, Matrix &E, Vector &b, const Values &values) const
 Version that takes values, and creates the point. More...
 
bool triangulateAndComputeJacobiansSVD (std::vector< typename Base::MatrixZD, Eigen::aligned_allocator< typename Base::MatrixZD > > &Fblocks, Matrix &Enull, Vector &b, const Values &values) const
 takes values More...
 
bool triangulateForLinearize (const Cameras &cameras) const
 triangulate More...
 
TriangulationResult triangulateSafe (const Cameras &cameras) const
 triangulateSafe More...
 
 ~SmartProjectionFactor () override
 
- Public Member Functions inherited from gtsam::SmartFactorBase< PinholePose< CALIBRATION > >
void add (const Z &measured, const Key &key)
 
void add (const ZVector &measurements, const KeyVector &cameraKeys)
 
void add (const SFM_TRACK &trackToAdd)
 
Pose3 body_P_sensor () const
 
void computeJacobians (FBlocks &Fs, Matrix &E, Vector &b, const Cameras &cameras, const POINT &point) const
 
void computeJacobiansSVD (FBlocks &Fs, Matrix &Enull, Vector &b, const Cameras &cameras, const POINT &point) const
 SVD version. More...
 
virtual void correctForMissingMeasurements (const Cameras &cameras, Vector &ue, boost::optional< typename Cameras::FBlocks & > Fs=boost::none, boost::optional< Matrix & > E=boost::none) const
 
boost::shared_ptr< RegularHessianFactor< Dim > > createHessianFactor (const Cameras &cameras, const Point3 &point, const double lambda=0.0, bool diagonalDamping=false) const
 Linearize to a Hessianfactor. More...
 
boost::shared_ptr< JacobianFactorQ< Dim, ZDim > > createJacobianQFactor (const Cameras &cameras, const Point3 &point, double lambda=0.0, bool diagonalDamping=false) const
 
boost::shared_ptr< JacobianFactorcreateJacobianSVDFactor (const Cameras &cameras, const Point3 &point, double lambda=0.0) const
 
boost::shared_ptr< RegularImplicitSchurFactor< PinholePose< CALIBRATION > > > createRegularImplicitSchurFactor (const Cameras &cameras, const Point3 &point, double lambda=0.0, bool diagonalDamping=false) const
 Return Jacobians as RegularImplicitSchurFactor with raw access. More...
 
size_t dim () const override
 get the dimension (number of rows!) of the factor More...
 
const ZVectormeasured () const
 
 SmartFactorBase ()
 Default Constructor, for serialization. More...
 
 SmartFactorBase (const SharedNoiseModel &sharedNoiseModel, boost::optional< Pose3 > body_P_sensor=boost::none, size_t expectedNumberCameras=10)
 Constructor. More...
 
double totalReprojectionError (const Cameras &cameras, const POINT &point) const
 
Vector unwhitenedError (const Cameras &cameras, const POINT &point, boost::optional< typename Cameras::FBlocks & > Fs=boost::none, boost::optional< Matrix & > E=boost::none) const
 
void updateAugmentedHessian (const Cameras &cameras, const Point3 &point, const double lambda, bool diagonalDamping, SymmetricBlockMatrix &augmentedHessian, const KeyVector allKeys) const
 
Vector whitenedError (const Cameras &cameras, const POINT &point) const
 
void whitenJacobians (FBlocks &F, Matrix &E, Vector &b) const
 Whiten the Jacobians computed by computeJacobians using noiseModel_. More...
 
 ~SmartFactorBase () override
 Virtual destructor, subclasses from NonlinearFactor. More...
 
- Public Member Functions inherited from gtsam::NonlinearFactor
 NonlinearFactor ()
 
template<typename CONTAINER >
 NonlinearFactor (const CONTAINER &keys)
 
virtual ~NonlinearFactor ()
 
virtual bool active (const Values &) const
 
virtual shared_ptr clone () const
 
shared_ptr rekey (const std::map< Key, Key > &rekey_mapping) const
 
shared_ptr rekey (const KeyVector &new_keys) const
 
- Public Member Functions inherited from gtsam::Factor
virtual ~Factor ()=default
 Default destructor. More...
 
Key front () const
 First key. More...
 
Key back () const
 Last key. More...
 
const_iterator find (Key key) const
 find More...
 
const KeyVectorkeys () const
 Access the factor's involved variable keys. More...
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
virtual void printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const
 print only keys More...
 
KeyVectorkeys ()
 
iterator begin ()
 
iterator end ()
 

Protected Attributes

boost::shared_ptr< CALIBRATION > K_
 calibration object (one for all cameras) More...
 
- Protected Attributes inherited from gtsam::SmartProjectionFactor< PinholePose< CALIBRATION > >
SmartProjectionParams params_
 
TriangulationResult result_
 result from triangulateSafe More...
 
std::vector< Pose3, Eigen::aligned_allocator< Pose3 > > cameraPosesTriangulation_
 
- Protected Attributes inherited from gtsam::SmartFactorBase< PinholePose< CALIBRATION > >
boost::optional< Pose3body_P_sensor_
 Pose of the camera in the body frame. More...
 
FBlocks Fs
 
ZVector measured_
 
SharedIsotropic noiseModel_
 
- Protected Attributes inherited from gtsam::Factor
KeyVector keys_
 The keys involved in this factor. More...
 

Private Types

typedef SmartProjectionFactor< CameraBase
 
typedef PinholePose< CALIBRATION > Camera
 
typedef SmartProjectionPoseFactor< CALIBRATION > This
 

Private Member Functions

template<class ARCHIVE >
void serialize (ARCHIVE &ar, const unsigned int)
 

Friends

class boost::serialization::access
 Serialization function. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from gtsam::SmartFactorBase< PinholePose< CALIBRATION > >
static void FillDiagonalF (const FBlocks &Fs, Matrix &F)
 Create BIG block-diagonal matrix F from Fblocks. More...
 
static Matrix PointCov (Matrix &E)
 Computes Point Covariance P from E. More...
 
- Public Attributes inherited from gtsam::SmartFactorBase< PinholePose< CALIBRATION > >
GTSAM_MAKE_ALIGNED_OPERATOR_NEW typedef boost::shared_ptr< Thisshared_ptr
 shorthand for a smart pointer to a factor More...
 
- Static Public Attributes inherited from gtsam::SmartFactorBase< PinholePose< CALIBRATION > >
static const int Dim
 Camera dimension. More...
 
static const int ZDim
 Measurement dimension. More...
 
- Protected Types inherited from gtsam::NonlinearFactor
typedef Factor Base
 
typedef NonlinearFactor This
 
- Protected Member Functions inherited from gtsam::Factor
 Factor ()
 
template<typename CONTAINER >
 Factor (const CONTAINER &keys)
 
template<typename ITERATOR >
 Factor (ITERATOR first, ITERATOR last)
 
bool equals (const This &other, double tol=1e-9) const
 check equality More...
 
- Static Protected Member Functions inherited from gtsam::Factor
template<typename CONTAINER >
static Factor FromKeys (const CONTAINER &keys)
 
template<typename ITERATOR >
static Factor FromIterators (ITERATOR first, ITERATOR last)
 

Detailed Description

template<class CALIBRATION>
class gtsam::SmartProjectionPoseFactor< CALIBRATION >

Definition at line 45 of file SmartProjectionPoseFactor.h.

Member Typedef Documentation

template<class CALIBRATION >
typedef SmartProjectionFactor<Camera> gtsam::SmartProjectionPoseFactor< CALIBRATION >::Base
private

Definition at line 50 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
typedef PinholePose<CALIBRATION> gtsam::SmartProjectionPoseFactor< CALIBRATION >::Camera
private

Definition at line 49 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
typedef boost::shared_ptr<This> gtsam::SmartProjectionPoseFactor< CALIBRATION >::shared_ptr

shorthand for a smart pointer to a factor

Definition at line 60 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
typedef SmartProjectionPoseFactor<CALIBRATION> gtsam::SmartProjectionPoseFactor< CALIBRATION >::This
private

Definition at line 51 of file SmartProjectionPoseFactor.h.

Constructor & Destructor Documentation

template<class CALIBRATION >
gtsam::SmartProjectionPoseFactor< CALIBRATION >::SmartProjectionPoseFactor ( )
inline

Default constructor, only for serialization

Definition at line 65 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
gtsam::SmartProjectionPoseFactor< CALIBRATION >::SmartProjectionPoseFactor ( const SharedNoiseModel sharedNoiseModel,
const boost::shared_ptr< CALIBRATION >  K,
const SmartProjectionParams params = SmartProjectionParams() 
)
inline

Constructor

Parameters
sharedNoiseModelisotropic noise model for the 2D feature measurements
K(fixed) calibration, assumed to be the same for all cameras
paramsparameters for the smart projection factors

Definition at line 73 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
gtsam::SmartProjectionPoseFactor< CALIBRATION >::SmartProjectionPoseFactor ( const SharedNoiseModel sharedNoiseModel,
const boost::shared_ptr< CALIBRATION >  K,
const boost::optional< Pose3 body_P_sensor,
const SmartProjectionParams params = SmartProjectionParams() 
)
inline

Constructor

Parameters
sharedNoiseModelisotropic noise model for the 2D feature measurements
K(fixed) calibration, assumed to be the same for all cameras
body_P_sensorpose of the camera in the body frame (optional)
paramsparameters for the smart projection factors

Definition at line 87 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
gtsam::SmartProjectionPoseFactor< CALIBRATION >::~SmartProjectionPoseFactor ( )
inlineoverride

Virtual destructor

Definition at line 97 of file SmartProjectionPoseFactor.h.

Member Function Documentation

template<class CALIBRATION >
const boost::shared_ptr<CALIBRATION> gtsam::SmartProjectionPoseFactor< CALIBRATION >::calibration ( ) const
inline

return calibration shared pointers

Definition at line 129 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
Base::Cameras gtsam::SmartProjectionPoseFactor< CALIBRATION >::cameras ( const Values values) const
inlineoverridevirtual

Collect all cameras involved in this factor

Parameters
valuesValues structure which must contain camera poses corresponding to keys involved in this factor
Returns
vector of Values

Reimplemented from gtsam::SmartFactorBase< PinholePose< CALIBRATION > >.

Definition at line 139 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
bool gtsam::SmartProjectionPoseFactor< CALIBRATION >::equals ( const NonlinearFactor p,
double  tol = 1e-9 
) const
inlineoverridevirtual

equals

Reimplemented from gtsam::NonlinearFactor.

Definition at line 112 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
double gtsam::SmartProjectionPoseFactor< CALIBRATION >::error ( const Values values) const
inlineoverridevirtual

error calculates the error of the factor.

Implements gtsam::NonlinearFactor.

Definition at line 120 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
void gtsam::SmartProjectionPoseFactor< CALIBRATION >::print ( const std::string &  s = "",
const KeyFormatter keyFormatter = DefaultKeyFormatter 
) const
inlineoverridevirtual

print

Parameters
soptional string naming the factor
keyFormatteroptional formatter useful for printing Symbols

Reimplemented from gtsam::NonlinearFactor.

Definition at line 105 of file SmartProjectionPoseFactor.h.

template<class CALIBRATION >
template<class ARCHIVE >
void gtsam::SmartProjectionPoseFactor< CALIBRATION >::serialize ( ARCHIVE &  ar,
const unsigned int   
)
inlineprivate

Definition at line 155 of file SmartProjectionPoseFactor.h.

Friends And Related Function Documentation

template<class CALIBRATION >
friend class boost::serialization::access
friend

Serialization function.

Definition at line 153 of file SmartProjectionPoseFactor.h.

Member Data Documentation

template<class CALIBRATION >
boost::shared_ptr<CALIBRATION> gtsam::SmartProjectionPoseFactor< CALIBRATION >::K_
protected

calibration object (one for all cameras)

Definition at line 55 of file SmartProjectionPoseFactor.h.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:58:29