Ocean
Ocean::CameraWrapperBasePinholeT< T > Class Template Reference

This class implements the base wrapper around Ocean's pinhole camera profile. More...

Public Types

typedef PinholeCameraT< T > ActualCamera
 Definition of the actual camera object wrapped by this class. More...
 
using WrappedCamera = CameraWrapperT< T, CameraWrapperBasePinholeT< T > >
 Definition of the parent WrappedCamera class using this base class. More...
 

Public Member Functions

 CameraWrapperBasePinholeT (ActualCamera &&actualCamera)
 Creates a new CameraWrapperBasePinholeT object wrapping the actual camera model. More...
 
 CameraWrapperBasePinholeT (const ActualCamera &actualCamera)
 Creates a new CameraWrapperBasePinholeT object wrapping the actual camera model. More...
 
const ActualCameraactualCamera () const
 Returns the actual camera object wrapped in this class. More...
 
unsigned int width () const
 Returns the width of the camera image. More...
 
unsigned int height () const
 Returns the height of the camera image. More...
 
principalPointX () const
 Returns the x-value of the principal point of the camera image in the pixel domain. More...
 
principalPointY () const
 Returns the y-value of the principal point of the camera image in the pixel domain. More...
 
focalLengthX () const
 Returns the horizontal focal length parameter. More...
 
focalLengthY () const
 Returns the vertical focal length parameter. More...
 
inverseFocalLengthX () const
 Returns the inverse horizontal focal length parameter. More...
 
inverseFocalLengthY () const
 Returns the inverse vertical focal length parameter. More...
 
VectorT2< T > projectToImageIF (const VectorT3< T > &objectPoint) const
 Projects a 3D object point into the camera frame. More...
 
VectorT2< T > projectToImageIF (const HomogenousMatrixT4< T > &flippedCamera_T_world, const VectorT3< T > &objectPoint) const
 Projects a 3D object point into the camera frame. More...
 
void projectToImageIF (const VectorT3< T > *objectPoints, const size_t size, VectorT2< T > *imagePoints) const
 Projects several 3D object points into the camera frame at once. More...
 
void projectToImageIF (const HomogenousMatrixT4< T > &flippedCamera_T_world, const VectorT3< T > *objectPoints, const size_t size, VectorT2< T > *imagePoints) const
 Projects several 3D object points into the camera frame at once. More...
 
VectorT3< T > vectorIF (const VectorT2< T > &distortedImagePoint, const bool makeUnitVector) const
 Returns a vector starting at the camera's center and intersecting a given 2D point in the image. More...
 
void vectorIF (const VectorT2< T > *distortedImagePoint, const size_t size, VectorT3< T > *vectors, const bool makeUnitVector) const
 Returns vectors starting at the camera's center and intersecting a given 2D points in the image. More...
 
void pointJacobian2x3IF (const VectorT3< T > &flippedCameraObjectPoint, T *jx, T *jy) const
 Calculates the 2x3 jacobian matrix for the 3D object point projection into the camera frame. More...
 
bool isEqual (const CameraWrapperBasePinholeT< T > &basePinhole, const T eps=NumericT< T >::eps()) const
 Returns whether two camera objects are identical up to a given epsilon. More...
 
bool isValid () const
 Returns whether this camera is valid. More...
 
template<typename U >
std::unique_ptr< AnyCameraT< U > > clone (const unsigned int width=0u, const unsigned int height=0u) const
 Returns a copy of the actual camera object. More...
 

Static Public Member Functions

static AnyCameraType anyCameraType ()
 Returns the type of this camera. More...
 
static std::string name ()
 Returns the name of this camera. More...
 

Protected Attributes

ActualCamera actualCamera_
 The actual pinhole camera. More...
 

Detailed Description

template<typename T>
class Ocean::CameraWrapperBasePinholeT< T >

This class implements the base wrapper around Ocean's pinhole camera profile.

The class can be used as 'TCameraWrapperBase' in 'CameraWrapperT' to create a full wrapper class e.g., 'CameraWrapperT<T, CameraWrapperBasePinholeT<T>>'.

Template Parameters
TThe data type of a scalar, 'float' or 'double'

Member Typedef Documentation

◆ ActualCamera

template<typename T >
typedef PinholeCameraT<T> Ocean::CameraWrapperBasePinholeT< T >::ActualCamera

Definition of the actual camera object wrapped by this class.

◆ WrappedCamera

Definition of the parent WrappedCamera class using this base class.

Constructor & Destructor Documentation

◆ CameraWrapperBasePinholeT() [1/2]

template<typename T >
Ocean::CameraWrapperBasePinholeT< T >::CameraWrapperBasePinholeT ( ActualCamera &&  actualCamera)
explicit

Creates a new CameraWrapperBasePinholeT object wrapping the actual camera model.

Parameters
actualCameraThe actual camera object to be wrapped

◆ CameraWrapperBasePinholeT() [2/2]

template<typename T >
Ocean::CameraWrapperBasePinholeT< T >::CameraWrapperBasePinholeT ( const ActualCamera actualCamera)
explicit

Creates a new CameraWrapperBasePinholeT object wrapping the actual camera model.

Parameters
actualCameraThe actual camera object to be wrapped

Member Function Documentation

◆ actualCamera()

template<typename T >
const CameraWrapperBasePinholeT< T >::ActualCamera & Ocean::CameraWrapperBasePinholeT< T >::actualCamera
inline

Returns the actual camera object wrapped in this class.

Returns
The wrapped camera object

◆ anyCameraType()

template<typename T >
AnyCameraType Ocean::CameraWrapperBasePinholeT< T >::anyCameraType
inlinestatic

Returns the type of this camera.

See also
AnyCameraT::anyCameraType().

◆ clone()

template<typename T >
template<typename U >
std::unique_ptr< AnyCameraT< U > > Ocean::CameraWrapperBasePinholeT< T >::clone ( const unsigned int  width = 0u,
const unsigned int  height = 0u 
) const
inline

Returns a copy of the actual camera object.

Returns
New instance of the actual camera object used in this wrapper.
Template Parameters
UThe scalar data type of the resulting cloned object, either 'float' or 'double'

◆ focalLengthX()

template<typename T >
T Ocean::CameraWrapperBasePinholeT< T >::focalLengthX
inline

Returns the horizontal focal length parameter.

See also
AnyCameraT::focalLengthX().

◆ focalLengthY()

template<typename T >
T Ocean::CameraWrapperBasePinholeT< T >::focalLengthY
inline

Returns the vertical focal length parameter.

See also
AnyCameraT::focalLengthY().

◆ height()

template<typename T >
unsigned int Ocean::CameraWrapperBasePinholeT< T >::height
inline

Returns the height of the camera image.

See also
AnyCameraT::height().

◆ inverseFocalLengthX()

template<typename T >
T Ocean::CameraWrapperBasePinholeT< T >::inverseFocalLengthX
inline

Returns the inverse horizontal focal length parameter.

See also
AnyCameraT::inverseFocalLengthX().

◆ inverseFocalLengthY()

template<typename T >
T Ocean::CameraWrapperBasePinholeT< T >::inverseFocalLengthY
inline

Returns the inverse vertical focal length parameter.

See also
AnyCameraT::inverseFocalLengthY().

◆ isEqual()

template<typename T >
bool Ocean::CameraWrapperBasePinholeT< T >::isEqual ( const CameraWrapperBasePinholeT< T > &  basePinhole,
const T  eps = NumericT<T>::eps() 
) const
inline

Returns whether two camera objects are identical up to a given epsilon.

See also
AnyCameraT::isEqual().

◆ isValid()

template<typename T >
bool Ocean::CameraWrapperBasePinholeT< T >::isValid
inline

Returns whether this camera is valid.

See also
AnyCameraT::isValid().

◆ name()

template<typename T >
std::string Ocean::CameraWrapperBasePinholeT< T >::name
inlinestatic

Returns the name of this camera.

See also
AnyCameraT::name().

◆ pointJacobian2x3IF()

template<typename T >
void Ocean::CameraWrapperBasePinholeT< T >::pointJacobian2x3IF ( const VectorT3< T > &  flippedCameraObjectPoint,
T *  jx,
T *  jy 
) const
inline

Calculates the 2x3 jacobian matrix for the 3D object point projection into the camera frame.

See also
AnyCameraT::pointJacobian2x3IF().

◆ principalPointX()

template<typename T >
T Ocean::CameraWrapperBasePinholeT< T >::principalPointX
inline

Returns the x-value of the principal point of the camera image in the pixel domain.

See also
AnyCameraT::principalPointX().

◆ principalPointY()

template<typename T >
T Ocean::CameraWrapperBasePinholeT< T >::principalPointY
inline

Returns the y-value of the principal point of the camera image in the pixel domain.

See also
AnyCameraT::principalPointY().

◆ projectToImageIF() [1/4]

template<typename T >
VectorT2< T > Ocean::CameraWrapperBasePinholeT< T >::projectToImageIF ( const HomogenousMatrixT4< T > &  flippedCamera_T_world,
const VectorT3< T > &  objectPoint 
) const
inline

Projects a 3D object point into the camera frame.

See also
AnyCameraT::projectToImageIF().

◆ projectToImageIF() [2/4]

template<typename T >
void Ocean::CameraWrapperBasePinholeT< T >::projectToImageIF ( const HomogenousMatrixT4< T > &  flippedCamera_T_world,
const VectorT3< T > *  objectPoints,
const size_t  size,
VectorT2< T > *  imagePoints 
) const
inline

Projects several 3D object points into the camera frame at once.

See also
AnyCameraT::projectToImageIF().

◆ projectToImageIF() [3/4]

template<typename T >
VectorT2< T > Ocean::CameraWrapperBasePinholeT< T >::projectToImageIF ( const VectorT3< T > &  objectPoint) const
inline

Projects a 3D object point into the camera frame.

See also
AnyCameraT::projectToImageIF().

◆ projectToImageIF() [4/4]

template<typename T >
void Ocean::CameraWrapperBasePinholeT< T >::projectToImageIF ( const VectorT3< T > *  objectPoints,
const size_t  size,
VectorT2< T > *  imagePoints 
) const
inline

Projects several 3D object points into the camera frame at once.

See also
AnyCameraT::projectToImageIF().

◆ vectorIF() [1/2]

template<typename T >
VectorT3< T > Ocean::CameraWrapperBasePinholeT< T >::vectorIF ( const VectorT2< T > &  distortedImagePoint,
const bool  makeUnitVector 
) const
inline

Returns a vector starting at the camera's center and intersecting a given 2D point in the image.

See also
AnyCameraT::vectorIF().

◆ vectorIF() [2/2]

template<typename T >
void Ocean::CameraWrapperBasePinholeT< T >::vectorIF ( const VectorT2< T > *  distortedImagePoint,
const size_t  size,
VectorT3< T > *  vectors,
const bool  makeUnitVector 
) const
inline

Returns vectors starting at the camera's center and intersecting a given 2D points in the image.

See also
AnyCameraT::vectorIF().

◆ width()

template<typename T >
unsigned int Ocean::CameraWrapperBasePinholeT< T >::width
inline

Returns the width of the camera image.

See also
AnyCameraT::width().

Field Documentation

◆ actualCamera_

template<typename T >
ActualCamera Ocean::CameraWrapperBasePinholeT< T >::actualCamera_
protected

The actual pinhole camera.


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