26 #ifndef __EParametrization_hh__
27 #define __EParametrization_hh__
29 #include <Base/Math/Vector.hh>
30 #include <Base/Math/Vector3.hh>
31 #include <Base/Math/Matrix.hh>
32 #include <Base/Math/Matrix4x4.hh>
33 #include <Base/Geometry/Quaternion.hh>
35 #include <Base/Common/CompareFloatingPoint.hh>
41 #define EP_TYPE double
79 { SetEQ(EQvec); SetCovarianceMatrix(Cov); }
133 bool Load(
const std::string& file);
135 bool Save(
const std::string& file)
const;
141 void Normalize(
const bool update_covariance =
true);
157 orientation[0] = E[3];
158 orientation[1] = E[4];
159 orientation[2] = E[5];
160 orientation[3] = E[6];
169 E[3] = orientation[0];
170 E[4] = orientation[1];
171 E[5] = orientation[2];
172 E[6] = orientation[3];
177 BIASGeometryBase_EXPORT std::ostream&
178 operator<<(std::ostream &os,
const EParametrization& p);
180 BIASGeometryBase_EXPORT std::istream&
181 operator>>(std::istream &is, EParametrization& p);
void E2EQ_(const Vector< EP_TYPE > &E, Vector3< EP_TYPE > &epipole, Quaternion< EP_TYPE > &orientation) const
Slim class bundling essential matrix parameterization and associated covariance matrix.
void EQ2E_(const Vector3< EP_TYPE > &epipole, const Quaternion< EP_TYPE > &orientation, Vector< EP_TYPE > &E) const
Vector< EP_TYPE > E_
first 3 entries relate to the epipole, the last four to the quaternion orientation ...
Matrix< EP_TYPE > Cov_
first 3 columns relate to epipole, the last four columns relate to the orientation ...
const Matrix< EP_TYPE > & GetCov() const
returns the covariance matrix associated with the EQ vector
is a 'fixed size' quadratic matrix of dim.
std::ostream & operator<<(std::ostream &os, const Array2D< T > &arg)
class Vector3 contains a Vector of fixed dim.
const Vector< EP_TYPE > & GetEQ7() const
Returns a vector of dimension 7 where first 3 entries are the epipole and the last 4 entries are the ...
void Set(const Vector< EP_TYPE > &EQvec, const Matrix< EP_TYPE > &Cov)
is a 'fixed size' quadratic matrix of dim.
class for rotation with axis and angle
BIASCommon_EXPORT std::istream & operator>>(std::istream &is, BIAS::TimeStamp &ts)
Standard input operator for TimeStamps.