Basic Image AlgorithmS Library
2.8.0
|
Projection of 3D points with uncertainties covariances into the 2d image plane taking the camera pose uncertainty into account. More...
#include <Geometry/Covariance3Dto2DHomg.hh>
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
Covariance3Dto2DHomg (const BIAS::KMatrix &K, const enum BIAS::PMatrixBase::E_ParametrizationType par) | |
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 |
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 |
int | Project (const BIAS::PoseParametrization &Pose, const BIAS::HomgPoint3D &X, const BIAS::HomgPoint3DCov &Cov_X, BIAS::HomgPoint2D &x, BIAS::HomgPoint2DCov &Cov_x) const |
compute More... | |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | SetAlpha (const double alpha) |
Sets the alpha parameter. More... | |
void | SetBeta (const double beta) |
Sets the beta parameter. More... | |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | SetK (const BIAS::KMatrix &K) |
void | SetUseSVD (const bool use_svd) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
int | Transform (const Vector< double > &src_mean, const Matrix< double > &src_cov, Vector< double > &dst_mean, Matrix< double > &dst_cov) const |
computes the second order approximation of the transformations of the mean and the associated covariance for the point transformation Transform_(). More... | |
void | UseHomogenizedPoints (bool h) |
~Covariance3Dto2DHomg () | |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
int | ComputeSigmaPoints_ (const Vector< double > &src_mean, const Matrix< double > &src_cov, std::vector< WeightedSigmaPoint > &sigma_points) const |
The covariance of a n-dimensional vector is approximated using 2n+1 so called sigma points with associated weights. More... | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
virtual int | Transform_ (const BIAS::Vector< double > &src, BIAS::Vector< double > &dst) const |
src is a vector consisting of [ 3d point, camera center, orientation ] The orientation must be represented using one case from E_Parametrization dst is the projection into the image 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 |
double | Alpha_ |
the alpha parameter determines the spread of the sigma points More... | |
double | Beta_ |
beta is used to incorporate prior knowledge of the distribution of x. More... | |
BIAS::KMatrix | K_ |
double | Kappa_ |
kappa is a secondary scaling parameter. More... | |
enum BIAS::PMatrixBase::E_ParametrizationType | Parametrization_ |
bool | useHomogenizedPoints_ |
normalize or homogenize ??? More... | |
bool | UseSVD_ |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
Projection of 3D points with uncertainties covariances into the 2d image plane taking the camera pose uncertainty into account.
Given a point in 3D with uncertainty represented/approximated by a multivariate normal distribution (i.e. 3x3 covariance matrix). Given further a camera pose (camer center and orientation).
The algorithm computes the projection of the 3D point into the image taking the camera pose uncertainty into account. The probabilty distribution function in the image is represented by a 2D normal distribution (i.e. a 2D covariance matrix).
The resulting 2D covariance matrix is approximated using the unscented transform. See UnscentedTransform for details.
To use it instantiate this class with the appropriate parametrization of the camera orientation. Currently Euler angles, axis (norm 1) and angle, axis times angle and quaternion are supported.
See Example/ExampleCovariance3Dto2DHomg for exemplary usage.
TODO: implement for point normalization instead of homogenization
Definition at line 44 of file Covariance3Dto2DHomg.hh.
Covariance3Dto2DHomg::Covariance3Dto2DHomg | ( | const BIAS::KMatrix & | K, |
const enum BIAS::PMatrixBase::E_ParametrizationType | par | ||
) |
Definition at line 15 of file Covariance3Dto2DHomg.cpp.
Covariance3Dto2DHomg::~Covariance3Dto2DHomg | ( | ) |
Definition at line 24 of file Covariance3Dto2DHomg.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 |
|
protectedinherited |
The covariance of a n-dimensional vector is approximated using 2n+1 so called sigma points with associated weights.
The points and weights are computed in this function
Definition at line 138 of file UnscentedTransform.cpp.
References BIAS::UnscentedTransform::Alpha_, BIAS::UnscentedTransform::Beta_, BIAS::Debug::DebugLevelIsSet(), BIAS::Matrix< T >::GetCol(), BIAS::Matrix< T >::GetCols(), BIAS::UnscentedTransform::Kappa_, Lapack_Cholesky_SymmetricPositiveDefinit(), BIAS::Less(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::Vector< T >::Size(), BIAS::SVD::SqrtT(), and BIAS::UnscentedTransform::UseSVD_.
Referenced by BIAS::UnscentedTransform::Transform().
|
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 |
|
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 |
int Covariance3Dto2DHomg::Project | ( | const BIAS::PoseParametrization & | Pose, |
const BIAS::HomgPoint3D & | X, | ||
const BIAS::HomgPoint3DCov & | Cov_X, | ||
BIAS::HomgPoint2D & | x, | ||
BIAS::HomgPoint2DCov & | Cov_x | ||
) | const |
compute
Definition at line 28 of file Covariance3Dto2DHomg.cpp.
References BIAS::PoseParametrization::GetCovarianceMatrix(), BIAS::PoseParametrization::GetCQ(), BIAS::HomgPoint2DCov, BIAS::HomgPoint3DCov::IsHomogenized(), BIAS::HomgPoint3D::IsHomogenized(), BIAS::Matrix< T >::MakeSymmetric(), TNT::Vector< T >::newsize(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), BIAS::Matrix< T >::SetZero(), BIAS::Vector< T >::Size(), and BIAS::UnscentedTransform::Transform().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Sets the alpha parameter.
The alpha parameter determines the spread of the sigma points
Definition at line 80 of file UnscentedTransform.hh.
|
inlineinherited |
Sets the beta parameter.
beta is used to incorporate prior knowledge of the distribution of x. For Gaussian distributions beta = 2.0 is optiomal
Definition at line 86 of file UnscentedTransform.hh.
|
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 |
|
inline |
Definition at line 60 of file Covariance3Dto2DHomg.hh.
|
inlineinherited |
Definition at line 89 of file UnscentedTransform.hh.
|
inlineinherited |
|
virtualinherited |
computes the second order approximation of the transformations of the mean and the associated covariance for the point transformation Transform_().
Implements BIAS::UncertaintyTransformBase.
Definition at line 52 of file UnscentedTransform.cpp.
References BIAS::UnscentedTransform::ComputeSigmaPoints_(), TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), BIAS::Vector< T >::OuterProduct(), BIAS::Vector< T >::SetZero(), BIAS::Matrix< T >::SetZero(), BIAS::Vector< T >::Size(), TNT::Vector< T >::size(), BIAS::Matrix< T >::Trace(), and BIAS::UnscentedTransform::Transform_().
Referenced by BIAS::EssentialPoint2Line::Compute(), BIAS::CovEuler2Quaternion::CTransform(), BIAS::Covariance3Dto2D::Project(), Project(), and BIAS::Cov3Dto2DPoseCertain::Transform().
|
protectedvirtual |
src is a vector consisting of [ 3d point, camera center, orientation ] The orientation must be represented using one case from E_Parametrization dst is the projection into the image
Implements BIAS::UnscentedTransform.
Definition at line 80 of file Covariance3Dto2DHomg.cpp.
References BIAS::PMatrixBase::Compose(), K_, BIAS::Vector< T >::NormL2(), Parametrization_, BIAS::HomgPoint3D::Set(), BIAS::Vector< T >::Size(), and useHomogenizedPoints_.
|
inline |
Definition at line 63 of file Covariance3Dto2DHomg.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 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
the alpha parameter determines the spread of the sigma points
Definition at line 94 of file UnscentedTransform.hh.
Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().
|
protectedinherited |
beta is used to incorporate prior knowledge of the distribution of x.
For Gaussian distributions beta = 2.0 is optiomal
Definition at line 97 of file UnscentedTransform.hh.
Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().
|
staticprotectedinherited |
|
protected |
Definition at line 70 of file Covariance3Dto2DHomg.hh.
Referenced by Transform_().
|
protectedinherited |
kappa is a secondary scaling parameter.
In other papers from Uhlman kappa is fixed to 1.0
Definition at line 100 of file UnscentedTransform.hh.
Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().
|
protected |
Definition at line 71 of file Covariance3Dto2DHomg.hh.
Referenced by Transform_().
|
protected |
normalize or homogenize ???
Definition at line 69 of file Covariance3Dto2DHomg.hh.
Referenced by Transform_().
|
protectedinherited |
Definition at line 102 of file UnscentedTransform.hh.
Referenced by BIAS::UnscentedTransform::ComputeSigmaPoints_().