#include <RelativeAdapterBase.hpp>
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | RelativeAdapterBase () |
Constructor. | |
RelativeAdapterBase (const rotation_t &R12) | |
Constructor. More... | |
RelativeAdapterBase (const translation_t &t12, const rotation_t &R12) | |
Constructor. More... | |
virtual | ~RelativeAdapterBase () |
Destructor. | |
virtual opengv::bearingVector_t | getBearingVector1 (size_t index) const =0 |
Retrieve the bearing vector of a correspondence in viewpoint 1. More... | |
virtual opengv::bearingVector_t | getBearingVector2 (size_t index) const =0 |
Retrieve the bearing vector of a correspondence in viewpoint 2. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
virtual size_t | getNumberCorrespondences () const =0 |
Retrieve the number of correspondences. More... | |
opengv::translation_t | gett12 () const |
Retrieve the prior or known value for the relative position. More... | |
void | sett12 (const opengv::translation_t &t12) |
Set the prior or known value for the relative position. More... | |
opengv::rotation_t | getR12 () const |
Retrieve the prior or known value for the relative rotation. More... | |
void | setR12 (const opengv::rotation_t &R12) |
Set the prior or known value for the relative rotation. More... | |
Protected Attributes | |
opengv::translation_t | _t12 |
opengv::rotation_t | _R12 |
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.
|
inline |
Constructor.
[in] | R12 | A prior or known value for the rotation from viewpoint 2 to viewpoint 1. |
|
inline |
Constructor.
[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. |
|
pure virtual |
Retrieve the bearing vector of a correspondence in viewpoint 1.
[in] | index | The serialized index of the correspondence. |
Implemented in opengv::relative_pose::RelativeMultiAdapterBase, opengv::relative_pose::NoncentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::MANoncentralRelative, and opengv::relative_pose::MACentralRelative.
|
pure virtual |
Retrieve the bearing vector of a correspondence in viewpoint 2.
[in] | index | The serialized index of the correspondence. |
Implemented in opengv::relative_pose::RelativeMultiAdapterBase, opengv::relative_pose::NoncentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::MANoncentralRelative, and opengv::relative_pose::MACentralRelative.
|
pure virtual |
Retrieve the position of a camera of a correspondence in viewpoint 1 seen from the origin of the viewpoint.
[in] | index | The serialized index of the correspondence. |
Implemented in opengv::relative_pose::RelativeMultiAdapterBase, opengv::relative_pose::NoncentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::MANoncentralRelative, and opengv::relative_pose::MACentralRelative.
|
pure virtual |
Retrieve the position of a camera of a correspondence in viewpoint 2 seen from the origin of the viewpoint.
[in] | index | The serialized index of the correspondence. |
Implemented in opengv::relative_pose::RelativeMultiAdapterBase, opengv::relative_pose::NoncentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::MANoncentralRelative, and opengv::relative_pose::MACentralRelative.
|
pure virtual |
Retrieve the rotation from a camera of a correspondence in viewpoint 1 to the viewpoint origin.
[in] | index | The serialized index of the correspondence. |
Implemented in opengv::relative_pose::RelativeMultiAdapterBase, opengv::relative_pose::NoncentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::MANoncentralRelative, and opengv::relative_pose::MACentralRelative.
|
pure virtual |
Retrieve the rotation from a camera of a correspondence in viewpoint 2 to the viewpoint origin.
[in] | index | The serialized index of the correspondence. |
Implemented in opengv::relative_pose::RelativeMultiAdapterBase, opengv::relative_pose::NoncentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::MANoncentralRelative, and opengv::relative_pose::MACentralRelative.
|
pure virtual |
Retrieve the number of correspondences.
Implemented in opengv::relative_pose::RelativeMultiAdapterBase, opengv::relative_pose::NoncentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::MANoncentralRelative, and opengv::relative_pose::MACentralRelative.
|
inline |
Retrieve the prior or known value for the relative rotation.
|
inline |
Retrieve the prior or known value for the relative position.
|
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.
[in] | index | The serialized index of the correspondence. |
Implemented in opengv::relative_pose::RelativeMultiAdapterBase, opengv::relative_pose::NoncentralRelativeAdapter, opengv::relative_pose::CentralRelativeWeightingAdapter, opengv::relative_pose::CentralRelativeAdapter, opengv::relative_pose::MANoncentralRelative, and opengv::relative_pose::MACentralRelative.
|
inline |
Set the prior or known value for the relative rotation.
[in] | R12 | The prior or known value for the rotation. |
|
inline |
Set the prior or known value for the relative position.
[in] | t12 | The prior or known value for the position. |
|
protected |
Prior or known value for the rotation from viewpoint 2 back to viewpoint 1. Initialized to identity if not provided.
|
protected |
Prior or known value for the position of viewpoint 2 seen from viewpoint 1. Initialized to zero if not provided.