gtsam  4.1.0
gtsam
gtsam::Cal3_S2 Class Reference

Testable

GTSAM_EXPORT friend std::ostream & operator<< (std::ostream &os, const Cal3_S2 &cal)
 Output stream operator.
 
void print (const std::string &s="Cal3_S2") const
 print with optional string
 
bool equals (const Cal3_S2 &K, double tol=10e-9) const
 Check if equal up to specified tolerance.
 

Manifold

size_t dim () const
 return DOF, dimensionality of tangent space
 
Cal3_S2 retract (const Vector &d) const
 Given 5-dim tangent vector, create new calibration.
 
Vector5 localCoordinates (const Cal3_S2 &T2) const
 Unretraction for the calibration.
 
static size_t Dim ()
 return DOF, dimensionality of tangent space
 

Advanced Interface

class boost::serialization::access
 Serialization function.
 

Public Member Functions

Standard Constructors
 Cal3_S2 ()
 Create a default calibration that leaves coordinates unchanged.
 
 Cal3_S2 (double fx, double fy, double s, double u0, double v0)
 constructor from doubles
 
 Cal3_S2 (const Vector &d)
 constructor from vector
 
 Cal3_S2 (double fov, int w, int h)
 Easy constructor, takes fov in degrees, asssumes zero skew, unit aspect. More...
 
Advanced Constructors
 Cal3_S2 (const std::string &path)
 load calibration from location (default name is calibration_info.txt)
 
Standard Interface
double fx () const
 focal length x
 
double fy () const
 focal length y
 
double aspectRatio () const
 aspect ratio
 
double skew () const
 skew
 
double px () const
 image center in x
 
double py () const
 image center in y
 
Point2 principalPoint () const
 return the principal point
 
Vector5 vector () const
 vectorized form (column-wise)
 
Matrix3 K () const
 return calibration matrix K
 
Matrix3 matrix () const
 
Matrix3 matrix_inverse () const
 return inverted calibration matrix inv(K)
 
Point2 uncalibrate (const Point2 &p, OptionalJacobian< 2, 5 > Dcal=boost::none, OptionalJacobian< 2, 2 > Dp=boost::none) const
 convert intrinsic coordinates xy to image coordinates uv, fixed derivaitves More...
 
Point2 calibrate (const Point2 &p, OptionalJacobian< 2, 5 > Dcal=boost::none, OptionalJacobian< 2, 2 > Dp=boost::none) const
 convert image coordinates uv to intrinsic coordinates xy More...
 
Vector3 calibrate (const Vector3 &p) const
 convert homogeneous image coordinates to intrinsic coordinates More...
 
Cal3_S2 between (const Cal3_S2 &q, OptionalJacobian< 5, 5 > H1=boost::none, OptionalJacobian< 5, 5 > H2=boost::none) const
 "Between", subtracts calibrations. between(p,q) == compose(inverse(p),q)
 

Public Types

enum  { dimension = 5 }
 
typedef boost::shared_ptr< Cal3_S2shared_ptr
 shared pointer to calibration object
 

Constructor & Destructor Documentation

◆ Cal3_S2()

gtsam::Cal3_S2::Cal3_S2 ( double  fov,
int  w,
int  h 
)

Easy constructor, takes fov in degrees, asssumes zero skew, unit aspect.

Parameters
fovfield of view in degrees
wimage width
himage height

Member Function Documentation

◆ calibrate() [1/2]

Point2 gtsam::Cal3_S2::calibrate ( const Point2 p,
OptionalJacobian< 2, 5 >  Dcal = boost::none,
OptionalJacobian< 2, 2 >  Dp = boost::none 
) const

convert image coordinates uv to intrinsic coordinates xy

Parameters
ppoint in image coordinates
Dcaloptional 2*5 Jacobian wrpt Cal3_S2 parameters
Dpoptional 2*2 Jacobian wrpt intrinsic coordinates
Returns
point in intrinsic coordinates

◆ calibrate() [2/2]

Vector3 gtsam::Cal3_S2::calibrate ( const Vector3 &  p) const

convert homogeneous image coordinates to intrinsic coordinates

Parameters
ppoint in image coordinates
Returns
point in intrinsic coordinates

◆ matrix()

Matrix3 gtsam::Cal3_S2::matrix ( ) const
inline
Deprecated:
The following function has been deprecated, use K above

◆ uncalibrate()

Point2 gtsam::Cal3_S2::uncalibrate ( const Point2 p,
OptionalJacobian< 2, 5 >  Dcal = boost::none,
OptionalJacobian< 2, 2 >  Dp = boost::none 
) const

convert intrinsic coordinates xy to image coordinates uv, fixed derivaitves

Parameters
ppoint in intrinsic coordinates
Dcaloptional 2*5 Jacobian wrpt Cal3_S2 parameters
Dpoptional 2*2 Jacobian wrpt intrinsic coordinates
Returns
point in image coordinates

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