Basic Image AlgorithmS Library
2.8.0
|
Linear least squares solver based on Lapack routines. More...
#include <MathAlgo/LeastSquares.hh>
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
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 |
int | Init (unsigned SolutionSize, bool ReduceToATA=true) |
Initialize least squares solver. More... | |
LeastSquaresLapack () | |
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... | |
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... | |
virtual int | Solve (Matrix< double > &A, Vector< double > &b, Vector< double > &x) |
LeastSquaresLapack. More... | |
virtual int | Solve (Matrix< double > &A, Vector< double > &x) |
Solve linear equation system A*x = 0 using linear least squares, i.e. More... | |
virtual int | WeightedSolve (Matrix< double > &A, Vector< double > &b, Vector< double > &weights, Vector< double > &x) |
Solve linear equation system A*x = b using weighted linear least squares, i.e. More... | |
virtual int | WeightedSolve (Matrix< double > &A, Vector< double > &weights, Vector< double > &x) |
Solve linear equation system A*x = 0 using weighted linear least squares, i.e. More... | |
virtual | ~LeastSquaresLapack () |
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 | |
Matrix< double > | _AT |
Matrix< double > | _ATA |
Vector< double > | _ATb |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
bool | _ReduceToATA |
unsigned | _SolutionSize |
std::map< std::string, long int > | _String2Debuglevel |
Matrix< double > | _Weight |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
Linear least squares solver based on Lapack routines.
Definition at line 103 of file LeastSquares.hh.
|
inline |
Definition at line 107 of file LeastSquares.hh.
|
inlinevirtual |
Definition at line 109 of file LeastSquares.hh.
|
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 |
|
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 |
|
inherited |
Initialize least squares solver.
[in] | SolutionSize | Number of parameters |
[in] | ReduceToATA | Reduce minimization of |Ax-b| to solution of (A'A)x = A'b |
Definition at line 36 of file LeastSquares.cpp.
|
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 |
|
virtual |
Reimplemented from BIAS::LeastSquaresBase.
Definition at line 79 of file LeastSquares.cpp.
References Lapack_LLS_QR_linear_solve(), BIAS::Matrix< T >::Mult(), and BIAS::Matrix< T >::Transpose().
Referenced by BIAS::TriangulationMidPoint::Intersect_().
Solve linear equation system A*x = 0 using linear least squares, i.e.
minimize |A*x|^2, subject to |x| = 1.
Reimplemented from BIAS::LeastSquaresBase.
Definition at line 97 of file LeastSquares.cpp.
|
virtual |
Solve linear equation system A*x = b using weighted linear least squares, i.e.
minimize |W*(A*x - b)|^2 with diagonal matrix W composed of given weights.
Reimplemented from BIAS::LeastSquaresBase.
Definition at line 103 of file LeastSquares.cpp.
References Lapack_LLS_QR_linear_solve(), Lapack_WLLS_solve(), BIAS::Matrix< T >::Mult(), TNT::Matrix< T >::num_rows(), BIAS::Matrix< T >::ScaleRow(), and BIAS::Matrix< T >::Transpose().
|
virtual |
Solve linear equation system A*x = 0 using weighted linear least squares, i.e.
minimize |W*(A*x - b)|^2 with diagonal matrix W composed of given weights, subject to |x| = 1.
Reimplemented from BIAS::LeastSquaresBase.
Definition at line 131 of file LeastSquares.cpp.
|
protectedinherited |
Definition at line 92 of file LeastSquares.hh.
|
protectedinherited |
Definition at line 92 of file LeastSquares.hh.
|
protectedinherited |
Definition at line 93 of file LeastSquares.hh.
|
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 90 of file LeastSquares.hh.
|
protectedinherited |
Definition at line 91 of file LeastSquares.hh.
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 92 of file LeastSquares.hh.
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |