Package boofcv.alg.geo.selfcalib
Class TwoViewToCalibratingHomography
java.lang.Object
boofcv.alg.geo.selfcalib.TwoViewToCalibratingHomography
public class TwoViewToCalibratingHomography extends Object
Estimates the calibrating/rectifying homography when given a trifocal tensor and two calibration matrices for
the first two views. Observations are used to select the best hypothesis out of the four possible camera motions.
Procedure:
 Get fundamental and camera matrices from trifocal tensor
 Use given calibration matrices to compute essential matrix
 Decompose essential matrix to get 4 possible motions from view 1 to view 2
 Use reprojection error and visibility constraints to select best hypothesis
 P. Abeles, "BoofCV Technical Report: Automatic Camera Calibration" 20201

Field Summary
Fields Modifier and Type Field Description int
bestInvalid
The number of invalid observations that appeared behind the camera in the best hypothesisdouble
bestModelError
The metric fit error found in view2 for the best hypothesis.int
bestSolutionIdx
Which hypothesis was selected as the best.DecomposeEssential
decomposeEssential
DMatrixRMaj
E21
DMatrixRMaj
F21
DogArray<DMatrixRMaj>
hypothesesH
List of all hopotheses for calibrating homographyDMatrixRMaj
P2
Triangulate2ViewsMetric
triangulate
used to triangulate feature locations when checking a solution 
Constructor Summary
Constructors Constructor Description TwoViewToCalibratingHomography()

Method Summary
Modifier and Type Method Description DMatrixRMaj
getCalibrationHomography()
Returns the found calibration/rectifying homography.void
initialize(DMatrixRMaj F21, DMatrixRMaj P2)
Specify known geometric relationship between the two viewsboolean
process(DMatrixRMaj K1, DMatrixRMaj K2, List<AssociatedPair> observations)
Estimate the calibrating homography with the given assumptions about the intrinsic calibration matrices for the first two of three views.

Field Details

triangulate
used to triangulate feature locations when checking a solution 
decomposeEssential

P2

F21

E21

hypothesesH
List of all hopotheses for calibrating homography 
bestSolutionIdx
public int bestSolutionIdxWhich hypothesis was selected as the best. CallgetCalibrationHomography()
as an alternative 
bestInvalid
public int bestInvalidThe number of invalid observations that appeared behind the camera in the best hypothesis 
bestModelError
public double bestModelErrorThe metric fit error found in view2 for the best hypothesis. Computed from SVD


Constructor Details

TwoViewToCalibratingHomography
public TwoViewToCalibratingHomography()


Method Details

initialize
Specify known geometric relationship between the two views Parameters:
F21
 (Input) Fundamental matrix between view1 and view2P2
 (Input) Projective camera matrix for view1 with inplicit identity matrix view1

process
Estimate the calibrating homography with the given assumptions about the intrinsic calibration matrices for the first two of three views. Parameters:
K1
 (input) known intrinsic camera calibration matrix for view1K2
 (input) known intrinsic camera calibration matrix for view2observations
 (input) observations for the two views. Used to select best solution Returns:
 true if it could find a solution. Failure is a rare condition which requires noise free data.

getCalibrationHomography
Returns the found calibration/rectifying homography.
