Ocean
Ocean::CameraWrapperT< T, TCameraWrapperBase > Class Template Reference

This class implements a wrapper for an actual camera object. More...

Inheritance diagram for Ocean::CameraWrapperT< T, TCameraWrapperBase >:

Public Member Functions

 CameraWrapperT (ActualCamera &&actualCamera)
 Creates a new CameraWrapperT object wrapping the actual camera model. More...
 
 CameraWrapperT (const ActualCamera &actualCamera)
 Creates a new CameraWrapperT object wrapping the actual camera model. More...
 
VectorT2< T > principalPoint () const
 Returns the coordinate of the principal point of the camera image in the pixel domain. More...
 
fovX () const
 Returns the field of view in x direction of the camera. More...
 
fovY () const
 Returns the field of view in x direction of the camera. More...
 
bool isInside (const VectorT2< T > &imagePoint, const T signedBorder=T(0)) const
 Returns whether a given 2D image point lies inside the camera frame. More...
 
VectorT2< T > projectToImage (const VectorT3< T > &objectPoint) const
 Projects a 3D object point into the camera frame. More...
 
VectorT2< T > projectToImage (const HomogenousMatrixT4< T > &world_T_camera, const VectorT3< T > &objectPoint) const
 Projects a 3D object point into the camera frame. More...
 
void projectToImage (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 projectToImage (const HomogenousMatrixT4< T > &world_T_camera, 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 > vector (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 vector (const VectorT2< T > *distortedImagePoints, const size_t size, VectorT3< T > *vectors, const bool makeUnitVector) const
 Determines vectors starting at the camera's center and intersecting given 2D points in the image. More...
 
LineT3< T > ray (const VectorT2< T > &distortedImagePoint, const HomogenousMatrixT4< T > &world_T_camera) const
 Returns a ray starting at the camera's center and intersecting a given 2D point in the image. More...
 
LineT3< T > ray (const VectorT2< T > &distortedImagePoint) const
 Returns a ray starting at the camera's center and intersecting a given 2D point in the image. More...
 
void pointJacobian2nx3IF (const VectorT3< T > *flippedCameraObjectPoints, const size_t numberObjectPoints, T *jacobians) const
 Calculates the 2x3 jacobian matrix for the 3D object point projection into the camera frame. More...
 

Detailed Description

template<typename T, typename TCameraWrapperBase>
class Ocean::CameraWrapperT< T, TCameraWrapperBase >

This class implements a wrapper for an actual camera object.

  • TCameraWrapperBase implements the wrapper functions necessary for the individual camera models.
  • CameraWrapperT implements some additional functions necessary to fully implement all necessary functions for AnyCameraT.
    Template Parameters
    TThe data type of a scalar, 'float' or 'double'
    TCameraWrapperBaseThe base class implementing all functions necessary for the wrapped camera object.

Constructor & Destructor Documentation

◆ CameraWrapperT() [1/2]

template<typename T , typename TCameraWrapperBase >
Ocean::CameraWrapperT< T, TCameraWrapperBase >::CameraWrapperT ( ActualCamera &&  actualCamera)
explicit

Creates a new CameraWrapperT object wrapping the actual camera model.

Parameters
actualCameraThe actual camera object to be wrapped

◆ CameraWrapperT() [2/2]

template<typename T , typename TCameraWrapperBase >
Ocean::CameraWrapperT< T, TCameraWrapperBase >::CameraWrapperT ( const ActualCamera &  actualCamera)
explicit

Creates a new CameraWrapperT object wrapping the actual camera model.

Parameters
actualCameraThe actual camera object to be wrapped

Member Function Documentation

◆ fovX()

template<typename T , typename TCameraWrapperBase >
T Ocean::CameraWrapperT< T, TCameraWrapperBase >::fovX
inline

Returns the field of view in x direction of the camera.

See also
AnyCameraT::fovX().

x = Fx * X / Z + mx

(x - mx) / Fx = X / Z

◆ fovY()

template<typename T , typename TCameraWrapperBase >
T Ocean::CameraWrapperT< T, TCameraWrapperBase >::fovY
inline

Returns the field of view in x direction of the camera.

See also
AnyCameraT::fovY().

y = Fy * Y / Z + my

(y - my) / Fy = Y / Z

◆ isInside()

template<typename T , typename TCameraWrapperBase >
bool Ocean::CameraWrapperT< T, TCameraWrapperBase >::isInside ( const VectorT2< T > &  imagePoint,
const T  signedBorder = T(0) 
) const
inline

Returns whether a given 2D image point lies inside the camera frame.

See also
AnyCameraT::isInside().

◆ pointJacobian2nx3IF()

template<typename T , typename TCameraWrapperBase >
void Ocean::CameraWrapperT< T, TCameraWrapperBase >::pointJacobian2nx3IF ( const VectorT3< T > *  flippedCameraObjectPoints,
const size_t  numberObjectPoints,
T *  jacobians 
) const
inline

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

See also
AnyCameraT::pointJacobian2nx3IF().

◆ principalPoint()

template<typename T , typename TCameraWrapperBase >
VectorT2< T > Ocean::CameraWrapperT< T, TCameraWrapperBase >::principalPoint
inline

Returns the coordinate of the principal point of the camera image in the pixel domain.

See also
AnyCameraT::principalPoint().

◆ projectToImage() [1/4]

template<typename T , typename TCameraWrapperBase >
VectorT2< T > Ocean::CameraWrapperT< T, TCameraWrapperBase >::projectToImage ( const HomogenousMatrixT4< T > &  world_T_camera,
const VectorT3< T > &  objectPoint 
) const
inline

Projects a 3D object point into the camera frame.

See also
projectToImage().

◆ projectToImage() [2/4]

template<typename T , typename TCameraWrapperBase >
void Ocean::CameraWrapperT< T, TCameraWrapperBase >::projectToImage ( const HomogenousMatrixT4< T > &  world_T_camera,
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
projectToImage().

◆ projectToImage() [3/4]

template<typename T , typename TCameraWrapperBase >
VectorT2< T > Ocean::CameraWrapperT< T, TCameraWrapperBase >::projectToImage ( const VectorT3< T > &  objectPoint) const
inline

Projects a 3D object point into the camera frame.

See also
projectToImage().

◆ projectToImage() [4/4]

template<typename T , typename TCameraWrapperBase >
void Ocean::CameraWrapperT< T, TCameraWrapperBase >::projectToImage ( 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
projectToImage().

◆ ray() [1/2]

template<typename T , typename TCameraWrapperBase >
LineT3< T > Ocean::CameraWrapperT< T, TCameraWrapperBase >::ray ( const VectorT2< T > &  distortedImagePoint) const
inline

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

See also
ray().

◆ ray() [2/2]

template<typename T , typename TCameraWrapperBase >
LineT3< T > Ocean::CameraWrapperT< T, TCameraWrapperBase >::ray ( const VectorT2< T > &  distortedImagePoint,
const HomogenousMatrixT4< T > &  world_T_camera 
) const
inline

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

See also
ray().

◆ vector() [1/2]

template<typename T , typename TCameraWrapperBase >
VectorT3< T > Ocean::CameraWrapperT< T, TCameraWrapperBase >::vector ( 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::vector().

◆ vector() [2/2]

template<typename T , typename TCameraWrapperBase >
void Ocean::CameraWrapperT< T, TCameraWrapperBase >::vector ( const VectorT2< T > *  distortedImagePoints,
const size_t  size,
VectorT3< T > *  vectors,
const bool  makeUnitVector 
) const
inline

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

See also
AnyCameraT::vector().

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