Public Member Functions
PMatrixComputeLinear Class Reference

#include <PMatrixComputeLinear.h>

Inheritance diagram for PMatrixComputeLinear:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool compute (vcl_vector< HomgPoint2D > const &points1, vcl_vector< HomgPoint3D > const &points2, PMatrix *P)
bool compute (vcl_vector< vgl_homg_point_2d< double > > const &points1, vcl_vector< vgl_homg_point_3d< double > > const &points2, PMatrix *P)
 Compute a projection matrix using linear least squares.

Detailed Description

Definition at line 25 of file PMatrixComputeLinear.h.


Member Function Documentation

bool PMatrixComputeLinear::compute ( vcl_vector< HomgPoint2D > const &  points1,
vcl_vector< HomgPoint3D > const &  points2,
PMatrix P 
)

Definition at line 88 of file PMatrixComputeLinear.cxx.

bool PMatrixComputeLinear::compute ( vcl_vector< vgl_homg_point_2d< double > > const &  points1,
vcl_vector< vgl_homg_point_3d< double > > const &  points2,
PMatrix P 
)

Compute a projection matrix using linear least squares.

Input is a list of 3D-2D point correspondences.

Return false if the calculation fails or there are fewer than six point matches in the list.

The algorithm finds the nullvector of the following design matrix, where the 3d points $\vec X^i$ are projected into 2d points $\vec u^i$.

\[ \left( \begin{array}{ccc} \vec X^1 u^1_3 & 0_{4} & -\vec X^1 u^1_1 \cr 0_4 & \vec X^1 u^1_3 & -\vec X^1 u^1_2 \cr \vdots & \vdots & \vdots \cr \vec X^n u^n_3 & 0_{4} & -\vec X^n u^n_1 \cr 0_4 & \vec X^n u^n_3 & -\vec X^n u^n_2 \cr \end{array} \right) \]

Definition at line 35 of file PMatrixComputeLinear.cxx.


The documentation for this class was generated from the following files: