|
template<int D> |
TooN::Matrix< D > | tag::computeRotation (const std::vector< TooN::Vector< D > > &a, const std::vector< TooN::Vector< D > > &b) |
|
TooN::SO3 | tag::computeOrientation (const std::vector< TooN::Vector< 3 > > &a, const std::vector< TooN::Vector< 3 > > &b) |
|
TooN::SO2 | tag::computeOrientation (const std::vector< TooN::Vector< 2 > > &a, const std::vector< TooN::Vector< 2 > > &b) |
|
TooN::SO3 | tag::computeOrientation (const TooN::Vector< 3 > &a1, const TooN::Vector< 3 > &b1, const TooN::Vector< 3 > &a2, const TooN::Vector< 3 > &b2) |
|
template<int D> |
std::pair< TooN::Matrix< D >
, TooN::Vector< D > > | tag::computeAbsoluteOrientation (const std::vector< TooN::Vector< D > > &a, const std::vector< TooN::Vector< D > > &b) |
|
TooN::SE3 | tag::computeAbsoluteOrientation (const std::vector< TooN::Vector< 3 > > &a, const std::vector< TooN::Vector< 3 > > &b) |
|
TooN::SE2 | tag::computeAbsoluteOrientation (const std::vector< TooN::Vector< 2 > > &a, const std::vector< TooN::Vector< 2 > > &b) |
|
template<int D> |
std::tr1::tuple< TooN::Matrix
< D >, TooN::Vector< D >
, TooN::DefaultPrecision > | tag::computeSimilarity (const std::vector< TooN::Vector< D > > &a, const std::vector< TooN::Vector< D > > &b) |
|
TooN::SIM3 | tag::computeSimilarity (const std::vector< TooN::Vector< 3 > > &a, const std::vector< TooN::Vector< 3 > > &b) |
|
TooN::SIM2 | tag::computeSimilarity (const std::vector< TooN::Vector< 2 > > &a, const std::vector< TooN::Vector< 2 > > &b) |
|
TooN::SO3 | tag::computeMeanOrientation (const std::vector< TooN::SO3<> > &r) |
|
TooN::Matrix< 3 > | tag::quaternionToMatrix (const TooN::Vector< 4 > &q) |
|
contains various functions to calculate rotations and rigid transformations between sets of D-dim correspondences. There are special case functions for 2D and 3D points sets that directly return SO2, SO3, SE2 and SE3 objects.
template<int D>
std::pair<TooN::Matrix<D>, TooN::Vector<D> > tag::computeAbsoluteOrientation |
( |
const std::vector< TooN::Vector< D > > & |
a, |
|
|
const std::vector< TooN::Vector< D > > & |
b |
|
) |
| |
computes the rigid transformation between two corresponding D dimensional point sets after Shinji Umeyama, Least-squares estimation of transformation parameters between two point patterns. IEEE PAMI, 13(4):376-380, 1991. The result is a rotation matrix R and a translation vector t that map points from vector a to points from vector b : b[i] = R * a[i] + t
- Parameters
-
[in] | a | vector of D-dim points |
[in] | b | vector of D-dim points |
- Returns
- std::pair containing R and t such that b[i] = R * a[i] + t
References tag::Internal::computeOrientationScale().
Referenced by tag::fourPointPose(), and tag::fourPointPoseFromCamera().
TooN::SE3 tag::computeAbsoluteOrientation |
( |
const std::vector< TooN::Vector< 3 > > & |
a, |
|
|
const std::vector< TooN::Vector< 3 > > & |
b |
|
) |
| |
|
inline |
overload of computeAbsoluteOrientation that computes the rigid transformation between two corresponding 3D point sets as an SE3 that maps points from vector a to points from vector b : b[i] = SE3 * a[i]
- Parameters
-
[in] | a | vector of 3D points |
[in] | b | vector of 3D points |
- Returns
- TooN::SE3 T containing the transformation such that b = T a
TooN::SE2 tag::computeAbsoluteOrientation |
( |
const std::vector< TooN::Vector< 2 > > & |
a, |
|
|
const std::vector< TooN::Vector< 2 > > & |
b |
|
) |
| |
|
inline |
overload of computeAbsoluteOrientation that computes the rigid transformation between two corresponding 2D point sets as an SE2 that maps points from vector a to points from vector b : b[i] = SE2 * a[i]
- Parameters
-
[in] | a | vector of 2D points |
[in] | b | vector of 2D points |
- Returns
- TooN::SE2 T containing the transformation such that b = T a
TooN::SO3 tag::computeMeanOrientation |
( |
const std::vector< TooN::SO3<> > & |
r | ) |
|
computes the mean rotation of a set of rotations. This is the rotation R such that R^{-1} * R_i is minimal for all R_i.
- Parameters
-
[in] | r | a vector of rotations |
- Returns
- TooN::SO3 mean rotation of all input rotations
TooN::SO3 tag::computeOrientation |
( |
const std::vector< TooN::Vector< 3 > > & |
a, |
|
|
const std::vector< TooN::Vector< 3 > > & |
b |
|
) |
| |
|
inline |
computes the rotation between two sets of 3D points maximizing b * Ta This function returns only the rotation matrix as an SO3<> computed after Shinji Umeyama, Least-squares estimation of transformation parameters between two point patterns. IEEE PAMI, 13(4):376-380, 1991.
- Parameters
-
[in] | a | vector of 3D points |
[in] | b | vector of 3D points |
- Returns
- TooN::SO3 containing the rotation such that b = T a
References tag::Internal::computeOrientationScale().
Referenced by tag::CameraRotation::estimate(), and tag::solveXABX().
TooN::SO2 tag::computeOrientation |
( |
const std::vector< TooN::Vector< 2 > > & |
a, |
|
|
const std::vector< TooN::Vector< 2 > > & |
b |
|
) |
| |
|
inline |
computes the rotation between two sets of 2D points maximizing b * Ta This function returns only the rotation matrix as an SO3<> computed after Shinji Umeyama, Least-squares estimation of transformation parameters between two point patterns. IEEE PAMI, 13(4):376-380, 1991.
- Parameters
-
[in] | a | vector of 2D points |
[in] | b | vector of 2D points |
- Returns
- TooN::SO3 containing the rotation such that b = T a
References tag::Internal::computeOrientationScale().
TooN::SO3 tag::computeOrientation |
( |
const TooN::Vector< 3 > & |
a1, |
|
|
const TooN::Vector< 3 > & |
b1, |
|
|
const TooN::Vector< 3 > & |
a2, |
|
|
const TooN::Vector< 3 > & |
b2 |
|
) |
| |
directly computes a rotation between two pairs of rays in space maximizing b * T a its about 8x faster then using the general computeOrientation for 2 correspondences.
- Parameters
-
[in] | a1 | first input vector |
[in] | b1 | first output vector |
[in] | a2 | second input vector |
[in] | b2 | second output vector |
- Returns
- TooN::SO3 containing the rotation such that b = T a
References tag::canonicalOrientation().
template<int D>
TooN::Matrix<D> tag::computeRotation |
( |
const std::vector< TooN::Vector< D > > & |
a, |
|
|
const std::vector< TooN::Vector< D > > & |
b |
|
) |
| |
|
inline |
computes the rotation between two sets of D-dim points maximizing b * Ta This function returns only the rotation matrix computed after Shinji Umeyama, Least-squares estimation of transformation parameters between two point patterns. IEEE PAMI, 13(4):376-380, 1991.
- Parameters
-
[in] | a | vector of D-dim points |
[in] | b | vector of D-dim points |
- Returns
- DxD matrix R describing the rotation such that b = R a
References tag::Internal::computeOrientationScale().
template<int D>
std::tr1::tuple<TooN::Matrix<D>, TooN::Vector<D>, TooN::DefaultPrecision > tag::computeSimilarity |
( |
const std::vector< TooN::Vector< D > > & |
a, |
|
|
const std::vector< TooN::Vector< D > > & |
b |
|
) |
| |
computes the rigid transformation between two corresponding D dimensional point sets after Shinji Umeyama, Least-squares estimation of transformation parameters between two point patterns. IEEE PAMI, 13(4):376-380, 1991. The result is a rotation matrix R, a scale factor s and a translation vector t that map points from vector a to points from vector b : b[i] = s * R * a[i] + t
- Parameters
-
[in] | a | vector of D-dim points |
[in] | b | vector of D-dim points |
- Returns
- std::tuple containing R, t and s such that b[i] = s * R * a[i] + t
References tag::Internal::computeOrientationScale(), and make_tuple.
TooN::SIM3 tag::computeSimilarity |
( |
const std::vector< TooN::Vector< 3 > > & |
a, |
|
|
const std::vector< TooN::Vector< 3 > > & |
b |
|
) |
| |
|
inline |
alternative to computeSimilarity that computes the rigid transformation between two corresponding 3D point sets as an SE3 and a scale S that maps points from vector a to points from vector b : b[i] = SE3 * S * a[i]
- Parameters
-
[in] | a | vector of 3D points |
[in] | b | vector of 3D points |
- Returns
- a pair consisting of a TooN::SE3 T and a double S containing the transformation such that b = T * S * a
TooN::SIM2 tag::computeSimilarity |
( |
const std::vector< TooN::Vector< 2 > > & |
a, |
|
|
const std::vector< TooN::Vector< 2 > > & |
b |
|
) |
| |
|
inline |
alternative to computeSimilarity that computes the rigid transformation between two corresponding 2D point sets as an SE2 and a scale S that maps points from vector a to points from vector b : b[i] = SE2 * S * a[i]
- Parameters
-
[in] | a | vector of 2D points |
[in] | b | vector of 2D points |
- Returns
- a pair consisting of a TooN::SE2 T and a double S containing the transformation such that b = T * S * a
TooN::Matrix< 3 > tag::quaternionToMatrix |
( |
const TooN::Vector< 4 > & |
q | ) |
|
computes a rotation matrix corresponding to a unit quaternion. The quaternion is in the format (q0,qx,qy,qz).
- Parameters
-
[in] | q | a 4-vector containing the coefficients of a unit quaternion as (q0,qx,qy,qz) |
- Returns
- a 3x3 rotation matrix corresponding to the quaternion