gtsam 4.1.1
gtsam
gtsam::EssentialMatrix Class Reference

Detailed Description

An essential matrix is like a Pose3, except with translation up to scale It is named after the 3*3 matrix aEb = [aTb]x aRb from computer vision, but here we choose instead to parameterize it as a (Rot3,Unit3) pair.

We can then non-linearly optimize immediately on this 5-dimensional manifold.

Manifold

enum  { dimension = 5 }
 
typedef OptionalJacobian< dimension, dimension > ChartJacobian
 
static size_t Dim ()
 
size_t dim () const
 
EssentialMatrix retract (const Vector5 &xi) const
 Retract delta to manifold.
 
Vector5 localCoordinates (const EssentialMatrix &other) const
 Compute the coordinates in the tangent space.
 

Advanced Interface

class boost::serialization::access
 Serialization function.
 

Essential matrix methods

EssentialMatrix operator* (const Rot3 &cRb, const EssentialMatrix &E)
 Given essential matrix E in camera frame B, convert to body frame C. More...
 
const Rot3rotation () const
 Rotation.
 
const Unit3direction () const
 Direction.
 
const Matrix3 & matrix () const
 Return 3*3 matrix representation.
 
const Unit3epipole_a () const
 Return epipole in image_a , as Unit3 to allow for infinity.
 
Unit3 epipole_b () const
 Return epipole in image_b, as Unit3 to allow for infinity.
 
GTSAM_EXPORT Point3 transformTo (const Point3 &p, OptionalJacobian< 3, 5 > DE=boost::none, OptionalJacobian< 3, 3 > Dpoint=boost::none) const
 takes point in world coordinates and transforms it to pose with |t|==1 More...
 
GTSAM_EXPORT EssentialMatrix rotate (const Rot3 &cRb, OptionalJacobian< 5, 5 > HE=boost::none, OptionalJacobian< 5, 3 > HR=boost::none) const
 Given essential matrix E in camera frame B, convert to body frame C. More...
 
GTSAM_EXPORT double error (const Vector3 &vA, const Vector3 &vB, OptionalJacobian< 1, 5 > H=boost::none) const
 epipolar error, algebraic
 

Constructors and named constructors

static GTSAM_EXPORT EssentialMatrix FromRotationAndDirection (const Rot3 &aRb, const Unit3 &aTb, OptionalJacobian< 5, 3 > H1=boost::none, OptionalJacobian< 5, 2 > H2=boost::none)
 Named constructor with derivatives.
 
static GTSAM_EXPORT EssentialMatrix FromPose3 (const Pose3 &_1P2_, OptionalJacobian< 5, 6 > H=boost::none)
 Named constructor converting a Pose3 with scale to EssentialMatrix (no scale)
 
template<typename Engine >
static EssentialMatrix Random (Engine &rng)
 Random, using Rot3::Random and Unit3::Random.
 
 EssentialMatrix ()
 Default constructor.
 
 EssentialMatrix (const Rot3 &aRb, const Unit3 &aTb)
 Construct from rotation and translation.
 
virtual ~EssentialMatrix ()
 

Public Member Functions

Testable
GTSAM_EXPORT void print (const std::string &s="") const
 print with optional string
 
bool equals (const EssentialMatrix &other, double tol=1e-8) const
 assert equality up to a tolerance
 

Static Public Member Functions

static Vector3 Homogeneous (const Point2 &p)
 Static function to convert Point2 to homogeneous coordinates.
 

Friends

Streaming operators
GTSAM_EXPORT friend std::ostream & operator<< (std::ostream &os, const EssentialMatrix &E)
 stream to stream
 
GTSAM_EXPORT friend std::istream & operator>> (std::istream &is, EssentialMatrix &E)
 stream from stream
 

Member Function Documentation

◆ rotate()

EssentialMatrix gtsam::EssentialMatrix::rotate ( const Rot3 cRb,
OptionalJacobian< 5, 5 >  HE = boost::none,
OptionalJacobian< 5, 3 >  HR = boost::none 
) const

Given essential matrix E in camera frame B, convert to body frame C.

Parameters
cRbrotation from body frame to camera frame
Eessential matrix E in camera frame C

◆ transformTo()

Point3 gtsam::EssentialMatrix::transformTo ( const Point3 p,
OptionalJacobian< 3, 5 >  DE = boost::none,
OptionalJacobian< 3, 3 >  Dpoint = boost::none 
) const

takes point in world coordinates and transforms it to pose with |t|==1

Parameters
ppoint in world coordinates
DEoptional 3*5 Jacobian wrpt to E
Dpointoptional 3*3 Jacobian wrpt point
Returns
point in pose coordinates

Friends And Related Function Documentation

◆ operator*

EssentialMatrix operator* ( const Rot3 cRb,
const EssentialMatrix E 
)
friend

Given essential matrix E in camera frame B, convert to body frame C.

Parameters
cRbrotation from body frame to camera frame
Eessential matrix E in camera frame C

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