Ocean
|
This class implements the base class for all cameras. More...
Static Public Member Functions | |
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... | |
This class implements the base class for all cameras.
The base class provides model independent functionalities.
Use AnyCamera in case an entire camera model is needed.
T | The data type of a scalar, 'float' or 'double' |
|
static |
Converts field of view (and width) to the corresponding focal length.
width | The width of the camera in pixel, with range [1, infinity) |
fovX | The horizontal field of view of the camera, in radian, with range (0, PI) |
|
inlinestatic |
Returns the 3x3 transformation matrix flipping a transformation around the x-axis by 180 deg.
The matrix is defined by an angle-axis rotation: Rotation(1, 0, 0, PI).
U | The data type of the elements of the matrix |
|
inlinestatic |
Returns the 4x4 transformation matrix flipping a transformation around the x-axis by 180 deg.
The matrix is defined by an angle-axis rotation: Rotation(1, 0, 0, PI).
U | The data type of the elements of the matrix |
|
inlinestatic |
Flips a transformation matrix around the x-axis by 180 degree.
The flip transformation is applied at the left and right side of the original matrix.
left_T_right | The transformation matrix to flip, must be valid |
U | The data type of the elements of the matrix |
|
inlinestatic |
Flips a quaternion around the x-axis by 180 degree.
The flip transformation is applied at the left and right side of the original rotation.
left_Q_right | The quaternion to flip, must be valid |
U | The data type of the elements of the quaternion |
|
inlinestatic |
Flips a 3x3 rotation matrix around the x-axis by 180 degree.
The flip transformation is applied at the left and right side of the original rotation.
left_R_right | The rotation matrix to flip, must be valid |
U | The data type of the elements of the rotation |
|
inlinestatic |
Flips a transformation matrix around the x-axis by 180 degree.
The flip transformation is applied at the left side of the given matrix.
left_T_right | The transformation matrix to flip, must be valid |
U | The data type of the elements of the matrix |
|
inlinestatic |
Flips a quaternion around the x-axis by 180 degree.
The flip transformation is applied at the left side of the original rotation.
left_Q_right | The quaternion to flip, must be valid |
U | The data type of the elements of the quaternion |
|
inlinestatic |
Flips a 3x3 rotation matrix around the x-axis by 180 degree.
The flip transformation is applied at the left side of the original rotation.
left_R_right | The rotation matrix to flip, must be valid |
U | The data type of the elements of the rotation |
|
inlinestatic |
Flips a transformation matrix around the x-axis by 180 degree.
The flip transformation is applied at the right side of the given matrix.
left_T_right | The transformation matrix to flip, must be valid |
U | The data type of the elements of the matrix |
|
inlinestatic |
Flips a quaternion around the x-axis by 180 degree.
The flip transformation is applied at the right side of the original rotation.
left_Q_right | The quaternion to flip, must be valid |
U | The data type of the elements of the quaternion |
|
inlinestatic |
Flips a 3x3 rotation matrix around the x-axis by 180 degree.
The flip transformation is applied at the right side of the original rotation.
left_R_right | The rotation matrix to flip, must be valid |
U | The data type of the elements of the rotation |
|
inlinestatic |
Returns the quaternion flipping a rotation around the x-axis by 180 deg.
The quaternion is defined by an angle-axis rotation: Rotation(1, 0, 0, PI).
U | The data type of the elements of the quaternion |
|
static |
Calculates the vertical FOV from the horizontal FOV and the aspect ratio of the camera image.
fovX | The given field of view in x direction (in radian), with range (0, PI) |
aspectRatio | The aspect ratio of the camera (width / height) |
|
static |
Calculates the horizontal FOV from the vertical FOV and the aspect ratio of the camera image.
fovY | The given field of view in y direction (in radian), with range (0, PI) |
aspectRatio | The aspect ratio of the camera (width / height) |
|
inlinestatic |
Transforms inverted and flipped camera matrices into standard viewing (extrinsic camera) matrices.
flippedCameras_T_world | The inverted and flipped camera poses to transform |
U | The data type of the elements of the matrix |
|
inlinestatic |
Transforms an inverted and flipped camera pose into a standard camera pose.
flippedCamera_T_world | The inverted and flipped camera pose to transform, must be valid |
U | The data type of the elements of the matrix |
|
inlinestatic |
Transforms inverted and flipped camera matrices into standard viewing (extrinsic camera) matrices.
flippedCameras_T_world | The inverted and flipped camera poses to transform, can be nullptr if number == 0 |
number | The number of poses, with range [0, infinity) |
U | The data type of the elements of the matrix |
|
inlinestatic |
Transforms inverted and flipped camera matrices into standard viewing (extrinsic camera) matrices.
flippedCameras_T_world | The inverted and flipped camera poses to transform, can be nullptr if number == 0 |
world_T_cameras | The resulting standard camera poses, can be nullptr if number == 0 |
number | The number of poses, with range [0, infinity) |
U | The data type of the elements of the matrix |
|
inlinestatic |
Transforms an inverted and flipped rotation quaternion into a standard viewing rotation quaternion.
flippedCamera_Q_world | The inverted and flipped rotation quaternion of camera pose to transform |
U | The data type of the elements of the quaternion |
|
inlinestatic |
Transforms an inverted and flipped rotation matrix into a standard viewing rotation matrix.
flippedCamera_R_world | The inverted and flipped rotation matrix of camera to transform, must be valid |
U | The data type of the elements of the matrix |
|
inlinestatic |
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.
This function actually determined whether (iFlippedPose * objectPoint).z() > epsilon.
flippedCamera_T_world | The inverted and flipped pose of the camera, must be valid |
objectPoint | The object point to check |
epsilon | The minimal distance between camera and object point on the z-axis so that the object point counts as lying in front, with range [0, infinity) |
|
inlinestatic |
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.
This function actually determined whether (iFlippedPose * objectPoint).z() > epsilon.
flippedCamera_R_world | The inverted and flipped orientation of the camera, must be valid |
objectPoint | The object point to check |
epsilon | The minimal distance between camera and object point on the z-axis so that the object point counts as lying in front, with range [0, infinity) |
|
inlinestatic |
Calculates the normalized image point (the normalized projected object point) for a of given object point with corresponding extrinsic camera matrix.
The extrinsic matrix transforms a 3D point given in camera coordinates into 3D world coordinates.
The viewing direction of the camera is along the negative z-axis.
The extrinsic matrix will be flipped and inverted internally.
extrinsic | The extrinsic camera matrix |
objectPoint | The 3D object point for that the normalized image point will be calculated |
|
inlinestatic |
Calculates the normalized image point (the normalized projected object point) for a given object point with corresponding inverse and flipped extrinsic camera matrix.
The inverse extrinsic matrix transforms a 3D point given in world coordinates into 3D camera coordinates.
The coordinate system of the camera is flipped meaning that the viewing direction is along the positive z-axis.
The flipped coordinate system can be received by a rotation around the x-axis by 180 degree.
iFlippedExtrinsic | The inverted and flipped extrinsic camera matrix |
objectPoint | The 3D object point for that the normalized image point will be calculated |
|
inlinestatic |
Calculates the normalized image points (the normalized projected object points) for a set of given object points with corresponding extrinsic camera matrix.
The extrinsic matrix transforms a 3D point given in camera coordinates into 3D world coordinates.
The viewing direction of the camera is along the negative z-axis.
The extrinsic matrix will be flipped and inverted internally.
extrinsic | The extrinsic camera matrix |
objectPoints | The set of 3D object points for that the normalized image points will be calculated |
numberObjectPoints | The number of object points to project |
normalizedImagePoints | The resulting normalized image points, make sure that enough memory is provided |
|
static |
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.
The inverse extrinsic matrix transforms a 3D point given in world coordinates into 3D camera coordinates.
The coordinate system of the camera is flipped meaning that the viewing direction is along the positive z-axis.
The flipped coordinate system can be received by a rotation around the x-axis by 180 degree.
iFlippedExtrinsic | The inverted and flipped extrinsic camera matrix |
objectPoints | The set of 3D object points for that the normalized image points will be calculated |
numberObjectPoints | The number of object points to project |
normalizedImagePoints | The resulting normalized image points, make sure that enough memory is provided |
|
inlinestatic |
Transforms standard homogenous 4x4 viewing (extrinsic camera) matrices into an inverted and flipped camera matrices.
The standard matrix defines a coordinate system with negative Z-axis as viewing direction in relation to the world coordinate system.
The inverted and flipped camera pose defines a coordinate system with positive Z-axis as viewing direction and transforms the world in relation to the camera coordinate system.
world_T_cameras | The standard camera poses to transform |
U | The data type of the elements of the matrix |
|
inlinestatic |
Transforms a standard homogenous 4x4 viewing (extrinsic camera) matrix into an inverted and flipped camera pose.
The standard matrix defines a coordinate system with negative Z-axis as viewing direction in relation to the world coordinate system.
The inverted and flipped camera pose defines a coordinate system with positive Z-axis as viewing direction and transforms the world in relation to the camera coordinate system.
world_T_camera | The standard camera pose to transform, must be valid |
U | The data type of the elements of the matrix |
|
inlinestatic |
Transforms standard homogenous 4x4 viewing (extrinsic camera) matrices into an inverted and flipped camera matrices.
The standard matrix defines a coordinate system with negative Z-axis as viewing direction in relation to the world coordinate system.
The inverted and flipped camera pose defines a coordinate system with positive Z-axis as viewing direction and transforms the world in relation to the camera coordinate system.
world_T_cameras | The standard camera poses to transform, can be nullptr if number is 0u |
number | The number of provided poses, with range [0, infinity) |
U | The data type of the elements of the matrix |
|
inlinestatic |
Transforms standard homogenous 4x4 viewing (extrinsic camera) matrices into an inverted and flipped camera matrices.
The standard matrix defines a coordinate system with negative Z-axis as viewing direction in relation to the world coordinate system.
The inverted and flipped camera pose defines a coordinate system with positive Z-axis as viewing direction and transforms the world in relation to the camera coordinate system.
world_T_cameras | The standard camera poses to transform, can be nullptr if number is 0u |
flippedCameras_T_world | The resulting inverted and flipped camera poses |
number | The number of provided poses, with range [0, infinity) |
U | The data type of the elements of the matrix |
|
inlinestatic |
Transforms a standard rotation quaternion into an inverted and flipped rotation quaternion.
The standard rotation defines a coordinate system with negative Z-axis as viewing direction in relation to the world coordinate system.
The inverted and flipped rotation quaternion defines a coordinate system with positive Z-axis as viewing direction and transforms the world in relation to the camera coordinate system.
world_Q_camera | The standard rotation quaternion of the camera pose to transform, must be valid |
U | The data type of the elements of the quaternion |
|
inlinestatic |
Transforms a standard 3x3 rotation matrix into an inverted and flipped rotation matrix.
The standard rotation defines a coordinate system with negative Z-axis as viewing direction in relation to the world coordinate system.
The inverted and flipped rotation matrix defines a coordinate system with positive Z-axis as viewing direction and transforms the world in relation to the camera coordinate system.
world_R_camera | The standard rotation matrix of the camera pose to transform, must be valid |
U | The data type of the elements of the matrix |