Given a set of homographies mapping pixels in view i to view 0 this will estimate the projective camera matrix of each view. x' = P*X, where P is the camera matrix that is to be estimated, x' is pixel, and X is 3D feature location in view 0's reference frame. Output is 3D structure and camera matrices.
A camera matrix is a 3x4 projective matrix with the following structure [M,t]. If a homography defines the transform between pixels in one view to another view then M is equal to that homography. The camera matrix is now defined up to the unknown t. To solve for t the points in this projective frame also need to be derived. This is done by solving a linear system:
[ p.x*m' - m' , -1 , 0 , p.x ] [ p.y*m' - m' , 0 , -1 , p.y ] * [X ; t ]where m'[i] is row 'i' in M transposed. (p.x,p.y) is pixel observation, X and t are the unknowns. Each observation x = P*X generates 2 equations. See  for derivation. Vector product of both sides is involved.
Normalization is automatically applied to inputs and undo for output. Normalization matrix is computed using
LowLevelMultiViewOps.computeNormalizationLL(List, BoofLambdas.ConvertOut, NormalizationPoint2D)
 18.5.1 Page 448 in R. Hartley, and A. Zisserman, "Multiple View Geometry in Computer Vision", 2nd Ed, Cambridge 2003
Method SummaryModifier and TypeMethodDescription
(List<DMatrixRMaj> homographies_view0_to_viewI, List<List<PointIndex2D_F64>> observations, int totalFeatures)Solves for camera matrices and scene structure.
proccesspublic boolean proccess
(List<DMatrixRMaj> homographies_view0_to_viewI, List<List<PointIndex2D_F64>> observations, int totalFeatures)
Solves for camera matrices and scene structure.Homographies from view i to 0:
x = H*x[i]
homographies_view0_to_viewI- (Input) Homographies matching pixels from view i to view 0.
observations- (Input) Observed features in each view, except view 0. Indexes of points must be from 0 to totalFeatures-1
totalFeatures- (Input) total number of features being solved for. Uses to sanity check input
- true if successful or false if it failed
getCameraMatrixpublic void getCameraMatrix
(int viewIdx, DMatrixRMaj P)
getFeature3Dpublic void getFeature3D
(int featureIdx, Point3D_F64 X)
getInfinityThresholdpublic double getInfinityThreshold()
setInfinityThresholdpublic void setInfinityThreshold