Class HomographyInducedStereo2Line
- java.lang.Object
-
- boofcv.alg.geo.h.HomographyInducedStereo2Line
-
public class HomographyInducedStereo2Line extends java.lang.ObjectComputes the homography induced by a plane from 2 line correspondences. Works with both calibrated and uncalibrated cameras. The Fundamental/Essential matrix must be known. The found homography will be from view 1 to view 2. The passed in Fundamental matrix must have the following properties for each set of point correspondences: x2*F*x1 = 0, where x1 and x2 are views of the point in image 1 and image 2 respectively.
Algorithm: For each line correspondence it finds the intersection between the two planes which define the observed lines. These planes are created by line in the image and the camera origin. From the two found lines, the equations of the plane are extracted in 3D space. This equation is then combined with information from the fundamental matrix to compute the induced homography.
NOTE: Any line which is parallel to camera baseline can't be used. The lines in both cameras will have the same slope, causing their intersection to be a plane instead of a line. This can be a significant issue since for many stereo rigs it would mean no perfectly horizontal lines can be used.
-
-
Constructor Summary
Constructors Constructor and Description HomographyInducedStereo2Line()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description org.ejml.data.DenseMatrix64FgetHomography()booleanprocess(PairLineNorm line0, PairLineNorm line1)Computes the homography based on two unique lines on the planevoidsetFundamental(org.ejml.data.DenseMatrix64F F, Point3D_F64 e2)Specify the fundamental matrix and the camera 2 epipole.
-
-
-
Method Detail
-
setFundamental
public void setFundamental(org.ejml.data.DenseMatrix64F F, Point3D_F64 e2)Specify the fundamental matrix and the camera 2 epipole.- Parameters:
F- Fundamental matrix.e2- Epipole for camera 2. If null it will be computed internally.
-
process
public boolean process(PairLineNorm line0, PairLineNorm line1)
Computes the homography based on two unique lines on the plane- Parameters:
line0- Line on the planeline1- Line on the plane
-
getHomography
public org.ejml.data.DenseMatrix64F getHomography()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG