gtsam  4.0.0
gtsam
gtsam::SimpleCamera Class Reference

Detailed Description

Deprecated:
: SimpleCamera for backwards compatability with GTSAM 3.x Use PinholeCameraCal3_S2 instead
+ Inheritance diagram for gtsam::SimpleCamera:

Public Member Functions

Standard Constructors
 SimpleCamera ()
 default constructor
 
 SimpleCamera (const Pose3 &pose)
 constructor with pose
 
 SimpleCamera (const Pose3 &pose, const Cal3_S2 &K)
 constructor with pose and calibration
 
Advanced Constructors
 SimpleCamera (const Vector &v)
 Init from vector, can be 6D (default calibration) or dim.
 
 SimpleCamera (const Vector &v, const Vector &K)
 Init from Vector and calibration.
 
SimpleCamera::shared_ptr clone () const
 Copy this object as its actual derived type.
 
Manifold
SimpleCamera retract (const Vector &d) const
 move a cameras according to d
 
- Public Member Functions inherited from gtsam::PinholeCamera< Calibration >
 PinholeCamera ()
 default constructor
 
 PinholeCamera (const Pose3 &pose)
 constructor with pose
 
 PinholeCamera (const Pose3 &pose, const Calibration &K)
 constructor with pose and calibration
 
 PinholeCamera (const Vector &v)
 Init from vector, can be 6D (default calibration) or dim.
 
 PinholeCamera (const Vector &v, const Vector &K)
 Init from Vector and calibration.
 
bool equals (const Base &camera, double tol=1e-9) const
 assert equality up to a tolerance
 
void print (const std::string &s="PinholeCamera") const
 print
 
virtual ~PinholeCamera ()
 
const Pose3pose () const
 return pose
 
const Pose3getPose (OptionalJacobian< 6, dimension > H) const
 return pose, with derivative
 
const Calibration & calibration () const
 return calibration
 
size_t dim () const
 
PinholeCamera retract (const Vector &d) const
 move a cameras according to d
 
VectorK6 localCoordinates (const PinholeCamera &T2) const
 return canonical coordinate
 
template<class POINT >
Point2 _project2 (const POINT &pw, OptionalJacobian< 2, dimension > Dcamera, OptionalJacobian< 2, FixedDimension< POINT >::value > Dpoint) const
 Templated projection of a 3D point or a point at infinity into the image. More...
 
Point2 project2 (const Point3 &pw, OptionalJacobian< 2, dimension > Dcamera=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none) const
 project a 3D point from world coordinates into the image
 
Point2 project2 (const Unit3 &pw, OptionalJacobian< 2, dimension > Dcamera=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none) const
 project a point at infinity from world coordinates into the image
 
double range (const Point3 &point, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 3 > Dpoint=boost::none) const
 Calculate range to a landmark. More...
 
double range (const Pose3 &pose, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 6 > Dpose=boost::none) const
 Calculate range to another pose. More...
 
template<class CalibrationB >
double range (const PinholeCamera< CalibrationB > &camera, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 6+CalibrationB::dimension > Dother=boost::none) const
 Calculate range to another camera. More...
 
double range (const CalibratedCamera &camera, OptionalJacobian< 1, dimension > Dcamera=boost::none, OptionalJacobian< 1, 6 > Dother=boost::none) const
 Calculate range to a calibrated camera. More...
 
- Public Member Functions inherited from gtsam::PinholeBaseK< Calibration >
 PinholeBaseK ()
 default constructor
 
 PinholeBaseK (const Pose3 &pose)
 constructor with pose
 
 PinholeBaseK (const Vector &v)
 
virtual ~PinholeBaseK ()
 
std::pair< Point2, bool > projectSafe (const Point3 &pw) const
 Project a point into the image and check depth.
 
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. More...
 
Point2 project (const Point3 &pw, OptionalJacobian< 2, 6 > Dpose=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none, OptionalJacobian< 2, DimK > Dcal=boost::none) const
 project a 3D point from world coordinates into the image
 
Point2 project (const Unit3 &pw, OptionalJacobian< 2, 6 > Dpose=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none, OptionalJacobian< 2, DimK > Dcal=boost::none) const
 project a point at infinity from world coordinates into the image
 
Point3 backproject (const Point2 &p, double depth, OptionalJacobian< 3, 6 > Dresult_dpose=boost::none, OptionalJacobian< 3, 2 > Dresult_dp=boost::none, OptionalJacobian< 3, 1 > Dresult_ddepth=boost::none, OptionalJacobian< 3, DimK > Dresult_dcal=boost::none) 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=boost::none, OptionalJacobian< 1, 3 > Dpoint=boost::none) const
 Calculate range to a landmark. More...
 
double range (const Pose3 &pose, OptionalJacobian< 1, 6 > Dcamera=boost::none, OptionalJacobian< 1, 6 > Dpose=boost::none) const
 Calculate range to another pose. More...
 
double range (const CalibratedCamera &camera, OptionalJacobian< 1, 6 > Dcamera=boost::none, OptionalJacobian< 1, 6 > Dother=boost::none) const
 Calculate range to a CalibratedCamera. More...
 
double range (const PinholeBaseK< CalibrationB > &camera, OptionalJacobian< 1, 6 > Dcamera=boost::none, OptionalJacobian< 1, 6 > Dother=boost::none) const
 Calculate range to a PinholePoseK derived class. More...
 
- Public Member Functions inherited from gtsam::PinholeBase
 PinholeBase ()
 default constructor
 
 PinholeBase (const Pose3 &pose)
 constructor with pose
 
 PinholeBase (const Vector &v)
 
bool equals (const PinholeBase &camera, double tol=1e-9) const
 assert equality up to a tolerance
 
void print (const std::string &s="PinholeBase") const
 print
 
const Pose3pose () const
 return pose, constant version
 
const Rot3rotation () const
 get rotation
 
const Point3translation () const
 get translation
 
const Pose3getPose (OptionalJacobian< 6, 6 > H) const
 return pose, with derivative
 
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=boost::none, OptionalJacobian< 2, 3 > Dpoint=boost::none) const
 Project point into the image Throws a CheiralityException if point behind image plane iff GTSAM_THROW_CHEIRALITY_EXCEPTION. More...
 
Point2 project2 (const Unit3 &point, OptionalJacobian< 2, 6 > Dpose=boost::none, OptionalJacobian< 2, 2 > Dpoint=boost::none) const
 Project point at infinity into the image Throws a CheiralityException if point behind image plane iff GTSAM_THROW_CHEIRALITY_EXCEPTION. More...
 

Static Public Member Functions

Named Constructors
static SimpleCamera Level (const Cal3_S2 &K, const Pose2 &pose2, double height)
 Create a level camera at the given 2D pose and height. More...
 
static SimpleCamera Level (const Pose2 &pose2, double height)
 PinholeCamera::level with default calibration.
 
static SimpleCamera Lookat (const Point3 &eye, const Point3 &target, const Point3 &upVector, const Cal3_S2 &K=Cal3_S2())
 Create a camera at the given eye position looking at a target point in the scene with the specified up direction vector. More...
 
- Static Public Member Functions inherited from gtsam::PinholeCamera< Calibration >
static PinholeCamera Level (const Calibration &K, const Pose2 &pose2, double height)
 Create a level camera at the given 2D pose and height. More...
 
static PinholeCamera Level (const Pose2 &pose2, double height)
 PinholeCamera::level with default calibration.
 
static PinholeCamera Lookat (const Point3 &eye, const Point3 &target, const Point3 &upVector, const Calibration &K=Calibration())
 Create a camera at the given eye position looking at a target point in the scene with the specified up direction vector. More...
 
static PinholeCamera Create (const Pose3 &pose, const Calibration &K, OptionalJacobian< dimension, 6 > H1=boost::none, OptionalJacobian< dimension, DimK > H2=boost::none)
 
static size_t Dim ()
 
static PinholeCamera identity ()
 for Canonical
 
- Static Public Member Functions inherited from gtsam::PinholeBase
static Pose3 LevelPose (const Pose2 &pose2, double height)
 Create a level pose at the given 2D pose and height. More...
 
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. More...
 
static std::pair< size_t, size_t > translationInterval ()
 Return the start and end indices (inclusive) of the translation component of the exponential map parameterization. More...
 
static Point2 Project (const Point3 &pc, OptionalJacobian< 2, 3 > Dpoint=boost::none)
 Project from 3D point in camera coordinates into image Does not throw a CheiralityException, even if pc behind image plane. More...
 
static Point2 Project (const Unit3 &pc, OptionalJacobian< 2, 2 > Dpoint=boost::none)
 Project from 3D point at infinity in camera coordinates into image Does not throw a CheiralityException, even if pc behind image plane. More...
 
static Point3 BackprojectFromCamera (const Point2 &p, const double depth, OptionalJacobian< 3, 2 > Dpoint=boost::none, OptionalJacobian< 3, 1 > Ddepth=boost::none)
 backproject a 2-dimensional point to a 3-dimensional point at given depth
 

Additional Inherited Members

- Public Types inherited from gtsam::PinholeCamera< Calibration >
enum  { dimension = 6 + DimK }
 
typedef Point2 Measurement
 Some classes template on either PinholeCamera or StereoCamera, and this typedef informs those classes what "project" returns.
 
typedef Point2Vector MeasurementVector
 
typedef Eigen::Matrix< double, dimension, 1 > VectorK6
 
typedef Eigen::Matrix< double, 2, DimK > Matrix2K
 
- Public Types inherited from gtsam::PinholeBaseK< Calibration >
typedef Calibration CalibrationType
 
- Public Types inherited from gtsam::PinholeBase
typedef Rot3 Rotation
 Pose Concept requirements.
 
typedef Point3 Translation
 
typedef Point2 Measurement
 Some classes template on either PinholeCamera or StereoCamera, and this typedef informs those classes what "project" returns.
 
typedef Point2Vector MeasurementVector
 
- Static Protected Member Functions inherited from gtsam::PinholeBase
static Matrix26 Dpose (const Point2 &pn, double d)
 Calculate Jacobian with respect to pose. More...
 
static Matrix23 Dpoint (const Point2 &pn, double d, const Matrix3 &Rt)
 Calculate Jacobian with respect to point. More...
 

Member Function Documentation

◆ Level()

static SimpleCamera gtsam::SimpleCamera::Level ( const Cal3_S2 K,
const Pose2 pose2,
double  height 
)
inlinestatic

Create a level camera at the given 2D pose and height.

Parameters
Kthe calibration
pose2specifies the location and viewing direction (theta 0 = looking in direction of positive X axis)
heightcamera height

◆ Lookat()

static SimpleCamera gtsam::SimpleCamera::Lookat ( const Point3 eye,
const Point3 target,
const Point3 upVector,
const Cal3_S2 K = Cal3_S2() 
)
inlinestatic

Create a camera at the given eye position looking at a target point in the scene with the specified up direction vector.

Parameters
eyespecifies the camera position
targetthe point to look at
upVectorspecifies the camera up direction vector, doesn't need to be on the image plane nor orthogonal to the viewing axis
Koptional calibration parameter

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