Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

EssentialMatrixConstraint

Open In Colab

EssentialMatrixConstraint is a binary factor connecting two Pose3 variables. It represents a constraint derived from a measured Essential matrix (EE) between the two camera views corresponding to the poses. The Essential matrix EE encapsulates the relative rotation RR and translation direction tt between two calibrated cameras according to the epipolar constraint:

p2TEp1=0p_2^T E p_1 = 0

where p1p_1 and p2p_2 are the homogeneous coordinates of corresponding points in the normalized (calibrated) image planes.

This factor takes the measured E12E_{12} (from pose 1 to pose 2) and compares it to the Essential matrix predicted from the estimated poses P1P_1 and P2P_2. The error is computed in the 5-dimensional tangent space of the Essential matrix manifold.

Note: This factor requires known camera calibration, as the Essential matrix operates on normalized image coordinates.

Creating an EssentialMatrixConstraint

To create the factor, provide:

  1. Keys for the two Pose3 variables (e.g., X(1), X(2)).

  2. The measured gtsam.EssentialMatrix (E12E_{12}).

  3. A 5-dimensional noise model (gtsam.noiseModel).

EssentialMatrixConstraint: EssentialMatrixConstraint(x1,x2)
  measured: R:
 [
	0.995004, -0.0998334, 0;
	0.0998334, 0.995004, 0;
	0, 0, 1
]
d: :1
0
0
isotropic dim=5 sigma=0.01

Evaluating the Error

The .error(values) method computes the error vector in the 5D tangent space of the Essential matrix manifold. The error represents the difference between the measured E and the E predicted from the current pose estimates in values.

Error vector at ground truth: 0.0
Error vector at noisy pose: 1.4069198000486227