java.lang.Object
imagingbook.calibration.zhang.HomographyEstimator
This class defines methods for estimating the homography (projective) transformation between pairs of 2D point sets.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHomographyEstimator(boolean normalizePointCoordinates, boolean doNonlinearRefinement) -
Method Summary
Modifier and TypeMethodDescriptionestimateHomographies(imagingbook.common.geometry.basic.Pnt2d[] modelPts, imagingbook.common.geometry.basic.Pnt2d[][] obsPoints) Estimates the homographies between a fixed set of 2D model points and multiple observations (image point sets).estimateHomography(imagingbook.common.geometry.basic.Pnt2d[] ptsA, imagingbook.common.geometry.basic.Pnt2d[] ptsB) Estimates the homography (projective) transformation from two given 2D point sets.protected MultivariateMatrixFunctiongetJacobianFunction(imagingbook.common.geometry.basic.Pnt2d[] X) refineHomography(RealMatrix Hinit, imagingbook.common.geometry.basic.Pnt2d[] pntsA, imagingbook.common.geometry.basic.Pnt2d[] pntsB) Refines the initial homography by non-linear (Levenberg-Marquart) optimization.
-
Field Details
-
MaxLmEvaluations
-
MaxLmIterations
-
-
Constructor Details
-
HomographyEstimator
public HomographyEstimator() -
HomographyEstimator
-
-
Method Details
-
estimateHomographies
public RealMatrix[] estimateHomographies(imagingbook.common.geometry.basic.Pnt2d[] modelPts, imagingbook.common.geometry.basic.Pnt2d[][] obsPoints) Estimates the homographies between a fixed set of 2D model points and multiple observations (image point sets). The correspondence between the points is assumed to be known.- Parameters:
modelPts- a sequence of 2D points on the model (calibration target)obsPoints- a sequence 2D image point sets (one set per view).- Returns:
- the sequence of estimated homographies (3 x 3 matrices), one for each view
-
estimateHomography
public RealMatrix estimateHomography(imagingbook.common.geometry.basic.Pnt2d[] ptsA, imagingbook.common.geometry.basic.Pnt2d[] ptsB) Estimates the homography (projective) transformation from two given 2D point sets. The correspondence between the points is assumed to be known.- Parameters:
ptsA- the 1st sequence of 2D pointsptsB- the 2nd sequence of 2D points- Returns:
- the estimated homography (3 x 3 matrix)
-
refineHomography
public RealMatrix refineHomography(RealMatrix Hinit, imagingbook.common.geometry.basic.Pnt2d[] pntsA, imagingbook.common.geometry.basic.Pnt2d[] pntsB) Refines the initial homography by non-linear (Levenberg-Marquart) optimization.- Parameters:
Hinit- the initial (estimated) homography matrixpntsA- the 1st sequence of 2D pointspntsB- the 2nd sequence of 2D points- Returns:
- the refined homography matrix
-
getJacobianFunction
protected MultivariateMatrixFunction getJacobianFunction(imagingbook.common.geometry.basic.Pnt2d[] X)
-