gtsam
Loading...
Searching...
No Matches
gtsam::PinholeBaseK< CALIBRATION > Class Template Referenceabstract

Detailed Description

template<typename CALIBRATION>
class gtsam::PinholeBaseK< CALIBRATION >

A pinhole camera class that has a Pose3 and a fixed Calibration.

Inheritance diagram for gtsam::PinholeBaseK< CALIBRATION >:

Standard Constructors

 PinholeBaseK ()
 default constructor
 PinholeBaseK (const Pose3 &pose)
 constructor with pose

Advanced Constructors

 PinholeBaseK (const Vector &v)

Standard Interface

virtual const CALIBRATION & calibration () const =0
 return calibration

Transformations and measurement functions

std::pair< Point2, bool > projectSafe (const Point3 &pw) const
 Project a point into the image and check depth.
template<class POINT>
Point2 _project (const POINT &pw, OptionalJacobian< 2, 6 > Dpose, OptionalJacobian< 2, FixedDimension< POINT >::value > Dpoint, OptionalJacobian< 2, DimK > Dcal) const
 Templated projection of a point (possibly at infinity) from world coordinate to the image.
Point2 project (const Point3 &pw, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 3 > Dpoint={}, OptionalJacobian< 2, DimK > Dcal={}) const
 project a 3D point from world coordinates into the image
Point2 reprojectionError (const Point3 &pw, const Point2 &measured, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 3 > Dpoint={}, OptionalJacobian< 2, DimK > Dcal={}) const
 project a 3D point from world coordinates into the image
Point2 project (const Unit3 &pw, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 2 > Dpoint={}, OptionalJacobian< 2, DimK > Dcal={}) const
 project a point at infinity from world coordinates into the image
Point3 backproject (const Point2 &p, double depth, OptionalJacobian< 3, 6 > Dresult_dpose={}, OptionalJacobian< 3, 2 > Dresult_dp={}, OptionalJacobian< 3, 1 > Dresult_ddepth={}, OptionalJacobian< 3, DimK > Dresult_dcal={}) const
 backproject a 2-dimensional point to a 3-dimensional point at given depth
Unit3 backprojectPointAtInfinity (const Point2 &p) const
 backproject a 2-dimensional point to a 3-dimensional point at infinity
double range (const Point3 &point, OptionalJacobian< 1, 6 > Dcamera={}, OptionalJacobian< 1, 3 > Dpoint={}) const
 Calculate range to a landmark.
double range (const Pose3 &pose, OptionalJacobian< 1, 6 > Dcamera={}, OptionalJacobian< 1, 6 > Dpose={}) const
 Calculate range to another pose.
double range (const CalibratedCamera &camera, OptionalJacobian< 1, 6 > Dcamera={}, OptionalJacobian< 1, 6 > Dother={}) const
 Calculate range to a CalibratedCamera.
template<class CalibrationB>
double range (const PinholeBaseK< CalibrationB > &camera, OptionalJacobian< 1, 6 > Dcamera={}, OptionalJacobian< 1, 6 > Dother={}) const
 Calculate range to a PinholePoseK derived class.

Public Types

typedef CALIBRATION CalibrationType
Public Types inherited from gtsam::PinholeBase
using Rotation = Rot3
 Pose Concept requirements.
using Translation = Point3
using Measurement = Point2
 Some classes template on either PinholeCamera or StereoCamera, and this typedef informs those classes what "project" returns.
using MeasurementVector = Point2Vector

Additional Inherited Members

std::pair< Point2, bool > projectSafe (const Point3 &pw) const
 Project a point into the image and check depth.
Point2 project2 (const Point3 &point, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 3 > Dpoint={}) const
 Project point into the image Throws a CheiralityException if point behind image plane iff GTSAM_THROW_CHEIRALITY_EXCEPTION.
Point2 project2 (const Unit3 &point, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 2 > Dpoint={}) const
 Project point at infinity into the image Throws a CheiralityException if point behind image plane iff GTSAM_THROW_CHEIRALITY_EXCEPTION.
 PinholeBase ()
 Default constructor.
 PinholeBase (const Pose3 &pose)
 Constructor with pose.
 PinholeBase (const Vector &v)
virtual ~PinholeBase ()=default
 Default destructor.
bool equals (const PinholeBase &camera, double tol=1e-9) const
 assert equality up to a tolerance
virtual void print (const std::string &s="PinholeBase") const
 print
const Pose3 & pose () const
 return pose, constant version
const Rot3 & rotation () const
 get rotation
const Point3 & translation () const
 get translation
const Pose3 & getPose (OptionalJacobian< 6, 6 > H) const
 return pose, with derivative
static Pose3 LevelPose (const Pose2 &pose2, double height)
 Create a level pose at the given 2D pose and height.
static Pose3 LookatPose (const Point3 &eye, const Point3 &target, const Point3 &upVector)
 Create a camera pose at the given eye position looking at a target point in the scene with the specified up direction vector.
static Point2 Project (const Point3 &pc, OptionalJacobian< 2, 3 > Dpoint={})
 Project from 3D point in camera coordinates into image Does not throw a CheiralityException, even if pc behind image plane.
static Point2 Project (const Unit3 &pc, OptionalJacobian< 2, 2 > Dpoint={})
 Project from 3D point at infinity in camera coordinates into image Does not throw a CheiralityException, even if pc behind image plane.
static Point3 BackprojectFromCamera (const Point2 &p, const double depth, OptionalJacobian< 3, 2 > Dpoint={}, OptionalJacobian< 3, 1 > Ddepth={})
 backproject a 2-dimensional point to a 3-dimensional point at given depth
static std::pair< size_t, size_t > TranslationInterval ()
 Return the start and end indices (inclusive) of the translation component of the exponential map parameterization.
static Matrix26 Dpose (const Point2 &pn, double d)
 Calculate Jacobian with respect to pose.
static Matrix23 Dpoint (const Point2 &pn, double d, const Matrix3 &Rt)
 Calculate Jacobian with respect to point.

Member Function Documentation

◆ _project()

template<typename CALIBRATION>
template<class POINT>
Point2 gtsam::PinholeBaseK< CALIBRATION >::_project ( const POINT & pw,
OptionalJacobian< 2, 6 > Dpose,
OptionalJacobian< 2, FixedDimension< POINT >::value > Dpoint,
OptionalJacobian< 2, DimK > Dcal ) const
inline

Templated projection of a point (possibly at infinity) from world coordinate to the image.

Parameters
pwis a 3D point or a Unit3 (point at infinity) in world coordinates
Dposeis the Jacobian w.r.t. pose3
Dpointis the Jacobian w.r.t. point3
Dcalis the Jacobian w.r.t. calibration

◆ calibration()

◆ range() [1/4]

template<typename CALIBRATION>
double gtsam::PinholeBaseK< CALIBRATION >::range ( const CalibratedCamera & camera,
OptionalJacobian< 1, 6 > Dcamera = {},
OptionalJacobian< 1, 6 > Dother = {} ) const
inline

Calculate range to a CalibratedCamera.

Parameters
cameraOther camera
Returns
range (double)

◆ range() [2/4]

template<typename CALIBRATION>
template<class CalibrationB>
double gtsam::PinholeBaseK< CALIBRATION >::range ( const PinholeBaseK< CalibrationB > & camera,
OptionalJacobian< 1, 6 > Dcamera = {},
OptionalJacobian< 1, 6 > Dother = {} ) const
inline

Calculate range to a PinholePoseK derived class.

Parameters
cameraOther camera
Returns
range (double)

◆ range() [3/4]

template<typename CALIBRATION>
double gtsam::PinholeBaseK< CALIBRATION >::range ( const Point3 & point,
OptionalJacobian< 1, 6 > Dcamera = {},
OptionalJacobian< 1, 3 > Dpoint = {} ) const
inline

Calculate range to a landmark.

Parameters
point3D location of landmark
Returns
range (double)

◆ range() [4/4]

template<typename CALIBRATION>
double gtsam::PinholeBaseK< CALIBRATION >::range ( const Pose3 & pose,
OptionalJacobian< 1, 6 > Dcamera = {},
OptionalJacobian< 1, 6 > Dpose = {} ) const
inline

Calculate range to another pose.

Parameters
poseOther SO(3) pose
Returns
range (double)

The documentation for this class was generated from the following file:
  • /tmp/gtsam-4.3.0-doxygen.rsXPUS/source/gtsam/geometry/PinholePose.h