gtsam  3.2.1
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.

+ Inheritance diagram for gtsam::EssentialMatrix:

Constructors and named constructors

static EssentialMatrix FromPose3 (const Pose3 &_1P2_, boost::optional< Matrix & > 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.
 

Manifold

static size_t Dim ()
 Dimensionality of tangent space = 5 DOF.
 
virtual size_t dim () const
 Return the dimensionality of the tangent space.
 
virtual EssentialMatrix retract (const Vector &xi) const
 Retract delta to manifold.
 
virtual Vector localCoordinates (const EssentialMatrix &other) const
 Compute the coordinates in the tangent space.
 

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.
 
Point3 transform_to (const Point3 &p, boost::optional< Matrix & > DE=boost::none, boost::optional< Matrix & > Dpoint=boost::none) const
 takes point in world coordinates and transforms it to pose with |t|==1 More...
 
EssentialMatrix rotate (const Rot3 &cRb, boost::optional< Matrix & > HE=boost::none, boost::optional< Matrix & > HR=boost::none) const
 Given essential matrix E in camera frame B, convert to body frame C. More...
 
double error (const Vector &vA, const Vector &vB, boost::optional< Matrix & > H=boost::none) const
 epipolar error, algebraic
 

Advanced Interface

class boost::serialization::access
 Serialization function.
 

Public Member Functions

Testable
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
 
- Public Member Functions inherited from gtsam::DerivedValue< EssentialMatrix >
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 EssentialMatrix & () const
 Conversion to the derived class.
 
 operator EssentialMatrix & ()
 Conversion to the derived class.
 
- Public Member Functions inherited from gtsam::Value
virtual ~Value ()
 Virutal destructor.
 

Static Public Member Functions

static Vector 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
 

Additional Inherited Members

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

Member Function Documentation

EssentialMatrix gtsam::EssentialMatrix::rotate ( const Rot3 cRb,
boost::optional< Matrix & >  HE = boost::none,
boost::optional< Matrix & >  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
Point3 gtsam::EssentialMatrix::transform_to ( const Point3 p,
boost::optional< Matrix & >  DE = boost::none,
boost::optional< Matrix & >  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

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: