GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | List of all members
gtsam::PinholeBase Class Reference

#include <CalibratedCamera.h>

Inheritance diagram for gtsam::PinholeBase:
Inheritance graph
[legend]

Public Types

typedef Rot3 Rotation
 
typedef Point3 Translation
 
typedef Point2 Measurement
 
typedef Point2Vector MeasurementVector
 

Derivatives

static Matrix26 Dpose (const Point2 &pn, double d)
 
static Matrix23 Dpoint (const Point2 &pn, double d, const Matrix3 &Rt)
 

Static functions

static Pose3 LevelPose (const Pose2 &pose2, double height)
 
static Pose3 LookatPose (const Point3 &eye, const Point3 &target, const Point3 &upVector)
 

Standard Constructors

 PinholeBase ()
 Default constructor.
 
 PinholeBase (const Pose3 &pose)
 Constructor with pose.
 

Advanced Constructors

 PinholeBase (const Vector &v)
 
virtual ~PinholeBase ()=default
 Default destructor.
 

Testable

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
 

Standard Interface

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
 

Transformations and measurement functions

static Point2 Project (const Point3 &pc, OptionalJacobian< 2, 3 > Dpoint={})
 
static Point2 Project (const Unit3 &pc, OptionalJacobian< 2, 2 > Dpoint={})
 
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
 
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
 
Point2 project2 (const Unit3 &point, OptionalJacobian< 2, 6 > Dpose={}, OptionalJacobian< 2, 2 > Dpoint={}) const
 

Advanced interface

static std::pair< size_t, size_t > translationInterval ()
 

Detailed Description

A pinhole camera class that has a Pose3, functions as base class for all pinhole cameras

Member Typedef Documentation

◆ Measurement

Some classes template on either PinholeCamera or StereoCamera, and this typedef informs those classes what "project" returns.

◆ Rotation

Pose Concept requirements

Member Function Documentation

◆ Dpoint()

static Matrix23 gtsam::PinholeBase::Dpoint ( const Point2 pn,
double  d,
const Matrix3 &  Rt 
)
staticprotected

Calculate Jacobian with respect to point

Parameters
pnprojection in normalized coordinates
ddisparity (inverse depth)
Rttransposed rotation matrix

◆ Dpose()

static Matrix26 gtsam::PinholeBase::Dpose ( const Point2 pn,
double  d 
)
staticprotected

Calculate Jacobian with respect to pose

Parameters
pnprojection in normalized coordinates
ddisparity (inverse depth)

◆ LevelPose()

static Pose3 gtsam::PinholeBase::LevelPose ( const Pose2 pose2,
double  height 
)
static

Create a level pose 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

◆ LookatPose()

static Pose3 gtsam::PinholeBase::LookatPose ( const Point3 eye,
const Point3 target,
const Point3 upVector 
)
static

Create a camera pose 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

◆ Project() [1/2]

static Point2 gtsam::PinholeBase::Project ( const Point3 pc,
OptionalJacobian< 2, 3 >  Dpoint = {} 
)
static

Project from 3D point in camera coordinates into image Does not throw a CheiralityException, even if pc behind image plane

Parameters
pcpoint in camera coordinates

◆ Project() [2/2]

static Point2 gtsam::PinholeBase::Project ( const Unit3 pc,
OptionalJacobian< 2, 2 >  Dpoint = {} 
)
static

Project from 3D point at infinity in camera coordinates into image Does not throw a CheiralityException, even if pc behind image plane

Parameters
pcpoint in camera coordinates

◆ project2() [1/2]

Point2 gtsam::PinholeBase::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

Parameters
point3D point in world coordinates
Returns
the intrinsic coordinates of the projected point

◆ project2() [2/2]

Point2 gtsam::PinholeBase::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

Parameters
point3D point in world coordinates
Returns
the intrinsic coordinates of the projected point

◆ translationInterval()

static std::pair<size_t, size_t> gtsam::PinholeBase::translationInterval ( )
inlinestatic

Return the start and end indices (inclusive) of the translation component of the exponential map parameterization

Returns
a pair of [start, end] indices into the tangent space vector

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