Loading...
Searching...
No Matches
opengv::math Namespace Reference

The namespace of the math tools. More...

## Classes

class | Bracket
class | Sturm

## Functions

rotation_t | arun (const Eigen::MatrixXd &Hcross)
| Arun's method for computing the rotation between two point sets. Core function [13].
transformation_t | arun_complete (const points_t &p1, const points_t &p2)
| Arun's method for complete point cloud alignment [13]. The method actually does the same than threept_arun, but has a different interface.
rotation_t | cayley2rot (const cayley_t &cayley)
| Compute a rotation matrix from Cayley-parameters, following [14].
rotation_t | cayley2rot_reduced (const cayley_t &cayley)
| Compute a fake rotation matrix from Cayley-parameters, following [14]. The rotation matrix is missing the scaling parameter of the Cayley-transform. This short form is useful for the Jacobian-based iterative rotation optimization of the eigensolver [11].
cayley_t | rot2cayley (const rotation_t &R)
| Compute the Cayley-parameters of a rotation matrix, following [14].
void | gauss_jordan (std::vector< std::vector< double > * > &matrix, int exitCondition=0)
| Sparse, fast Gauss Jordan elimination on matrices with a left square invertible block.
rotation_t | quaternion2rot (const quaternion_t &quaternion)
| Compute a rotation matrix from quaternion-parameters. Assumes that the quaternion has unit norm.
quaternion_t | rot2quaternion (const rotation_t &R)
| Compute the quaternion-parameters of a rotation matrix.
std::vector< double > | o3_roots (const std::vector< double > &p)
| The roots of a third-order polynomial.
std::vector< double > | o4_roots (const Eigen::MatrixXd &p)
| Ferrari's method for computing the roots of a fourth order polynomial.
std::vector< double > | o4_roots (const std::vector< double > &p)
| Ferrari's method for computing the roots of a fourth order polynomial. With a different interface.

## Detailed Description

The namespace of the math tools.

## Function Documentation

## arun()

rotation_t opengv::math::arun | ( | const Eigen::MatrixXd & | Hcross | ) |

Arun's method for computing the rotation between two point sets. Core function [13].

Parameters

  [in] | Hcross | The summation over the exterior products between the normalized points.

Returns
  The rotation matrix that aligns the points.

## arun_complete()

transformation_t opengv::math::arun_complete | ( | const points_t & | p1,
|  | const points_t & | p2 )

Arun's method for complete point cloud alignment [13]. The method actually does the same than threept_arun, but has a different interface.

Parameters

  [in] | p1 | The points expressed in the first frame.
  [in] | p2 | The points expressed in the second frame.

Returns
  The Transformation from frame 2 to frame 1 ( , with being the position of frame 2 seen from frame 1, and being the rotation from frame 2 to frame 1).

## cayley2rot()

rotation_t opengv::math::cayley2rot | ( | const cayley_t & | cayley | ) |

Compute a rotation matrix from Cayley-parameters, following [14].

Parameters

  [in] | cayley | The Cayley-parameters of a rotation.

Returns
  The 3x3 rotation matrix.

## cayley2rot_reduced()

rotation_t opengv::math::cayley2rot_reduced | ( | const cayley_t & | cayley | ) |

Compute a fake rotation matrix from Cayley-parameters, following [14]. The rotation matrix is missing the scaling parameter of the Cayley-transform. This short form is useful for the Jacobian-based iterative rotation optimization of the eigensolver [11].

Parameters

  [in] | cayley | The Cayley-parameters of the rotation.

Returns
  The false 3x3 rotation matrix.

## gauss_jordan()

void opengv::math::gauss_jordan | ( | std::vector< std::vector< double > * > & | matrix,
|  | int | exitCondition = 0 )

Sparse, fast Gauss Jordan elimination on matrices with a left square invertible block.

Parameters

  [in] | matrix | The matrix.
  [in] | exitCondition | The last row we process when stepping up.

## o3_roots()

std::vector< double > opengv::math::o3_roots | ( | const std::vector< double > & | p | ) |

The roots of a third-order polynomial.

Parameters

  [in] | p | The polynomial coefficients (poly = p[0]*x^3 + p[1]*x^2 ...).

Returns
  The roots of the polynomial (only real ones).

## o4_roots() [1/2]

std::vector< double > opengv::math::o4_roots | ( | const Eigen::MatrixXd & | p | ) |

Ferrari's method for computing the roots of a fourth order polynomial.

Parameters

  [in] | p | The polynomial coefficients (poly = p(0,0)*x^4 + p(1,0)*x^3 ...).

Returns
  The roots of the polynomial (only real ones).

## o4_roots() [2/2]

std::vector< double > opengv::math::o4_roots | ( | const std::vector< double > & | p | ) |

Ferrari's method for computing the roots of a fourth order polynomial. With a different interface.

Parameters

  [in] | p | The polynomial coefficients (poly = p[0]*x^4 + p[1]*x^3 ...).

Returns
  The roots of the polynomial (only real ones).

## quaternion2rot()

rotation_t opengv::math::quaternion2rot | ( | const quaternion_t & | quaternion | ) |

Compute a rotation matrix from quaternion-parameters. Assumes that the quaternion has unit norm.

Parameters

  [in] | quaternion | The quaternion-parameters of a rotation.

Returns
  The 3x3 rotation matrix.

## rot2cayley()

cayley_t opengv::math::rot2cayley | ( | const rotation_t & | R | ) |

Compute the Cayley-parameters of a rotation matrix, following [14].

Parameters

  [in] | R | The 3x3 rotation matrix.

Returns
  The Cayley-parameters.

## rot2quaternion()

quaternion_t opengv::math::rot2quaternion | ( | const rotation_t & | R | ) |

Compute the quaternion-parameters of a rotation matrix.

Parameters

  [in] | R | The 3x3 rotation matrix.

Returns
  The quaternion-parameters.