Ocean
Ocean::CV::EigenUtilities Class Reference

This class provides several helper classes allowing to convert between Ocean data structures and Eigen data structures. More...

Static Public Member Functions

template<typename T >
static bool frame2matrix (const Frame &frame, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > &matrix)
 Converts a frame to an Eigen matrix with column major memory layout (default in Eigen). More...
 
template<typename T >
static bool frame2matrix (const Frame &frame, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > &matrix)
 Converts a frame to an Eigen matrix with row major memory layout. More...
 
template<typename TType >
static Eigen::Matrix< TType, 2, 1 > toEigenVector (const VectorT2< TType > &ocnVector)
 Converts an Ocean 2D vector to a corresponding Eigen vector. More...
 
template<typename TType >
static Eigen::Matrix< TType, 3, 1 > toEigenVector (const VectorT3< TType > &ocnVector)
 Converts an Ocean 3D vector to a corresponding Eigen vector. More...
 
template<typename TType >
static Eigen::Matrix< TType, 4, 1 > toEigenVector (const VectorT4< TType > &ocnVector)
 Converts an Ocean 4D vector to a corresponding Eigen vector. More...
 
template<typename TType >
static VectorT2< TType > toOceanVector (const Eigen::Matrix< TType, 2, 1 > &eigenVector)
 Converts an Eigen 2D vector to a corresponding Ocean vector. More...
 
template<typename TType >
static VectorT3< TType > toOceanVector (const Eigen::Matrix< TType, 3, 1 > &eigenVector)
 Converts an Eigen 3D vector to a corresponding Ocean vector. More...
 
template<typename TType >
static VectorT4< TType > toOceanVector (const Eigen::Matrix< TType, 4, 1 > &eigenVector)
 Converts an Eigen 4D vector to a corresponding Ocean vector. More...
 
template<typename TType >
static Eigen::Quaternion< TType > toEigenQuaternion (const QuaternionT< TType > &ocnQuaternion)
 Converts an Ocean quaternion to an Eigen quaternion. More...
 
template<typename TType >
static QuaternionT< TType > toOceanQuaternion (const Eigen::Quaternion< TType > &eigenQuaternion)
 Converts an Eigen quaternion to an Ocean quaternion. More...
 

Detailed Description

This class provides several helper classes allowing to convert between Ocean data structures and Eigen data structures.

Member Function Documentation

◆ frame2matrix() [1/2]

template<typename T >
bool Ocean::CV::EigenUtilities::frame2matrix ( const Frame frame,
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > &  matrix 
)
static

Converts a frame to an Eigen matrix with column major memory layout (default in Eigen).

Parameters
frameThe frame to be converted, must be a 1 channel 'unsigned char' or 'float' frame, must be valid
matrixThe resulting matrix receiving a copy of the frame data
Returns
True, if succeeded

◆ frame2matrix() [2/2]

template<typename T >
bool Ocean::CV::EigenUtilities::frame2matrix ( const Frame frame,
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > &  matrix 
)
static

Converts a frame to an Eigen matrix with row major memory layout.

Parameters
frameThe frame to be converted, must be a 1 channel 'unsigned char' or 'float' frame, must be valid
matrixThe resulting matrix receiving a copy of the frame data
Returns
True, if succeeded

◆ toEigenQuaternion()

template<typename TType >
Eigen::Quaternion< TType > Ocean::CV::EigenUtilities::toEigenQuaternion ( const QuaternionT< TType > &  ocnQuaternion)
static

Converts an Ocean quaternion to an Eigen quaternion.

Parameters
ocnQuaternionThe Ocean quaternion that will be converted to an Eigen quaternion
Returns
The resulting Eigen quaternion
Template Parameters
TTypeThe type of the quaternion elements, must be either float or double

◆ toEigenVector() [1/3]

template<typename TType >
Eigen::Matrix< TType, 2, 1 > Ocean::CV::EigenUtilities::toEigenVector ( const VectorT2< TType > &  ocnVector)
static

Converts an Ocean 2D vector to a corresponding Eigen vector.

Parameters
ocnVectorThe Ocean vector that will be converted
Returns
The Eigen vector with the same values as the Ocean vector
Template Parameters
TTypeThe type of the vector elements, must be either int, float, or double

◆ toEigenVector() [2/3]

template<typename TType >
Eigen::Matrix< TType, 3, 1 > Ocean::CV::EigenUtilities::toEigenVector ( const VectorT3< TType > &  ocnVector)
static

Converts an Ocean 3D vector to a corresponding Eigen vector.

Parameters
ocnVectorThe Ocean vector that will be converted
Returns
The Eigen vector with the same values as the Ocean vector
Template Parameters
TTypeThe type of the vector elements, must be either int, float, or double

◆ toEigenVector() [3/3]

template<typename TType >
Eigen::Matrix< TType, 4, 1 > Ocean::CV::EigenUtilities::toEigenVector ( const VectorT4< TType > &  ocnVector)
static

Converts an Ocean 4D vector to a corresponding Eigen vector.

Parameters
ocnVectorThe Ocean vector that will be converted
Returns
The Eigen vector with the same values as the Ocean vector
Template Parameters
TTypeThe type of the vector elements, must be either int, float, or double

◆ toOceanQuaternion()

template<typename TType >
QuaternionT< TType > Ocean::CV::EigenUtilities::toOceanQuaternion ( const Eigen::Quaternion< TType > &  eigenQuaternion)
static

Converts an Eigen quaternion to an Ocean quaternion.

Parameters
eigenQuaternionThe Eigen quaternion that will be converted to an Ocean quaternion
Returns
The resulting Ocean quaternion
Template Parameters
TTypeThe type of the quaternion elements, must be either float or double

◆ toOceanVector() [1/3]

template<typename TType >
VectorT2< TType > Ocean::CV::EigenUtilities::toOceanVector ( const Eigen::Matrix< TType, 2, 1 > &  eigenVector)
static

Converts an Eigen 2D vector to a corresponding Ocean vector.

Parameters
eigenVectorThe Eigen vector that will be converted
Returns
The Ocean vector with the same value as the Eigen vector
Template Parameters
TTypeThe type of the vector elements, must be either int, float, or double

◆ toOceanVector() [2/3]

template<typename TType >
VectorT3< TType > Ocean::CV::EigenUtilities::toOceanVector ( const Eigen::Matrix< TType, 3, 1 > &  eigenVector)
static

Converts an Eigen 3D vector to a corresponding Ocean vector.

Parameters
eigenVectorThe Eigen vector that will be converted
Returns
The Ocean vector with the same value as the Eigen vector
Template Parameters
TTypeThe type of the vector elements, must be either int, float, or double

◆ toOceanVector() [3/3]

template<typename TType >
VectorT4< TType > Ocean::CV::EigenUtilities::toOceanVector ( const Eigen::Matrix< TType, 4, 1 > &  eigenVector)
static

Converts an Eigen 4D vector to a corresponding Ocean vector.

Parameters
eigenVectorThe Eigen vector that will be converted
Returns
The Ocean vector with the same value as the Eigen vector
Template Parameters
TTypeThe type of the vector elements, must be either int, float, or double

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