gtsam
Loading...
Searching...
No Matches
gtsam::FundamentalMatrix Class Reference

Detailed Description

Represents a fundamental matrix in computer vision, which encodes the epipolar geometry between two views.

The FundamentalMatrix class encapsulates the fundamental matrix, which relates corresponding points in stereo images. It is parameterized by two rotation matrices (U and V) and a scalar parameter (s). Using these values, the fundamental matrix is represented as

F = U * diag(1, s, 0) * V^T

Manifold

static constexpr auto dimension = 7
size_t dim () const
Vector localCoordinates (const FundamentalMatrix &F) const
 Return local coordinates with respect to another FundamentalMatrix.
FundamentalMatrix retract (const Vector &delta) const
 Retract the given vector to get a new FundamentalMatrix.
static size_t Dim ()

Public Member Functions

 FundamentalMatrix ()
 Default constructor.
 FundamentalMatrix (const Matrix3 &U, double s, const Matrix3 &V)
 Construct from U, V, and scalar s.
 FundamentalMatrix (const Matrix3 &F)
 Construct from a 3x3 matrix using SVD.
 FundamentalMatrix (const Matrix3 &Ka, const EssentialMatrix &E, const Matrix3 &Kb)
 Construct from essential matrix and calibration matrices.
 FundamentalMatrix (const Matrix3 &Ka, const Pose3 &aPb, const Matrix3 &Kb)
 Construct from calibration matrices Ka, Kb, and pose aPb.
Matrix3 matrix () const
 Return the fundamental matrix representation.
Vector3 epipolarLine (const Point2 &p, OptionalJacobian< 3, 7 > H={})
 Computes the epipolar line in a (left) for a given point in b (right).
Testable
void print (const std::string &s="") const
bool equals (const FundamentalMatrix &other, double tol=1e-9) const
 Check if the FundamentalMatrix is equal to another within a tolerance.

Constructor & Destructor Documentation

◆ FundamentalMatrix() [1/4]

gtsam::FundamentalMatrix::FundamentalMatrix ( const Matrix3 & U,
double s,
const Matrix3 & V )

Construct from U, V, and scalar s.

Initializes the FundamentalMatrix From the SVD representation U*diag(1,s,0)*V^T. It will internally convert to using SO(3).

◆ FundamentalMatrix() [2/4]

gtsam::FundamentalMatrix::FundamentalMatrix ( const Matrix3 & F)

Construct from a 3x3 matrix using SVD.

Initializes the FundamentalMatrix by performing SVD on the given matrix and ensuring U and V are not reflections.

Parameters
FA 3x3 matrix representing the fundamental matrix

◆ FundamentalMatrix() [3/4]

gtsam::FundamentalMatrix::FundamentalMatrix ( const Matrix3 & Ka,
const EssentialMatrix & E,
const Matrix3 & Kb )
inline

Construct from essential matrix and calibration matrices.

Initializes the FundamentalMatrix from the given essential matrix E and calibration matrices Ka and Kb, using F = Ka^(-T) * E * Kb^(-1) and then calls constructor that decomposes F via SVD.

Parameters
EEssential matrix
KaCalibration matrix for the left camera
KbCalibration matrix for the right camera

◆ FundamentalMatrix() [4/4]

gtsam::FundamentalMatrix::FundamentalMatrix ( const Matrix3 & Ka,
const Pose3 & aPb,
const Matrix3 & Kb )
inline

Construct from calibration matrices Ka, Kb, and pose aPb.

Initializes the FundamentalMatrix from the given calibration matrices Ka and Kb, and the pose aPb.

Parameters
KaCalibration matrix for the left camera
aPbPose from the left to the right camera
KbCalibration matrix for the right camera

The documentation for this class was generated from the following files:
  • /tmp/gtsam-4.3.0-doxygen.rsXPUS/source/gtsam/geometry/FundamentalMatrix.h
  • /tmp/gtsam-4.3.0-doxygen.rsXPUS/source/gtsam/geometry/FundamentalMatrix.cpp