Class TrifocalExtractGeometries


public class TrifocalExtractGeometries
extends Object

Extracts the epipoles, camera matrices, and fundamental matrices for views 2 and 3 with respect to view 1 from the trifocal tensor. Epipoles are found in homogeneous coordinates. Singular value decomposition is used to compute each vector and is robust to noise and epipoles will have a norm of one..


  • e2T*F12 = 0
  • e3T*F13 = 0

where F1i is a fundamental matrix from image 1 to i.


  • R. Hartley, and A. Zisserman, "Multiple View Geometry in Computer Vision", 2nd Ed, Cambridge 2003
  • Constructor Details

    • TrifocalExtractGeometries

      public TrifocalExtractGeometries()
  • Method Details

    • setTensor

      public void setTensor​(TrifocalTensor tensor)
      Specifies the input tensor. The epipoles are immediately extracted since they are needed to extract all other data structures
      tensor - The tensor. Reference is saved but not modified
    • extractEpipoles

      public void extractEpipoles​(Point3D_F64 e2, Point3D_F64 e3)
      Extracts the epipoles from the trifocal tensor. Extracted epipoles will have a norm of 1 as an artifact of using SVD.
      e2 - Output: Epipole in image 2. Homogeneous coordinates. Modified
      e3 - Output: Epipole in image 3. Homogeneous coordinates. Modified
    • extractCamera

      public void extractCamera​(DMatrixRMaj P2, DMatrixRMaj P3)

      Extract the camera matrices up to a common projective transform.

      P2 = [[T1.T2.T3]e3|e2] and P3=[(e3*e2T-I)[T1',T2',T3'|e2|e3]

      NOTE: The camera matrix for the first view is assumed to be P1 = [I|0].

      P2 - Output: 3x4 camera matrix for views 2. Modified.
      P3 - Output: 3x4 camera matrix for views 3. Modified.
    • extractFundmental

      public void extractFundmental​(DMatrixRMaj F21, DMatrixRMaj F31)

      Extract the fundamental matrices between views 1 + 2 and views 1 + 3. The returned Fundamental matrices will have the following properties: xiT*Fi*x1 = 0, where i is view 2 or 3.

      NOTE: The first camera is assumed to have the camera matrix of P1 = [I|0]. Thus observations in pixels for the first camera will not meet the epipolar constraint when applied to the returned fundamental matrices.

       F21=[e2]x *[T1,T2,T3]*e3 and F31 = [e3]x*[T1,T2,T3]*e3
      F21 - (Output) Fundamental matrix
      F31 - (Output) Fundamental matrix