Loading...
Searching...
No Matches
opengv::relative_pose::RelativeAdapterBase Class Referenceabstract

`#include <RelativeAdapterBase.hpp>`

Inheritance diagram for opengv::relative_pose::RelativeAdapterBase:

## Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW | RelativeAdapterBase ()
| Constructor.
| RelativeAdapterBase (const rotation_t &R12)
| Constructor.
| RelativeAdapterBase (const translation_t &t12, const rotation_t &R12)
| Constructor.
virtual | ~RelativeAdapterBase ()
| Destructor.
virtual opengv::bearingVector_t | getBearingVector1 (size_t index) const =0
| Retrieve the bearing vector of a correspondence in viewpoint 1.
virtual opengv::bearingVector_t | getBearingVector2 (size_t index) const =0
| Retrieve the bearing vector of a correspondence in viewpoint 2.
virtual double | getWeight (size_t index) const =0
| Retrieve the weight of a correspondence. The weight is supposed to reflect the quality of a correspondence, and typically is between 0 and 1.
virtual opengv::translation_t | getCamOffset1 (size_t index) const =0
| Retrieve the position of a camera of a correspondence in viewpoint 1 seen from the origin of the viewpoint.
virtual opengv::rotation_t | getCamRotation1 (size_t index) const =0
| Retrieve the rotation from a camera of a correspondence in viewpoint 1 to the viewpoint origin.
virtual opengv::translation_t | getCamOffset2 (size_t index) const =0
| Retrieve the position of a camera of a correspondence in viewpoint 2 seen from the origin of the viewpoint.
virtual opengv::rotation_t | getCamRotation2 (size_t index) const =0
| Retrieve the rotation from a camera of a correspondence in viewpoint 2 to the viewpoint origin.
virtual size_t | getNumberCorrespondences () const =0
| Retrieve the number of correspondences.
opengv::translation_t | gett12 () const
| Retrieve the prior or known value for the relative position.
void | sett12 (const opengv::translation_t &t12)
| Set the prior or known value for the relative position.
opengv::rotation_t | getR12 () const
| Retrieve the prior or known value for the relative rotation.
void | setR12 (const opengv::rotation_t &R12)
| Set the prior or known value for the relative rotation.

## Protected Attributes

opengv::translation_t | _t12
opengv::rotation_t | _R12

## Detailed Description

The RelativeAdapterBase is the base-class for the visitors to the central and non-central relative pose algorithms. It provides a unified interface to opengv-methods to access bearing-vector correspondences, priors or known variables for the relative pose, and the multi-camera configuration in the non-central case. Derived classes may hold the data in any user-specific format, and adapt to opengv-types.

## Constructor & Destructor Documentation

## RelativeAdapterBase() [1/2]

opengv::relative_pose::RelativeAdapterBase::RelativeAdapterBase | ( | const rotation_t & | R12 | ) |

inline

Constructor.

Parameters

  [in] | R12 | A prior or known value for the rotation from viewpoint 2 to viewpoint 1.

## RelativeAdapterBase() [2/2]

opengv::relative_pose::RelativeAdapterBase::RelativeAdapterBase | ( | const translation_t & | t12,
|  | const rotation_t & | R12 )

inline

Constructor.

Parameters

  [in] | t12 | A prior or known value for the position of viewpoint 2 seen from viewpoint 1.
  [in] | R12 | A prior or known value for the rotation from viewpoint 2 to viewpoint 1.

## Member Function Documentation

## getBearingVector1()

virtual opengv::bearingVector_t opengv::relative_pose::RelativeAdapterBase::getBearingVector1 | ( | size_t | index | ) | const

pure virtual

Retrieve the bearing vector of a correspondence in viewpoint 1.

Parameters

  [in] | index | The serialized index of the correspondence.

Returns
  The corresponding bearing vector.

Implemented in opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::MACentralRelative, opengv::relative_pose::MANoncentralRelative, opengv::relative_pose::NoncentralRelativeAdapter, and opengv::relative_pose::RelativeMultiAdapterBase.

## getBearingVector2()

virtual opengv::bearingVector_t opengv::relative_pose::RelativeAdapterBase::getBearingVector2 | ( | size_t | index | ) | const

pure virtual

Retrieve the bearing vector of a correspondence in viewpoint 2.

Parameters

  [in] | index | The serialized index of the correspondence.

Returns
  The corresponding bearing vector.

Implemented in opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::MACentralRelative, opengv::relative_pose::MANoncentralRelative, opengv::relative_pose::NoncentralRelativeAdapter, and opengv::relative_pose::RelativeMultiAdapterBase.

## getCamOffset1()

virtual opengv::translation_t opengv::relative_pose::RelativeAdapterBase::getCamOffset1 | ( | size_t | index | ) | const

pure virtual

Retrieve the position of a camera of a correspondence in viewpoint 1 seen from the origin of the viewpoint.

Parameters

  [in] | index | The serialized index of the correspondence.

Returns
  The position of the corresponding camera seen from the viewpoint origin.

Implemented in opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::MACentralRelative, opengv::relative_pose::MANoncentralRelative, opengv::relative_pose::NoncentralRelativeAdapter, and opengv::relative_pose::RelativeMultiAdapterBase.

## getCamOffset2()

virtual opengv::translation_t opengv::relative_pose::RelativeAdapterBase::getCamOffset2 | ( | size_t | index | ) | const

pure virtual

Retrieve the position of a camera of a correspondence in viewpoint 2 seen from the origin of the viewpoint.

Parameters

  [in] | index | The serialized index of the correspondence.

Returns
  The position of the corresponding camera seen from the viewpoint origin.

Implemented in opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::MACentralRelative, opengv::relative_pose::MANoncentralRelative, opengv::relative_pose::NoncentralRelativeAdapter, and opengv::relative_pose::RelativeMultiAdapterBase.

## getCamRotation1()

virtual opengv::rotation_t opengv::relative_pose::RelativeAdapterBase::getCamRotation1 | ( | size_t | index | ) | const

pure virtual

Retrieve the rotation from a camera of a correspondence in viewpoint 1 to the viewpoint origin.

Parameters

  [in] | index | The serialized index of the correspondence.

Returns
  The rotation from the corresponding camera back to the viewpoint origin.

Implemented in opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::MACentralRelative, opengv::relative_pose::MANoncentralRelative, opengv::relative_pose::NoncentralRelativeAdapter, and opengv::relative_pose::RelativeMultiAdapterBase.

## getCamRotation2()

virtual opengv::rotation_t opengv::relative_pose::RelativeAdapterBase::getCamRotation2 | ( | size_t | index | ) | const

pure virtual

Retrieve the rotation from a camera of a correspondence in viewpoint 2 to the viewpoint origin.

Parameters

  [in] | index | The serialized index of the correspondence.

Returns
  The rotation from the corresponding camera back to the viewpoint origin.

Implemented in opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::MACentralRelative, opengv::relative_pose::MANoncentralRelative, opengv::relative_pose::NoncentralRelativeAdapter, and opengv::relative_pose::RelativeMultiAdapterBase.

## getNumberCorrespondences()

virtual size_t opengv::relative_pose::RelativeAdapterBase::getNumberCorrespondences | ( |  | ) | const

pure virtual

Retrieve the number of correspondences.

Returns
  The number of correspondences.

Implemented in opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::MACentralRelative, opengv::relative_pose::MANoncentralRelative, opengv::relative_pose::NoncentralRelativeAdapter, and opengv::relative_pose::RelativeMultiAdapterBase.

## getR12()

opengv::rotation_t opengv::relative_pose::RelativeAdapterBase::getR12 | ( |  | ) | const

inline

Retrieve the prior or known value for the relative rotation.

Returns
  The prior or known value for the rotation.

## gett12()

opengv::translation_t opengv::relative_pose::RelativeAdapterBase::gett12 | ( |  | ) | const

inline

Retrieve the prior or known value for the relative position.

Returns
  The prior or known value for the position.

## getWeight()

virtual double opengv::relative_pose::RelativeAdapterBase::getWeight | ( | size_t | index | ) | const

pure virtual

Retrieve the weight of a correspondence. The weight is supposed to reflect the quality of a correspondence, and typically is between 0 and 1.

Parameters

  [in] | index | The serialized index of the correspondence.

Returns
  The corresponding weight.

Implemented in opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::MACentralRelative, opengv::relative_pose::MANoncentralRelative, opengv::relative_pose::NoncentralRelativeAdapter, and opengv::relative_pose::RelativeMultiAdapterBase.

## setR12()

void opengv::relative_pose::RelativeAdapterBase::setR12 | ( | const opengv::rotation_t & | R12 | ) |

inline

Set the prior or known value for the relative rotation.

Parameters

  [in] | R12 | The prior or known value for the rotation.

## sett12()

void opengv::relative_pose::RelativeAdapterBase::sett12 | ( | const opengv::translation_t & | t12 | ) |

inline

Set the prior or known value for the relative position.

Parameters

  [in] | t12 | The prior or known value for the position.

## Member Data Documentation

## _R12

opengv::rotation_t opengv::relative_pose::RelativeAdapterBase::_R12

protected

Prior or known value for the rotation from viewpoint 2 back to viewpoint 1. Initialized to identity if not provided.

## _t12

opengv::translation_t opengv::relative_pose::RelativeAdapterBase::_t12

protected

Prior or known value for the position of viewpoint 2 seen from viewpoint 1. Initialized to zero if not provided.

The documentation for this class was generated from the following file:

- include/opengv/relative_pose/RelativeAdapterBase.hpp