Class DecomposeHomography
Decomposes a homography matrix to extract its internal geometric structure. There are four possible solutions,
with two that are physically possible. The physically possible solution can be found by imposing a positive
depth constraint. See PositiveDepthConstraintCheck
for details on how to do that.
A homography matrix is defined as H = (R + (1/d)*T*N^{T}), where R is a 3x3 rotation matrix, d is the distance of the plane, N is the plane's normal, T is the translation vector. The decomposition works by computing the SVD of H^{T}H and the following the procedure outlines in [1].
The input homography is assumed to be from view 'a' to view 'b'. Then the resulting transform (R,T) is the transform from view 'a' to view 'b'. The values of d and N are all from the view 'a' perspective. Since there's a scale ambiguity the value of d is assumed to be 1 and T is scaled appropriately.
"An Invitation to 3D Vision" 1st edition page 137.

Constructor Summary

Method Summary
Modifier and TypeMethodDescriptionvoid
decompose
(DMatrixRMaj homography) Decomposed the provided homography matrix into its R,T/d,N components.Returns the normal of the plane part of the solutionReturns the camera motion part of the solution.

Constructor Details

DecomposeHomography
public DecomposeHomography()


Method Details

decompose
Decomposed the provided homography matrix into its R,T/d,N components. Four solutions will be produced and can be accessed withgetSolutionsN()
andgetSolutionsSE()
. Parameters:
homography
 Homography matrix. Not modified.

getSolutionsSE
Returns the camera motion part of the solution. Note that se.T=(1/d)T
WARNING: Data is reused each time decompose is called.
 Returns:
 Set of rigid body camera motions

getSolutionsN
Returns the normal of the plane part of the solution
WARNING: Data is reused each time decompose is called.
 Returns:
 Set of plane normals
