Ocean
Ocean::AnyCameraWrappingT< T, TCameraWrapper > Class Template Referencefinal

This class implements a specialized AnyCamera object wrapping the actual camera model. More...

Inheritance diagram for Ocean::AnyCameraWrappingT< T, TCameraWrapper >:

Public Types

typedef T TScalar
 The scalar data type of this object. More...
 
typedef TCameraWrapper CameraWrapper
 The class which is actually wrapping the camera object. More...
 
typedef TCameraWrapper::ActualCamera ActualCamera
 The actual camera object wrapped by this class. More...
 
- Public Types inherited from Ocean::AnyCameraT< T >
typedef T TScalar
 The scalar data type of this object. More...
 

Public Member Functions

 AnyCameraWrappingT (ActualCamera &&actualCamera)
 Creates a new AnyCamera object wrapping the actual camera model. More...
 
 AnyCameraWrappingT (const ActualCamera &actualCamera)
 Creates a new AnyCamera object wrapping the actual camera model. More...
 
AnyCameraType anyCameraType () const override
 Returns the type of this camera. More...
 
std::string name () const override
 Returns the name of this camera. More...
 
std::unique_ptr< AnyCameraT< T > > clone (const unsigned int width=0u, const unsigned int height=0u) const override
 Returns a copy of this camera object. More...
 
std::unique_ptr< AnyCameraT< float > > cloneToFloat (const unsigned int width=0u, const unsigned int height=0u) const override
 Returns a copy of this camera object with float precision. More...
 
std::unique_ptr< AnyCameraT< double > > cloneToDouble (const unsigned int width=0u, const unsigned int height=0u) const override
 Returns a copy of this camera object with double precision. More...
 
unsigned int width () const override
 Returns the width of the camera image. More...
 
unsigned int height () const override
 Returns the height of the camera image. More...
 
VectorT2< T > principalPoint () const override
 Returns the coordinate of the principal point of the camera image in the pixel domain. More...
 
principalPointX () const override
 Returns the x-value of the principal point of the camera image in the pixel domain. More...
 
principalPointY () const override
 Returns the y-value of the principal point of the camera image in the pixel domain. More...
 
focalLengthX () const override
 Returns the horizontal focal length parameter. More...
 
focalLengthY () const override
 Returns the vertical focal length parameter. More...
 
inverseFocalLengthX () const override
 Returns the inverse horizontal focal length parameter. More...
 
inverseFocalLengthY () const override
 Returns the inverse vertical focal length parameter. More...
 
fovX () const override
 Returns the field of view in x direction of the camera. More...
 
fovY () const override
 Returns the field of view in x direction of the camera. More...
 
bool isInside (const VectorT2< T > &imagePoint, const T signedBorder=T(0)) const override
 Returns whether a given 2D image point lies inside the camera frame. More...
 
VectorT2< T > projectToImage (const VectorT3< T > &objectPoint) const override
 Projects a 3D object point into the camera frame. More...
 
VectorT2< T > projectToImage (const HomogenousMatrixT4< T > &world_T_camera, const VectorT3< T > &objectPoint) const override
 Projects a 3D object point into the camera frame. More...
 
void projectToImage (const VectorT3< T > *objectPoints, const size_t size, VectorT2< T > *imagePoints) const override
 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 override
 Projects several 3D object points into the camera frame at once. More...
 
VectorT2< T > projectToImageIF (const VectorT3< T > &objectPoint) const override
 Projects a 3D object point into the camera frame. More...
 
VectorT2< T > projectToImageIF (const HomogenousMatrixT4< T > &flippedCamera_T_world, const VectorT3< T > &objectPoint) const override
 Projects a 3D object point into the camera frame. More...
 
void projectToImageIF (const VectorT3< T > *objectPoints, const size_t size, VectorT2< T > *imagePoints) const override
 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 override
 Projects several 3D object points into the camera frame at once. More...
 
VectorT3< T > vector (const VectorT2< T > &distortedImagePoint, const bool makeUnitVector=true) const override
 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=true) const override
 Determines vectors starting at the camera's center and intersecting given 2D points in the image. More...
 
VectorT3< T > vectorIF (const VectorT2< T > &distortedImagePoint, const bool makeUnitVector=true) const override
 Returns a vector starting at the camera's center and intersecting a given 2D point in the image. More...
 
void vectorIF (const VectorT2< T > *distortedImagePoints, const size_t size, VectorT3< T > *vectors, const bool makeUnitVector=true) const override
 Returns vectors starting at the camera's center and intersecting a given 2D points in the image. More...
 
LineT3< T > ray (const VectorT2< T > &distortedImagePoint, const HomogenousMatrixT4< T > &world_T_camera) const override
 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 override
 Returns a ray starting at the camera's center and intersecting a given 2D point in the image. More...
 
void pointJacobian2x3IF (const VectorT3< T > &flippedCameraObjectPoint, T *jx, T *jy) const override
 Calculates the 2x3 jacobian matrix for the 3D object point projection into the camera frame. More...
 
void pointJacobian2nx3IF (const VectorT3< T > *flippedCameraObjectPoints, const size_t numberObjectPoints, T *jacobians) const override
 Calculates the 2n x 3 jacobian matrix for the 3D object point projection into the camera frame. More...
 
bool isEqual (const AnyCameraT< T > &anyCamera, const T eps=NumericT< T >::eps()) const override
 Returns whether two camera objects are identical up to a given epsilon. More...
 
bool isValid () const override
 Returns whether this camera is valid. More...
 
- Public Member Functions inherited from Ocean::AnyCameraT< T >
virtual ~AnyCameraT ()=default
 Destructs the AnyCamera object. More...
 
std::shared_ptr< AnyCameraT< float > > convert (const std::shared_ptr< AnyCameraT< double >> &anyCamera)
 
std::shared_ptr< AnyCameraT< double > > convert (const std::shared_ptr< AnyCameraT< float >> &anyCamera)
 

Additional Inherited Members

- Static Public Member Functions inherited from Ocean::AnyCameraT< T >
template<typename U >
static std::shared_ptr< AnyCameraT< T > > convert (const std::shared_ptr< AnyCameraT< U >> &anyCamera)
 Converts an AnyCamera object with arbitrary scalar type to another AnyCamera object with arbitrary scalar type. More...
 
- Static Public Member Functions inherited from Ocean::CameraT< T >
static T fovX2Y (const T fovX, const T aspectRatio)
 Calculates the vertical FOV from the horizontal FOV and the aspect ratio of the camera image. More...
 
static T fovY2X (const T fovY, const T aspectRatio)
 Calculates the horizontal FOV from the vertical FOV and the aspect ratio of the camera image. More...
 
static T fieldOfViewToFocalLength (const unsigned int width, const T fovX)
 Converts field of view (and width) to the corresponding focal length. More...
 
static VectorT2< T > objectPoint2normalizedImagePoint (const HomogenousMatrixT4< T > &extrinsic, const VectorT3< T > &objectPoint)
 Calculates the normalized image point (the normalized projected object point) for a of given object point with corresponding extrinsic camera matrix. More...
 
static VectorT2< T > objectPoint2normalizedImagePointIF (const HomogenousMatrixT4< T > &iFlippedExtrinsic, const VectorT3< T > &objectPoint)
 Calculates the normalized image point (the normalized projected object point) for a given object point with corresponding inverse and flipped extrinsic camera matrix. More...
 
static void objectPoints2normalizedImagePoints (const HomogenousMatrixT4< T > &extrinsic, const VectorT3< T > *objectPoints, const size_t numberObjectPoints, VectorT2< T > *normalizedImagePoints)
 Calculates the normalized image points (the normalized projected object points) for a set of given object points with corresponding extrinsic camera matrix. More...
 
static void objectPoints2normalizedImagePointsIF (const HomogenousMatrixT4< T > &iFlippedExtrinsic, const VectorT3< T > *objectPoints, const size_t numberObjectPoints, VectorT2< T > *normalizedImagePoints)
 Calculates the normalized image points (the normalized projected object points) for a set of given object points with corresponding inverse and flipped extrinsic camera matrix. More...
 
template<typename U = T>
static SquareMatrixT3< U > flipMatrix3 ()
 Returns the 3x3 transformation matrix flipping a transformation around the x-axis by 180 deg. More...
 
template<typename U = T>
static HomogenousMatrixT4< U > flipMatrix4 ()
 Returns the 4x4 transformation matrix flipping a transformation around the x-axis by 180 deg. More...
 
template<typename U = T>
static QuaternionT< U > flipQuaternion ()
 Returns the quaternion flipping a rotation around the x-axis by 180 deg. More...
 
template<typename U >
static HomogenousMatrixT4< U > flippedTransformationLeftSide (const HomogenousMatrixT4< U > &left_T_right)
 Flips a transformation matrix around the x-axis by 180 degree. More...
 
template<typename U >
static HomogenousMatrixT4< U > flippedTransformationRightSide (const HomogenousMatrixT4< U > &left_T_right)
 Flips a transformation matrix around the x-axis by 180 degree. More...
 
template<typename U >
static HomogenousMatrixT4< U > flippedTransformationLeftAndRightSide (const HomogenousMatrixT4< U > &left_T_right)
 Flips a transformation matrix around the x-axis by 180 degree. More...
 
template<typename U >
static SquareMatrixT3< U > flippedTransformationLeftSide (const SquareMatrixT3< U > &left_R_right)
 Flips a 3x3 rotation matrix around the x-axis by 180 degree. More...
 
template<typename U >
static SquareMatrixT3< U > flippedTransformationRightSide (const SquareMatrixT3< U > &left_R_right)
 Flips a 3x3 rotation matrix around the x-axis by 180 degree. More...
 
template<typename U >
static SquareMatrixT3< U > flippedTransformationLeftAndRightSide (const SquareMatrixT3< U > &left_R_right)
 Flips a 3x3 rotation matrix around the x-axis by 180 degree. More...
 
template<typename U >
static QuaternionT< U > flippedTransformationLeftSide (const QuaternionT< U > &left_Q_right)
 Flips a quaternion around the x-axis by 180 degree. More...
 
template<typename U >
static QuaternionT< U > flippedTransformationRightSide (const QuaternionT< U > &left_Q_right)
 Flips a quaternion around the x-axis by 180 degree. More...
 
template<typename U >
static QuaternionT< U > flippedTransformationLeftAndRightSide (const QuaternionT< U > &left_Q_right)
 Flips a quaternion around the x-axis by 180 degree. More...
 
template<typename U >
static HomogenousMatrixT4< U > standard2InvertedFlipped (const HomogenousMatrixT4< U > &world_T_camera)
 Transforms a standard homogenous 4x4 viewing (extrinsic camera) matrix into an inverted and flipped camera pose. More...
 
template<typename U >
static HomogenousMatricesT4< U > standard2InvertedFlipped (const HomogenousMatrixT4< U > *world_T_cameras, const size_t number)
 Transforms standard homogenous 4x4 viewing (extrinsic camera) matrices into an inverted and flipped camera matrices. More...
 
template<typename U >
static void standard2InvertedFlipped (const HomogenousMatrixT4< U > *world_T_cameras, HomogenousMatrixT4< U > *flippedCameras_T_world, const size_t number)
 Transforms standard homogenous 4x4 viewing (extrinsic camera) matrices into an inverted and flipped camera matrices. More...
 
template<typename U >
static HomogenousMatricesT4< U > standard2InvertedFlipped (const HomogenousMatricesT4< U > &world_T_cameras)
 Transforms standard homogenous 4x4 viewing (extrinsic camera) matrices into an inverted and flipped camera matrices. More...
 
template<typename U >
static SquareMatrixT3< U > standard2InvertedFlipped (const SquareMatrixT3< U > &world_R_camera)
 Transforms a standard 3x3 rotation matrix into an inverted and flipped rotation matrix. More...
 
template<typename U >
static QuaternionT< U > standard2InvertedFlipped (const QuaternionT< U > &world_Q_camera)
 Transforms a standard rotation quaternion into an inverted and flipped rotation quaternion. More...
 
template<typename U >
static HomogenousMatrixT4< U > invertedFlipped2Standard (const HomogenousMatrixT4< U > &flippedCamera_T_world)
 Transforms an inverted and flipped camera pose into a standard camera pose. More...
 
template<typename U >
static HomogenousMatricesT4< U > invertedFlipped2Standard (const HomogenousMatrixT4< U > *flippedCameras_T_world, const size_t number)
 Transforms inverted and flipped camera matrices into standard viewing (extrinsic camera) matrices. More...
 
template<typename U >
static void invertedFlipped2Standard (const HomogenousMatrixT4< U > *flippedCameras_T_world, HomogenousMatrixT4< U > *world_T_cameras, const size_t number)
 Transforms inverted and flipped camera matrices into standard viewing (extrinsic camera) matrices. More...
 
template<typename U >
static HomogenousMatricesT4< U > invertedFlipped2Standard (const HomogenousMatricesT4< U > &flippedCameras_T_world)
 Transforms inverted and flipped camera matrices into standard viewing (extrinsic camera) matrices. More...
 
template<typename U >
static SquareMatrixT3< U > invertedFlipped2Standard (const SquareMatrixT3< U > &flippedCamera_R_world)
 Transforms an inverted and flipped rotation matrix into a standard viewing rotation matrix. More...
 
template<typename U >
static QuaternionT< U > invertedFlipped2Standard (const QuaternionT< U > &flippedCamera_Q_world)
 Transforms an inverted and flipped rotation quaternion into a standard viewing rotation quaternion. More...
 
static bool isObjectPointInFrontIF (const HomogenousMatrixT4< T > &flippedCamera_T_world, const VectorT3< T > &objectPoint, const T epsilon=NumericT< T >::eps())
 Determines whether a given 3D object point lies in front of a camera while the location of the camera is defined by a 6-DOF pose. More...
 
static bool isObjectPointInFrontIF (const SquareMatrixT3< T > &flippedCamera_R_world, const VectorT3< T > &objectPoint, const T epsilon=NumericT< T >::eps())
 Determines whether a given 3D object point lies in front of a camera while the location of the camera is defined by a 3-DOF orientation. More...
 
- Protected Member Functions inherited from Ocean::AnyCameraT< T >
 AnyCameraT ()=default
 Protected default constructor. More...
 
 AnyCameraT (const AnyCameraT< T > &anyCamera)=default
 Protected copy constructor. More...
 
 AnyCameraT (AnyCameraT< T > &&)=delete
 Disabled move constructor. More...
 
AnyCameraToperator= (const AnyCameraT &)=delete
 Disabled assign operator. More...
 
AnyCameraToperator= (AnyCameraT &&)=delete
 Disabled move operator. More...
 

Detailed Description

template<typename T, typename TCameraWrapper>
class Ocean::AnyCameraWrappingT< T, TCameraWrapper >

This class implements a specialized AnyCamera object wrapping the actual camera model.

The class is a helper class to simplify the implementation of specialized AnyCamera objects.

Template Parameters
TThe data type of a scalar, 'float' or 'double'
TCameraWrapperThe data type of the class actually wrapping the camera object

Member Typedef Documentation

◆ ActualCamera

template<typename T , typename TCameraWrapper >
typedef TCameraWrapper::ActualCamera Ocean::AnyCameraWrappingT< T, TCameraWrapper >::ActualCamera

The actual camera object wrapped by this class.

◆ CameraWrapper

template<typename T , typename TCameraWrapper >
typedef TCameraWrapper Ocean::AnyCameraWrappingT< T, TCameraWrapper >::CameraWrapper

The class which is actually wrapping the camera object.

◆ TScalar

template<typename T , typename TCameraWrapper >
typedef T Ocean::AnyCameraWrappingT< T, TCameraWrapper >::TScalar

The scalar data type of this object.

Constructor & Destructor Documentation

◆ AnyCameraWrappingT() [1/2]

template<typename T , typename TCameraWrapper >
Ocean::AnyCameraWrappingT< T, TCameraWrapper >::AnyCameraWrappingT ( ActualCamera &&  actualCamera)
explicit

Creates a new AnyCamera object wrapping the actual camera model.

Parameters
actualCameraThe actual camera object to be wrapped

◆ AnyCameraWrappingT() [2/2]

template<typename T , typename TCameraWrapper >
Ocean::AnyCameraWrappingT< T, TCameraWrapper >::AnyCameraWrappingT ( const ActualCamera actualCamera)
explicit

Creates a new AnyCamera object wrapping the actual camera model.

Parameters
actualCameraThe actual camera object to be wrapped

Member Function Documentation

◆ anyCameraType()

template<typename T , typename TCameraWrapper >
AnyCameraType Ocean::AnyCameraWrappingT< T, TCameraWrapper >::anyCameraType
overridevirtual

Returns the type of this camera.

Returns
The camera's type

Implements Ocean::AnyCameraT< T >.

◆ clone()

template<typename T , typename TCameraWrapper >
std::unique_ptr< AnyCameraT< T > > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::clone ( const unsigned int  width = 0u,
const unsigned int  height = 0u 
) const
overridevirtual

Returns a copy of this camera object.

The image resolution of the cloned camera must have the same aspect ratio as the current image resolution.

Parameters
widthThe width of the cloned camera in pixel, with range [1, infinity), 0 to use the current image resolution
heightthe height of the cloned camera in pixel, with range [1, infinity), 0 to use the current image resolution
Returns
New instance of this camera object

Implements Ocean::AnyCameraT< T >.

◆ cloneToDouble()

template<typename T , typename TCameraWrapper >
std::unique_ptr< AnyCameraT< double > > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::cloneToDouble ( const unsigned int  width = 0u,
const unsigned int  height = 0u 
) const
overridevirtual

Returns a copy of this camera object with double precision.

The image resolution of the cloned camera must have the same aspect ratio as the current image resolution.

Parameters
widthThe width of the cloned camera in pixel, with range [1, infinity), 0 to use the current image resolution
heightthe height of the cloned camera in pixel, with range [1, infinity), 0 to use the current image resolution
Returns
New instance of this camera object

Implements Ocean::AnyCameraT< T >.

◆ cloneToFloat()

template<typename T , typename TCameraWrapper >
std::unique_ptr< AnyCameraT< float > > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::cloneToFloat ( const unsigned int  width = 0u,
const unsigned int  height = 0u 
) const
overridevirtual

Returns a copy of this camera object with float precision.

The image resolution of the cloned camera must have the same aspect ratio as the current image resolution.

Parameters
widthThe width of the cloned camera in pixel, with range [1, infinity), 0 to use the current image resolution
heightthe height of the cloned camera in pixel, with range [1, infinity), 0 to use the current image resolution
Returns
New instance of this camera object

Implements Ocean::AnyCameraT< T >.

◆ focalLengthX()

template<typename T , typename TCameraWrapper >
T Ocean::AnyCameraWrappingT< T, TCameraWrapper >::focalLengthX
overridevirtual

Returns the horizontal focal length parameter.

Returns
Horizontal focal length parameter in pixel domain, with range (0, infinity)

Implements Ocean::AnyCameraT< T >.

◆ focalLengthY()

template<typename T , typename TCameraWrapper >
T Ocean::AnyCameraWrappingT< T, TCameraWrapper >::focalLengthY
overridevirtual

Returns the vertical focal length parameter.

Returns
Vertical focal length parameter in pixel domain, with range (0, infinity)

Implements Ocean::AnyCameraT< T >.

◆ fovX()

template<typename T , typename TCameraWrapper >
T Ocean::AnyCameraWrappingT< T, TCameraWrapper >::fovX
overridevirtual

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

The fov is the sum of the left and right part of the camera.

Returns
Field of view (in radian), with range (0, 2 * PI]

Implements Ocean::AnyCameraT< T >.

◆ fovY()

template<typename T , typename TCameraWrapper >
T Ocean::AnyCameraWrappingT< T, TCameraWrapper >::fovY
overridevirtual

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

The fov is the sum of the top and bottom part of the camera.

Returns
Field of view (in radian), with range (0, 2 * PI]

Implements Ocean::AnyCameraT< T >.

◆ height()

template<typename T , typename TCameraWrapper >
unsigned int Ocean::AnyCameraWrappingT< T, TCameraWrapper >::height
overridevirtual

Returns the height of the camera image.

Returns
Height of the camera image, in pixel, with range [0, infinity)

Implements Ocean::AnyCameraT< T >.

◆ inverseFocalLengthX()

template<typename T , typename TCameraWrapper >
T Ocean::AnyCameraWrappingT< T, TCameraWrapper >::inverseFocalLengthX
overridevirtual

Returns the inverse horizontal focal length parameter.

Returns
Inverse horizontal focal length parameter in pixel domain, with range (0, infinity)

Implements Ocean::AnyCameraT< T >.

◆ inverseFocalLengthY()

template<typename T , typename TCameraWrapper >
T Ocean::AnyCameraWrappingT< T, TCameraWrapper >::inverseFocalLengthY
overridevirtual

Returns the inverse vertical focal length parameter.

Returns
Inverse vertical focal length parameter in pixel domain, with range (0, infinity)

Implements Ocean::AnyCameraT< T >.

◆ isEqual()

template<typename T , typename TCameraWrapper >
bool Ocean::AnyCameraWrappingT< T, TCameraWrapper >::isEqual ( const AnyCameraT< T > &  anyCamera,
const T  eps = NumericT<T>::eps() 
) const
overridevirtual

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

The image resolution must always be identical.

Parameters
anyCameraThe second camera to be used for comparison, can be invalid
epsThe epsilon threshold to be used, with range [0, infinity)
Returns
True, if so

Implements Ocean::AnyCameraT< T >.

◆ isInside()

template<typename T , typename TCameraWrapper >
bool Ocean::AnyCameraWrappingT< T, TCameraWrapper >::isInside ( const VectorT2< T > &  imagePoint,
const T  signedBorder = T(0) 
) const
overridevirtual

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

Optional an explicit border can be defined to allow points slightly outside the camera image, or further inside the image.
Defined a negative border size to allow image points outside the camera frame, or a positive border size to prevent points within the camera frame but close to the boundary.

Parameters
imagePointImage point to be checked, must be valid
signedBorderThe optional border increasing or decreasing the rectangle in which the image point must be located, in pixels, with range (-infinity, std::min(width() / 2, height() / 2)
Returns
True, if the image point lies in the ranges [0, width())x[0, height())

Implements Ocean::AnyCameraT< T >.

◆ isValid()

template<typename T , typename TCameraWrapper >
bool Ocean::AnyCameraWrappingT< T, TCameraWrapper >::isValid
overridevirtual

Returns whether this camera is valid.

Returns
True, if so

Implements Ocean::AnyCameraT< T >.

◆ name()

template<typename T , typename TCameraWrapper >
std::string Ocean::AnyCameraWrappingT< T, TCameraWrapper >::name
overridevirtual

Returns the name of this camera.

Returns
The camera's name

Implements Ocean::AnyCameraT< T >.

◆ pointJacobian2nx3IF()

template<typename T , typename TCameraWrapper >
void Ocean::AnyCameraWrappingT< T, TCameraWrapper >::pointJacobian2nx3IF ( const VectorT3< T > *  flippedCameraObjectPoints,
const size_t  numberObjectPoints,
T *  jacobians 
) const
overridevirtual

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

The resulting jacobian matrix has the following layout:

| dfu / dx, dfu / dy, dfu / dz | <- for object point 0
| dfv / dx, dfv / dy, dfv / dz |
|           ...                |
| dfu / dx, dfu / dy, dfu / dz | <- for object point n - 1
| dfv / dx, dfv / dy, dfv / dz |
with projection function
q = f(p)
q_u = fu(p), q_y = fv(p)
with 2D image point q = (q_u, q_v) and 3D object point p = (x, y, z)
Parameters
flippedCameraObjectPointsThe 3D object points defined in relation to the inverted and flipped camera pose (camera looking into the positive z-space with y-axis pointing down).
numberObjectPointsThe number of given 3D object points, with range [1, infinity)
jacobiansThe resulting 2n x 3 Jacobian matrix, with 2 * numberObjectPoints * 3 elements, must be valid

Implements Ocean::AnyCameraT< T >.

◆ pointJacobian2x3IF()

template<typename T , typename TCameraWrapper >
void Ocean::AnyCameraWrappingT< T, TCameraWrapper >::pointJacobian2x3IF ( const VectorT3< T > &  flippedCameraObjectPoint,
T *  jx,
T *  jy 
) const
overridevirtual

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

The resulting jacobian matrix has the following layout:

| dfu / dx, dfu / dy, dfu / dz |
| dfv / dx, dfv / dy, dfv / dz |
with projection function
q = f(p)
q_u = fu(p), q_y = fv(p)
with 2D image point q = (q_u, q_v) and 3D object point p = (x, y, z)
Parameters
flippedCameraObjectPointThe 3D object point defined in relation to the inverted and flipped camera pose (camera looking into the positive z-space with y-axis pointing down).
jxThe resulting first row of the Jacobian matrix, must contain three elements, must be valid
jyThe resulting second row of the Jacobian matrix, must contain three elements, must be valid

Implements Ocean::AnyCameraT< T >.

◆ principalPoint()

template<typename T , typename TCameraWrapper >
VectorT2< T > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::principalPoint
overridevirtual

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

Returns
The 2D location of the principal point, with range (-infinity, infinity)x(-infinity, infinity)

Implements Ocean::AnyCameraT< T >.

◆ principalPointX()

template<typename T , typename TCameraWrapper >
T Ocean::AnyCameraWrappingT< T, TCameraWrapper >::principalPointX
overridevirtual

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

Returns
x-value of the principal point, with range (-infinity, infinity)

Implements Ocean::AnyCameraT< T >.

◆ principalPointY()

template<typename T , typename TCameraWrapper >
T Ocean::AnyCameraWrappingT< T, TCameraWrapper >::principalPointY
overridevirtual

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

Returns
y-value of the principal point, with range (-infinity, infinity)

Implements Ocean::AnyCameraT< T >.

◆ projectToImage() [1/4]

template<typename T , typename TCameraWrapper >
VectorT2< T > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::projectToImage ( const HomogenousMatrixT4< T > &  world_T_camera,
const VectorT3< T > &  objectPoint 
) const
overridevirtual

Projects a 3D object point into the camera frame.

Parameters
world_T_cameraThe camera pose, the default camera is looking into the negative z-space with y-axis up, transforming camera to world, must be valid
objectPointThe 3D object point to project, defined in world
Returns
The projected 2D image point

Implements Ocean::AnyCameraT< T >.

◆ projectToImage() [2/4]

template<typename T , typename TCameraWrapper >
void Ocean::AnyCameraWrappingT< T, TCameraWrapper >::projectToImage ( const HomogenousMatrixT4< T > &  world_T_camera,
const VectorT3< T > *  objectPoints,
const size_t  size,
VectorT2< T > *  imagePoints 
) const
overridevirtual

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

Parameters
world_T_cameraThe camera pose, the default camera is looking into the negative z-space with y-axis up, transforming camera to world, must be valid
objectPointsThe 3D object points to project, defined in world, must be valid
sizeThe number of object points, with range [1, infinity)
imagePointsThe resulting 2D image points, must be valid

Implements Ocean::AnyCameraT< T >.

◆ projectToImage() [3/4]

template<typename T , typename TCameraWrapper >
VectorT2< T > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::projectToImage ( const VectorT3< T > &  objectPoint) const
overridevirtual

Projects a 3D object point into the camera frame.

The projection is applied with a default camera pose, the camera is looking into the negative z-space with y-axis up.

Parameters
objectPointThe 3D object point to project, defined in world
Returns
The projected 2D image point

Implements Ocean::AnyCameraT< T >.

◆ projectToImage() [4/4]

template<typename T , typename TCameraWrapper >
void Ocean::AnyCameraWrappingT< T, TCameraWrapper >::projectToImage ( const VectorT3< T > *  objectPoints,
const size_t  size,
VectorT2< T > *  imagePoints 
) const
overridevirtual

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

The projection is applied with a default camera pose, the camera is looking into the negative z-space with y-axis up.

Parameters
objectPointsThe 3D object points to project, defined in world, must be valid
sizeThe number of object points, with range [1, infinity)
imagePointsThe resulting 2D image points, must be valid

Implements Ocean::AnyCameraT< T >.

◆ projectToImageIF() [1/4]

template<typename T , typename TCameraWrapper >
VectorT2< T > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::projectToImageIF ( const HomogenousMatrixT4< T > &  flippedCamera_T_world,
const VectorT3< T > &  objectPoint 
) const
overridevirtual

Projects a 3D object point into the camera frame.

Parameters
flippedCamera_T_worldThe inverted and flipped camera pose, the default camera is looking into the positive z-space with y-axis down, transforming world to flipped camera, must be valid
objectPointThe 3D object point to project, defined in world
Returns
The projected 2D image point

Implements Ocean::AnyCameraT< T >.

◆ projectToImageIF() [2/4]

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

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

Parameters
flippedCamera_T_worldThe inverted and flipped camera pose, the default camera is looking into the positive z-space with y-axis down, transforming world to flipped camera, must be valid
objectPointsThe 3D object points to project, defined in world, must be valid
sizeThe number of object points, with range [1, infinity)
imagePointsThe resulting 2D image points, must be valid

Implements Ocean::AnyCameraT< T >.

◆ projectToImageIF() [3/4]

template<typename T , typename TCameraWrapper >
VectorT2< T > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::projectToImageIF ( const VectorT3< T > &  objectPoint) const
overridevirtual

Projects a 3D object point into the camera frame.

The projection is applied with a default (inverted) and flipped camera pose, the camera is looking into the positive z-space with y-axis down.

Parameters
objectPointThe 3D object point to project, defined in world
Returns
The projected 2D image point

Implements Ocean::AnyCameraT< T >.

◆ projectToImageIF() [4/4]

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

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

The projection is applied with a default (inverted) and flipped camera pose, the camera is looking into the positive z-space with y-axis down.

Parameters
objectPointsThe 3D object points to project, defined in world, must be valid
sizeThe number of object points, with range [1, infinity)
imagePointsThe resulting 2D image points, must be valid

Implements Ocean::AnyCameraT< T >.

◆ ray() [1/2]

template<typename T , typename TCameraWrapper >
LineT3< T > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::ray ( const VectorT2< T > &  distortedImagePoint) const
overridevirtual

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

Parameters
distortedImagePoint2D (distorted) position within the image, with range [0, width())x[0, height())
Returns
The specified ray with direction pointing into the camera's negative z-space
See also
vector().

Implements Ocean::AnyCameraT< T >.

◆ ray() [2/2]

template<typename T , typename TCameraWrapper >
LineT3< T > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::ray ( const VectorT2< T > &  distortedImagePoint,
const HomogenousMatrixT4< T > &  world_T_camera 
) const
overridevirtual

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

Parameters
distortedImagePoint2D (distorted) position within the image, with range [0, width())x[0, height())
world_T_cameraThe pose of the camera, the extrinsic camera matrix, must be valid
Returns
The specified ray with direction pointing into the camera's negative z-space
See also
vector().

Implements Ocean::AnyCameraT< T >.

◆ vector() [1/2]

template<typename T , typename TCameraWrapper >
VectorT3< T > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::vector ( const VectorT2< T > &  distortedImagePoint,
const bool  makeUnitVector = true 
) const
overridevirtual

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

The vector is determined for the default camera looking into the negative z-space with y-axis up.

Parameters
distortedImagePoint2D (distorted) position within the image, with range [0, width())x[0, height())
makeUnitVectorTrue, to return a vector with length 1; False, to return a vector with any length
Returns
Vector pointing into the negative z-space
See also
vectorIF(), ray().

Implements Ocean::AnyCameraT< T >.

◆ vector() [2/2]

template<typename T , typename TCameraWrapper >
void Ocean::AnyCameraWrappingT< T, TCameraWrapper >::vector ( const VectorT2< T > *  distortedImagePoints,
const size_t  size,
VectorT3< T > *  vectors,
const bool  makeUnitVector = true 
) const
overridevirtual

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

The vectors are determined for a default camera looking into the negative z-space with y-axis up.

Parameters
distortedImagePoints2D (distorted) positions within the image, with range [0, width())x[0, height()), must be valid
sizeThe number of provided points, with range [1, infinity)
vectorsThe resulting vectors pointing into the negative z-space, one for each image point, must be valid
makeUnitVectorTrue, to return a vector with length 1; False, to return a vector with any length
See also
vectorIF(), ray().

Implements Ocean::AnyCameraT< T >.

◆ vectorIF() [1/2]

template<typename T , typename TCameraWrapper >
VectorT3< T > Ocean::AnyCameraWrappingT< T, TCameraWrapper >::vectorIF ( const VectorT2< T > &  distortedImagePoint,
const bool  makeUnitVector = true 
) const
overridevirtual

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

The vector is determined for the default camera looking into the positive z-space with y-axis down.

Parameters
distortedImagePoint2D (distorted) position within the image, with range [0, width())x[0, height())
makeUnitVectorTrue, to return a vector with length 1; False, to return a vector with any length
Returns
Vector pointing into the positive z-space

Implements Ocean::AnyCameraT< T >.

◆ vectorIF() [2/2]

template<typename T , typename TCameraWrapper >
void Ocean::AnyCameraWrappingT< T, TCameraWrapper >::vectorIF ( const VectorT2< T > *  distortedImagePoints,
const size_t  size,
VectorT3< T > *  vectors,
const bool  makeUnitVector = true 
) const
overridevirtual

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

The vectors are determined for a default camera looking into the positive z-space with y-axis down.

Parameters
distortedImagePoints2D (distorted) positions within the image, with range [0, width())x[0, height()), must be valid
sizeThe number of provided points, with range [1, infinity)
vectorsThe resulting vectors pointing into the positive z-space, one for each image point, must be valid
makeUnitVectorTrue, to return a vector with length 1; False, to return a vector with any length

Implements Ocean::AnyCameraT< T >.

◆ width()

template<typename T , typename TCameraWrapper >
unsigned int Ocean::AnyCameraWrappingT< T, TCameraWrapper >::width
overridevirtual

Returns the width of the camera image.

Returns
Width of the camera image, in pixel, with range [0, infinity)

Implements Ocean::AnyCameraT< T >.


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