gtsam  3.2.1
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gtsam::PinholeCamera< Calibration > Class Template Reference
+ Inheritance diagram for gtsam::PinholeCamera< Calibration >:

Manifold

PinholeCamera retract (const Vector &d) const
 move a cameras according to d
 
Vector localCoordinates (const PinholeCamera &T2) const
 return canonical coordinate
 
size_t dim () const
 Manifold dimension.
 
static size_t Dim ()
 Manifold dimension.
 

Transformations and measurement functions

std::pair< Point2, bool > projectSafe (const Point3 &pw) const
 Project a point into the image and check depth.
 
Point2 project (const Point3 &pw, boost::optional< Matrix & > Dpose=boost::none, boost::optional< Matrix & > Dpoint=boost::none, boost::optional< Matrix & > Dcal=boost::none) const
 project a point from world coordinate to the image More...
 
Point2 projectPointAtInfinity (const Point3 &pw, boost::optional< Matrix & > Dpose=boost::none, boost::optional< Matrix & > Dpoint=boost::none, boost::optional< Matrix & > Dcal=boost::none) const
 project a point at infinity from world coordinate to the image More...
 
Point2 project2 (const Point3 &pw, boost::optional< Matrix & > Dcamera=boost::none, boost::optional< Matrix & > Dpoint=boost::none) const
 project a point from world coordinate to the image More...
 
Point3 backproject (const Point2 &p, double depth) const
 backproject a 2-dimensional point to a 3-dimensional point at given depth
 
Point3 backprojectPointAtInfinity (const Point2 &p) const
 backproject a 2-dimensional point to a 3-dimensional point at infinity
 
double range (const Point3 &point, boost::optional< Matrix & > Dpose=boost::none, boost::optional< Matrix & > Dpoint=boost::none) const
 Calculate range to a landmark. More...
 
double range (const Pose3 &pose, boost::optional< Matrix & > Dpose=boost::none, boost::optional< Matrix & > Dpose2=boost::none) const
 Calculate range to another pose. More...
 
template<class CalibrationB >
double range (const PinholeCamera< CalibrationB > &camera, boost::optional< Matrix & > Dpose=boost::none, boost::optional< Matrix & > Dother=boost::none) const
 Calculate range to another camera. More...
 
double range (const CalibratedCamera &camera, boost::optional< Matrix & > Dpose=boost::none, boost::optional< Matrix & > Dother=boost::none) const
 Calculate range to another camera. More...
 
static Point2 project_to_camera (const Point3 &P, boost::optional< Matrix & > Dpoint=boost::none)
 projects a 3-dimensional point in camera coordinates into the camera and returns a 2-dimensional point, no calibration applied More...
 

Advanced Interface

class boost::serialization::access
 Serialization function.
 

Public Member Functions

Standard Constructors
 PinholeCamera ()
 default constructor
 
 PinholeCamera (const Pose3 &pose)
 constructor with pose
 
 PinholeCamera (const Pose3 &pose, const Calibration &K)
 constructor with pose and calibration
 
Advanced Constructors
 PinholeCamera (const Vector &v)
 
 PinholeCamera (const Vector &v, const Vector &K)
 
Testable
bool equals (const PinholeCamera &camera, double tol=1e-9) const
 assert equality up to a tolerance
 
void print (const std::string &s="PinholeCamera") const
 print
 
Standard Interface
virtual ~PinholeCamera ()
 
Pose3pose ()
 return pose
 
const Pose3pose () const
 return pose
 
Calibration & calibration ()
 return calibration
 
const Calibration & calibration () const
 return calibration
 
Group ?? Frank says this might not make sense
const PinholeCamera compose (const PinholeCamera &c, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const
 compose two cameras: TODO Frank says this might not make sense
 
const PinholeCamera between (const PinholeCamera &c, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const
 between two cameras: TODO Frank says this might not make sense
 
const PinholeCamera inverse (boost::optional< Matrix & > H1=boost::none) const
 inverse camera: TODO Frank says this might not make sense
 
const PinholeCamera compose (const Pose3 &c) const
 compose two cameras: TODO Frank says this might not make sense
 
- Public Member Functions inherited from gtsam::DerivedValue< PinholeCamera< Calibration > >
virtual Valueclone_ () const
 Create a duplicate object returned as a pointer to the generic Value interface. More...
 
virtual void deallocate_ () const
 Destroy and deallocate this object, only if it was originally allocated using clone_().
 
virtual boost::shared_ptr< Valueclone () const
 Clone this value (normal clone on the heap, delete with 'delete' operator)
 
virtual bool equals_ (const Value &p, double tol=1e-9) const
 equals implementing generic Value interface
 
virtual Valueretract_ (const Vector &delta) const
 Generic Value interface version of retract.
 
virtual Vector localCoordinates_ (const Value &value2) const
 Generic Value interface version of localCoordinates.
 
virtual Valueoperator= (const Value &rhs)
 Assignment operator.
 
 operator const PinholeCamera< Calibration > & () const
 Conversion to the derived class.
 
 operator PinholeCamera< Calibration > & ()
 Conversion to the derived class.
 
- Public Member Functions inherited from gtsam::Value
virtual ~Value ()
 Virutal destructor.
 

Static Public Member Functions

Named Constructors
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...
 

Additional Inherited Members

- Protected Member Functions inherited from gtsam::DerivedValue< PinholeCamera< Calibration > >
DerivedValue< PinholeCamera
< Calibration > > & 
operator= (const DerivedValue< PinholeCamera< Calibration > > &rhs)
 Assignment operator, protected because only the Value or DERIVED assignment operators should be used. More...
 

Member Function Documentation

template<typename Calibration>
static PinholeCamera gtsam::PinholeCamera< Calibration >::Level ( const Calibration &  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
template<typename Calibration>
static PinholeCamera gtsam::PinholeCamera< Calibration >::Lookat ( const Point3 eye,
const Point3 target,
const Point3 upVector,
const Calibration &  K = Calibration() 
)
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
template<typename Calibration>
Point2 gtsam::PinholeCamera< Calibration >::project ( const Point3 pw,
boost::optional< Matrix & >  Dpose = boost::none,
boost::optional< Matrix & >  Dpoint = boost::none,
boost::optional< Matrix & >  Dcal = boost::none 
) const
inline

project a point from world coordinate to the image

Parameters
pwis a point in world coordinates
Dposeis the Jacobian w.r.t. pose3
Dpointis the Jacobian w.r.t. point3
Dcalis the Jacobian w.r.t. calibration
template<typename Calibration>
Point2 gtsam::PinholeCamera< Calibration >::project2 ( const Point3 pw,
boost::optional< Matrix & >  Dcamera = boost::none,
boost::optional< Matrix & >  Dpoint = boost::none 
) const
inline

project a point from world coordinate to the image

Parameters
pwis a point in the world coordinate
Dcamerais the Jacobian w.r.t. [pose3 calibration]
Dpointis the Jacobian w.r.t. point3
template<typename Calibration>
static Point2 gtsam::PinholeCamera< Calibration >::project_to_camera ( const Point3 P,
boost::optional< Matrix & >  Dpoint = boost::none 
)
inlinestatic

projects a 3-dimensional point in camera coordinates into the camera and returns a 2-dimensional point, no calibration applied

Parameters
PA point in camera coordinates
Dpointis the 2*3 Jacobian w.r.t. P
template<typename Calibration>
Point2 gtsam::PinholeCamera< Calibration >::projectPointAtInfinity ( const Point3 pw,
boost::optional< Matrix & >  Dpose = boost::none,
boost::optional< Matrix & >  Dpoint = boost::none,
boost::optional< Matrix & >  Dcal = boost::none 
) const
inline

project a point at infinity from world coordinate to the image

Parameters
pwis a point in the world coordinate (it is pw = lambda*[pw_x pw_y pw_z] with lambda->inf)
Dposeis the Jacobian w.r.t. pose3
Dpointis the Jacobian w.r.t. point3
Dcalis the Jacobian w.r.t. calibration
template<typename Calibration>
double gtsam::PinholeCamera< Calibration >::range ( const Point3 point,
boost::optional< Matrix & >  Dpose = boost::none,
boost::optional< Matrix & >  Dpoint = boost::none 
) const
inline

Calculate range to a landmark.

Parameters
point3D location of landmark
Dposethe optionally computed Jacobian with respect to pose
Dpointthe optionally computed Jacobian with respect to the landmark
Returns
range (double)
template<typename Calibration>
double gtsam::PinholeCamera< Calibration >::range ( const Pose3 pose,
boost::optional< Matrix & >  Dpose = boost::none,
boost::optional< Matrix & >  Dpose2 = boost::none 
) const
inline

Calculate range to another pose.

Parameters
poseOther SO(3) pose
Dposethe optionally computed Jacobian with respect to pose
Dpose2the optionally computed Jacobian with respect to the other pose
Returns
range (double)
template<typename Calibration>
template<class CalibrationB >
double gtsam::PinholeCamera< Calibration >::range ( const PinholeCamera< CalibrationB > &  camera,
boost::optional< Matrix & >  Dpose = boost::none,
boost::optional< Matrix & >  Dother = boost::none 
) const
inline

Calculate range to another camera.

Parameters
cameraOther camera
Dposethe optionally computed Jacobian with respect to pose
Dotherthe optionally computed Jacobian with respect to the other camera
Returns
range (double)
template<typename Calibration>
double gtsam::PinholeCamera< Calibration >::range ( const CalibratedCamera camera,
boost::optional< Matrix & >  Dpose = boost::none,
boost::optional< Matrix & >  Dother = boost::none 
) const
inline

Calculate range to another camera.

Parameters
cameraOther camera
Dposethe optionally computed Jacobian with respect to pose
Dotherthe optionally computed Jacobian with respect to the other camera
Returns
range (double)

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