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
FieldsModifier and TypeFieldDescriptionintThe number of invalid observations that appeared behind the camera in the best hypothesisdoubleThe metric fit error found in view-2 for the best hypothesis.intWhich hypothesis was selected as the best.final DecomposeEssentialfinal DMatrixRMajfinal DMatrixRMajfinal DogArray<DMatrixRMaj>List of all hopotheses for calibrating homographyfinal DMatrixRMajused to triangulate feature locations when checking a solution -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the found calibration/rectifying homography.voidinitialize(DMatrixRMaj F21, DMatrixRMaj P2) Specify known geometric relationship between the two viewsbooleanprocess(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.
-