Package boofcv.alg.geo.selfcalib
Class TwoViewToCalibratingHomography
java.lang.Object
boofcv.alg.geo.selfcalib.TwoViewToCalibratingHomography
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" 2020-1
-
Field Summary
Modifier and TypeFieldDescriptionint
The number of invalid observations that appeared behind the camera in the best hypothesisdouble
The metric fit error found in view-2 for the best hypothesis.int
Which hypothesis was selected as the best.final DecomposeEssential
final DMatrixRMaj
final DMatrixRMaj
final DogArray<DMatrixRMaj>
List of all hopotheses for calibrating homographyfinal DMatrixRMaj
used to triangulate feature locations when checking a solution -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns 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 view-2 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 view-1 and view-2P2
- (Input) Projective camera matrix for view-1 with inplicit identity matrix view-1
-
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 view-1K2
- (input) known intrinsic camera calibration matrix for view-2observations
- (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.
-