Basic Image AlgorithmS Library
2.8.0
|
This class computes a PMatrix from 2D/3D correspondences with linear methods. More...
#include <Geometry/PMatrixLinear.hh>
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
bool | Compute (const std::vector< HomgPoint3D * > &points3D, const std::vector< HomgPoint2D * > &points2D, PMatrix &P) |
computes a least squares solution P via SVD, if at least 6 2d-3d correspondences (pointers) are provided in points3D and points2D. More... | |
bool | Compute (const std::vector< HomgPoint3D > &points3D, const std::vector< HomgPoint2D > &points2D, PMatrix &P) |
computes a least squares solution P via SVD, if at least 6 2d-3d correspondences are provided in points3D and points2D More... | |
bool | ComputeCalibrated (const std::vector< HomgPoint3D * > &points3D, const std::vector< HomgPoint2D * > &points2D, PMatrix &Pose) |
given n>=6 2D/3D correspondences, compute approximate R and C using linear methods (thats why we need 6, not 3 correspondences !) More... | |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
bool | GetPEstSystemHom (Matrix< double > &A, const std::vector< HomgPoint3D * > &points3D, const std::vector< HomgPoint2D * > &points2D) |
sets up the homogeneous equation system A for pmatrix computation using the 2d/3d correspondences provided More... | |
bool | GetPEstSystemInHom (Matrix< double > &A, Vector< double > &b, const std::vector< HomgPoint3D * > &points3D, const std::vector< HomgPoint2D * > &points2D) |
sets up an inhomogeneous equation system A for pmatrix computation using the 2d/3d correspondences provided More... | |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
PMatrixLinear () | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
Protected Attributes | |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
This class computes a PMatrix from 2D/3D correspondences with linear methods.
No nonlinear constraints are enforced: If you have noisy points, you may get inexact rotations or non-metric PMatrices, although you compute in a metric framework. however, this class provides functions which can also be applied in projectively skewed space.
Definition at line 50 of file PMatrixLinear.hh.
PMatrixLinear::PMatrixLinear | ( | ) |
Definition at line 33 of file PMatrixLinear.cpp.
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph().
|
inlineinherited |
bool PMatrixLinear::Compute | ( | const std::vector< HomgPoint3D * > & | points3D, |
const std::vector< HomgPoint2D * > & | points2D, | ||
PMatrix & | P | ||
) |
computes a least squares solution P via SVD, if at least 6 2d-3d correspondences (pointers) are provided in points3D and points2D.
points3D | 3D points which project to points2D |
points2D | 2D projections of points3D, any K allowed ! |
P | resulting (not always metric) PMatrix |
Definition at line 57 of file PMatrixLinear.cpp.
References BIAS::Matrix< T >::GetRow(), BIAS::SVD::GetS(), BIAS::SVD::GetVT(), BIAS::SVD::GetZeroThreshold(), BIAS::Matrix< T >::NormalizeRows(), BIAS::SVD::RelNullspaceDim(), and BIAS::PMatrixBase::SetFromVector().
bool PMatrixLinear::Compute | ( | const std::vector< HomgPoint3D > & | points3D, |
const std::vector< HomgPoint2D > & | points2D, | ||
PMatrix & | P | ||
) |
computes a least squares solution P via SVD, if at least 6 2d-3d correspondences are provided in points3D and points2D
Algorithm used is DLT. Fails if points3D are coplanar.
points3D | 3D points which project to points2D |
points2D | 2D projections of points3D, any K allowed ! |
P | resulting (not always metric) PMatrix |
Definition at line 40 of file PMatrixLinear.cpp.
bool PMatrixLinear::ComputeCalibrated | ( | const std::vector< HomgPoint3D * > & | points3D, |
const std::vector< HomgPoint2D * > & | points2D, | ||
PMatrix & | Pose | ||
) |
given n>=6 2D/3D correspondences, compute approximate R and C using linear methods (thats why we need 6, not 3 correspondences !)
The lines of each two 3D points and their projections into the image are used to determine the rotation of P. For n points, we have n(n-1)/2 lines (quadratic in n!) and also linear equations, dont pass too many points if you are interested in performance ! After R is determined, C is computed separately using linear methods (DLT) starting from the equation Rx ~= [ I |-C] X Algorithm fails if points3D are coplanar
points3D | 3D points which project to points2D |
points2D | 2D projections of points3D, K=Identity required ! |
Pose | result R^T*[ I |-C] |
Definition at line 220 of file PMatrixLinear.cpp.
References BIAS::PMatrix::Compose(), BIAS::Matrix3x3< T >::GetData(), BIAS::Matrix< T >::GetDataArray(), BIAS::Matrix< T >::GetRow(), BIAS::SVD::GetS(), BIAS::Vector3< T >::GetSkewSymmetricMatrix(), BIAS::SVD::GetU(), BIAS::SVD::GetVT(), BIAS::Vector3< T >::OuterProduct(), BIAS::SVD::RelNullspaceDim(), BIAS::Vector3< T >::Set(), and BIAS::Matrix3x3< T >::SetIdentity().
|
inlineprotectedinherited |
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
bool PMatrixLinear::GetPEstSystemHom | ( | Matrix< double > & | A, |
const std::vector< HomgPoint3D * > & | points3D, | ||
const std::vector< HomgPoint2D * > & | points2D | ||
) |
sets up the homogeneous equation system A for pmatrix computation using the 2d/3d correspondences provided
Definition at line 116 of file PMatrixLinear.cpp.
References TNT::Matrix< T >::newsize().
bool PMatrixLinear::GetPEstSystemInHom | ( | Matrix< double > & | A, |
Vector< double > & | b, | ||
const std::vector< HomgPoint3D * > & | points3D, | ||
const std::vector< HomgPoint2D * > & | points2D | ||
) |
sets up an inhomogeneous equation system A for pmatrix computation using the 2d/3d correspondences provided
Definition at line 168 of file PMatrixLinear.cpp.
References TNT::Vector< T >::newsize(), and TNT::Matrix< T >::newsize().
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlineinherited |
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |