What do I do with the fundamental matrix?

后端 未结 2 528
清歌不尽
清歌不尽 2021-02-10 17:37

I am trying to reconstruct a 3d shape from multiple 2d images. I have calculated a fundamental matrix, but now I don\'t know what to do with it.

I am finding multiple co

2条回答
  •  被撕碎了的回忆
    2021-02-10 18:17

    Fundamental Matrix

    At first, listen to the fundamental matrix song ;).

    The Fundamental Matrix only shows the mathematical relationship between your point correspondences in 2 images (x' - image 2, x - image 1). "That means, for all pairs of corresponding points holds eq1 " (Wikipedia). This also means, that if you are having outlier or incorrect point correspondences, it directly affects the quality of your fundamental matrix.

    Additionally, a similar structure exists for the relationship of point correspondences between 3 images which is called Trifocal Tensor.

    A 3d reconstruction using exclusively the properties of the Fundamental Matrix is not possible because "The epipolar geometry is the intrinsic projective geometry between two views. It is independent of scene structure, and only depends on the cameras’ internal parameters and relative pose." (HZ, p.239).

    Camera matrix

    Refering to your question how to reconstruct the shape from multiple images you need to know the camera matrices of your images (K', K). The camera matrix is a 3x3 matrix composed of the camera focal lengths or principal distance (fx, fy) as well as the optical center or principal point (cx, cy).


    eq2

    You can derive your camera matrix using camera calibration.

    Essential matrix

    When you know your camera matrices you can extend your Fundamental Matrix to a Essential Matrix E.


    eq3

    You could say quite sloppy that your Fundamental Matrix is now "calibrated".

    The Essential Matrix can be used to get the rotation (rotation matrix R) and translation (vector t) of your second image in comparison to your first image only up to a projective reconstruction. t will be a unit vector. For this purpose you can use the OpenCV functions decomposeEssentialMat or recoverPose (that uses the cheirality check) or read further detailed explanations in HZ.

    Projection matrix

    Knowing your translation and rotation you can build you projection matrices for your images. The projection matrix is defined as eq4. Finally, you can use triangulation (triangulatePoints) to derive the 3d coordinates of your image points. I recommend using a subsequent bundle adjustment to receive a proper configuration. There is also a sfm module in openCV.

    Since homography or epipolar line knowledge is not essentially necessary for the 3d reconstruction I did not explain these concepts.

提交回复
热议问题