Basic Image AlgorithmS Library
2.8.0
|
Slim class bundeling pose parametrization and associated covariance matrix. More...
#include <Base/Geometry/PoseParametrization.hh>
Public Member Functions | |
const Matrix< PP_TYPE > & | GetCovarianceMatrix () const |
returns the covariance matrix associated with the CQ vector More... | |
const Vector< PP_TYPE > & | GetCQ () const |
returns a vector of dimension 7 where first 3 entries are the position and the last 4 entries are the quaternion orientation More... | |
Quaternion< PP_TYPE > | GetOrientation () const |
returns the quaternion (last 4 entries) part of the pose parametrization vector More... | |
Vector3< PP_TYPE > | GetPosition () const |
returns the position (first 3 entries) part of the pose parametrization vector More... | |
bool | Load (const std::string &file) |
PoseParametrization () | |
PoseParametrization (const Vector< PP_TYPE > &CQvec, const Matrix< PP_TYPE > &covariance) | |
PoseParametrization (const Vector3< PP_TYPE > &position, const Quaternion< PP_TYPE > &orientation, const Matrix< PP_TYPE > &covariance) | |
bool | Save (const std::string &file) const |
void | Set (const Vector3< PP_TYPE > &position, const Quaternion< PP_TYPE > &orientation, const Matrix< PP_TYPE > &covariance=Matrix< double >(7, 7, MatrixZero)) |
Set this from position, orientation and covariance. More... | |
void | Set (const Vector< PP_TYPE > &CQvec, const Matrix< PP_TYPE > &Cov) |
void | SetCovarianceMatrix (const Matrix< PP_TYPE > &Cov) |
Sets covariance matrix from Cov. More... | |
void | SetCQ (const Vector< PP_TYPE > &CQvec) |
Set this from pose parametrization. More... | |
void | SetCQ (const Vector3< PP_TYPE > &position, const Quaternion< PP_TYPE > &orientation) |
Set this from position and orientation. More... | |
void | SetOrientation (const Quaternion< PP_TYPE > &q) |
set orientation part of vector and zero covariance matrix More... | |
void | SetPosition (const Vector3< PP_TYPE > &C) |
set position part of vector and zero covariance matrix More... | |
void | Transform (const Vector3< double > &T, const Quaternion< double > &q) |
Transforms the pose and associated covariance according to the point transformation parametrized as translation T and rotation Q. More... | |
void | Transform (const Vector3< double > &T, const Quaternion< double > &q, const double s) |
Transforms the pose and associated covariance according to the point transformation parametrized as translation T, rotation Q and scale s. More... | |
Protected Member Functions | |
void | CQ2Pose_ (const Vector3< PP_TYPE > &position, const Quaternion< PP_TYPE > &orientation, Vector< PP_TYPE > &pose) const |
void | Pose2CQ_ (const Vector< PP_TYPE > &pose, Vector3< PP_TYPE > &position, Quaternion< PP_TYPE > &orientation) const |
Protected Attributes | |
Matrix< PP_TYPE > | Cov_ |
first columns relate to position More... | |
Vector< PP_TYPE > | Pose_ |
first 3 entries relate to the position More... | |
Slim class bundeling pose parametrization and associated covariance matrix.
The pose is parametrized as vector of dimension 7 where the first 3 entries represent the position (euclidean vector of dimension 3) and the last 4 entries represent the quaternion orientation.
Definition at line 50 of file PoseParametrization.hh.
PoseParametrization::PoseParametrization | ( | ) |
Definition at line 13 of file PoseParametrization.cpp.
References Pose_, and BIAS::Vector< T >::SetZero().
PoseParametrization::PoseParametrization | ( | const Vector< PP_TYPE > & | CQvec, |
const Matrix< PP_TYPE > & | covariance | ||
) |
Definition at line 23 of file PoseParametrization.cpp.
References Set().
PoseParametrization::PoseParametrization | ( | const Vector3< PP_TYPE > & | position, |
const Quaternion< PP_TYPE > & | orientation, | ||
const Matrix< PP_TYPE > & | covariance | ||
) |
Definition at line 32 of file PoseParametrization.cpp.
References Set().
|
inlineprotected |
Definition at line 141 of file PoseParametrization.hh.
|
inline |
returns the covariance matrix associated with the CQ vector
Definition at line 89 of file PoseParametrization.hh.
Referenced by BIAS::operator<<(), BIAS::Covariance3Dto2DHomg::Project(), and BIAS::Pose::Set().
|
inline |
returns a vector of dimension 7 where first 3 entries are the position and the last 4 entries are the quaternion orientation
Definition at line 85 of file PoseParametrization.hh.
Referenced by BIAS::Covariance3Dto2DHomg::Project().
Quaternion< PP_TYPE > PoseParametrization::GetOrientation | ( | ) | const |
returns the quaternion (last 4 entries) part of the pose parametrization vector
Definition at line 94 of file PoseParametrization.cpp.
References Pose2CQ_(), and Pose_.
Referenced by BIAS::operator<<(), BIAS::Pose::Set(), BIAS::Projection3DData::Set(), and BIAS::DualQuaternion< QUAT_TYPE >::SetFromPoseParametrization().
Vector3< PP_TYPE > PoseParametrization::GetPosition | ( | ) | const |
returns the position (first 3 entries) part of the pose parametrization vector
Definition at line 84 of file PoseParametrization.cpp.
References Pose2CQ_(), and Pose_.
Referenced by BIAS::operator<<(), BIAS::Pose::Set(), BIAS::Projection3DData::Set(), and BIAS::DualQuaternion< QUAT_TYPE >::SetFromPoseParametrization().
bool PoseParametrization::Load | ( | const std::string & | file | ) |
Definition at line 125 of file PoseParametrization.cpp.
|
inlineprotected |
Definition at line 129 of file PoseParametrization.hh.
Referenced by GetOrientation(), and GetPosition().
bool PoseParametrization::Save | ( | const std::string & | file | ) | const |
Definition at line 141 of file PoseParametrization.cpp.
void PoseParametrization::Set | ( | const Vector3< PP_TYPE > & | position, |
const Quaternion< PP_TYPE > & | orientation, | ||
const Matrix< PP_TYPE > & | covariance = Matrix<double>(7,7,MatrixZero) |
||
) |
Set this from position, orientation and covariance.
Definition at line 42 of file PoseParametrization.cpp.
References CQ2Pose_().
Referenced by BIAS::DualQuaternion< QUAT_TYPE >::GetPoseParametrization(), BIAS::operator>>(), and PoseParametrization().
|
inline |
Definition at line 76 of file PoseParametrization.hh.
void PoseParametrization::SetCovarianceMatrix | ( | const Matrix< PP_TYPE > & | Cov | ) |
Sets covariance matrix from Cov.
Cov must be a 7x7 symmetric positiv definit matrix (i.e. a covariance matrix)
Definition at line 73 of file PoseParametrization.cpp.
References Cov_, TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().
Referenced by BIAS::Pose::GetPoseParameters().
void PoseParametrization::SetCQ | ( | const Vector< PP_TYPE > & | CQvec | ) |
Set this from pose parametrization.
Zeros associated covarinace matrix
Definition at line 62 of file PoseParametrization.cpp.
References Cov_, Pose_, BIAS::Matrix< T >::SetZero(), and TNT::Vector< T >::size().
void PoseParametrization::SetCQ | ( | const Vector3< PP_TYPE > & | position, |
const Quaternion< PP_TYPE > & | orientation | ||
) |
Set this from position and orientation.
Zeros associated covarinace matrix
Definition at line 51 of file PoseParametrization.cpp.
References Cov_, CQ2Pose_(), Pose_, and BIAS::Matrix< T >::SetZero().
void PoseParametrization::SetOrientation | ( | const Quaternion< PP_TYPE > & | q | ) |
set orientation part of vector and zero covariance matrix
Definition at line 114 of file PoseParametrization.cpp.
References Cov_, Pose_, and BIAS::Matrix< T >::SetZero().
Referenced by BIAS::Pose::GetPoseParameters().
void PoseParametrization::SetPosition | ( | const Vector3< PP_TYPE > & | C | ) |
set position part of vector and zero covariance matrix
Definition at line 104 of file PoseParametrization.cpp.
References Cov_, Pose_, and BIAS::Matrix< T >::SetZero().
Referenced by BIAS::Pose::GetPoseParameters().
void BIAS::PoseParametrization::Transform | ( | const Vector3< double > & | T, |
const Quaternion< double > & | q | ||
) |
Transforms the pose and associated covariance according to the point transformation parametrized as translation T and rotation Q.
void BIAS::PoseParametrization::Transform | ( | const Vector3< double > & | T, |
const Quaternion< double > & | q, | ||
const double | s | ||
) |
Transforms the pose and associated covariance according to the point transformation parametrized as translation T, rotation Q and scale s.
|
protected |
first columns relate to position
Definition at line 127 of file PoseParametrization.hh.
Referenced by SetCovarianceMatrix(), SetCQ(), SetOrientation(), and SetPosition().
|
protected |
first 3 entries relate to the position
Definition at line 125 of file PoseParametrization.hh.
Referenced by GetOrientation(), GetPosition(), PoseParametrization(), SetCQ(), SetOrientation(), and SetPosition().