OpenGV
A library for solving calibrated central and non-central geometric vision problems
opengv::relative_pose::RelativeAdapterBase Class Referenceabstract

#include <RelativeAdapterBase.hpp>

Inheritance diagram for opengv::relative_pose::RelativeAdapterBase:
opengv::relative_pose::CentralRelativeAdapter opengv::relative_pose::CentralRelativeWeightingAdapter opengv::relative_pose::MACentralRelative opengv::relative_pose::MANoncentralRelative opengv::relative_pose::NoncentralRelativeAdapter opengv::relative_pose::RelativeMultiAdapterBase opengv::relative_pose::CentralRelativeMultiAdapter opengv::relative_pose::MANoncentralRelativeMulti opengv::relative_pose::NoncentralRelativeMultiAdapter

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
 

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

opengv::relative_pose::RelativeAdapterBase::RelativeAdapterBase ( const rotation_t R12)
inline

Constructor.

Parameters
[in]R12A prior or known value for the rotation from viewpoint 2 to viewpoint 1.
opengv::relative_pose::RelativeAdapterBase::RelativeAdapterBase ( const translation_t t12,
const rotation_t R12 
)
inline

Constructor.

Parameters
[in]t12A prior or known value for the position of viewpoint 2 seen from viewpoint 1.
[in]R12A prior or known value for the rotation from viewpoint 2 to viewpoint 1.

Member Function Documentation

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]indexThe serialized index of the correspondence.
Returns
The corresponding bearing vector.

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.

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]indexThe serialized index of the correspondence.
Returns
The corresponding bearing vector.

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.

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]indexThe serialized index of the correspondence.
Returns
The position of the corresponding camera seen from the viewpoint origin.

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.

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]indexThe serialized index of the correspondence.
Returns
The position of the corresponding camera seen from the viewpoint origin.

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.

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]indexThe serialized index of the correspondence.
Returns
The rotation from the corresponding camera back to the viewpoint origin.

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.

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]indexThe serialized index of the correspondence.
Returns
The rotation from the corresponding camera back to the viewpoint origin.

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.

virtual size_t opengv::relative_pose::RelativeAdapterBase::getNumberCorrespondences ( ) const
pure virtual
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.
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.
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]indexThe serialized index of the correspondence.
Returns
The corresponding weight.

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.

void opengv::relative_pose::RelativeAdapterBase::setR12 ( const opengv::rotation_t R12)
inline

Set the prior or known value for the relative rotation.

Parameters
[in]R12The prior or known value for the rotation.
void opengv::relative_pose::RelativeAdapterBase::sett12 ( const opengv::translation_t t12)
inline

Set the prior or known value for the relative position.

Parameters
[in]t12The prior or known value for the position.

Member Data Documentation

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.

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: