You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: impl/ocean/geometry/GravityConstraints.h
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -31,21 +31,21 @@ class GravityConstraintsT;
31
31
/**
32
32
* Definition of the GravityConstraints object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with single or double precision float data type.
33
33
* @see GravityConstraintsT
34
-
* @ingroup math
34
+
* @ingroup geometry
35
35
*/
36
36
using GravityConstraints = GravityConstraintsT<Scalar>;
37
37
38
38
/**
39
39
* Definition of the GravityConstraints object, using double floating point precision.
40
40
* @see GravityConstraintsT
41
-
* @ingroup math
41
+
* @ingroup geometry
42
42
*/
43
43
using GravityConstraintsD = GravityConstraintsT<double>;
44
44
45
45
/**
46
46
* Definition of the GravityConstraints object, using single floating point precision.
47
47
* @see GravityConstraintsT
48
-
* @ingroup math
48
+
* @ingroup geometry
49
49
*/
50
50
using GravityConstraintsF = GravityConstraintsT<float>;
51
51
@@ -80,7 +80,7 @@ class GravityConstraintsT
80
80
* @param gravityInCamera The camera gravity vector (which is known for a camera pose), defined in the camera coordinate system, with default camera pointing towards the negative z-space and y-axis pointing upwards.
81
81
* @param worldGravityInWorld The world gravity vector in the world coordinate system, mainly defining how the world coordinate system is oriented/aligned wrt gravity
82
82
* @param weightFactor The weight factor to be used during a non-linear optimization of a camera pose; 0 to skip any gravity correction, 1 to apply a normal/default gravity correction, larger values to apply a stronger gravity correction, with range [0, infinity)
83
-
* @param maximalAngle The maximal angle between world and camera gravity vector (when converted into the same coordinate system), can be used e.g., when the camera pose is determined e.g., with RANSAC or a PnP algorithm, in radian, with range [0, PI/2).
83
+
* @param maximalAngle The maximal angle between world and camera gravity vector (when converted into the same coordinate system), can be used e.g., when the camera pose is determined e.g., with RANSAC or a PnP algorithm, basically specifying how accurate the gravity vector is, in radian, with range [0, PI/2)
84
84
*/
85
85
explicitinlineGravityConstraintsT(const VectorT3<T>& cameraGravityInCamera, const VectorT3<T>& worldGravityInWorld = VectorT3<T>(0, -1, 0), const T weightFactor = T(1), const T maximalAngle = NumericT<T>::deg2rad(5));
86
86
@@ -89,7 +89,7 @@ class GravityConstraintsT
89
89
* @param gravityInCameras The camera gravity vectors (which are known for several camera poses), defined in the camera coordinate system, with default camera pointing towards the negative z-space and y-axis pointing upwards.
90
90
* @param worldGravityInWorld The world gravity vector in the world coordinate system, mainly defining how the world coordinate system is oriented/aligned wrt gravity
91
91
* @param weightFactor The weight factor to be used during a non-linear optimization of a camera pose; 0 to skip any gravity correction, 1 to apply a normal/default gravity correction, larger values to apply a stronger gravity correction, with range [0, infinity)
92
-
* @param maximalAngle The maximal angle between world and camera gravity vectors (when converted into the same coordinate system), can be used e.g., when the camera pose is determined e.g., with RANSAC or a PnP algorithm, in radian, with range [0, PI/2).
92
+
* @param maximalAngle The maximal angle between world and camera gravity vectors (when converted into the same coordinate system), can be used e.g., when the camera pose is determined e.g., with RANSAC or a PnP algorithm, basically specifying how accurate the gravity vector is, in radian, with range [0, PI/2)
93
93
*/
94
94
explicitinlineGravityConstraintsT(VectorsT3<T>&& cameraGravityInCameras, const VectorT3<T>& worldGravityInWorld = VectorT3<T>(0, -1, 0), const T weightFactor = T(1), const T maximalAngle = NumericT<T>::deg2rad(5));
95
95
@@ -99,7 +99,7 @@ class GravityConstraintsT
99
99
* @param world_T_camera The transformation transforming camera to world, with default camera pointing towards the negative z-space and y-axis pointing upwards, must be valid
100
100
* @param worldGravityInWorld The world gravity vector in the world coordinate system, mainly defining how the world coordinate system is oriented/aligned wrt gravity
101
101
* @param weightFactor The weight factor to be used during a non-linear optimization of a camera pose; 0 to skip any gravity correction, 1 to apply a normal/default gravity correction, larger values to apply a stronger gravity correction, with range [0, infinity)
102
-
* @param maximalAngle The maximal angle between world and camera gravity vector (when converted into the same coordinate system), can be used e.g., when the camera pose is determined e.g., with RANSAC or a PnP algorithm, in radian, with range [0, PI/2).
102
+
* @param maximalAngle The maximal angle between world and camera gravity vector (when converted into the same coordinate system), can be used e.g., when the camera pose is determined e.g., with RANSAC or a PnP algorithm, basically specifying how accurate the gravity vector is, in radian, with range [0, PI/2)
103
103
*/
104
104
explicitinlineGravityConstraintsT(const HomogenousMatrixT4<T>& world_T_camera, const VectorT3<T>& worldGravityInWorld = VectorT3<T>(0, -1, 0), const T weightFactor = T(1), const T maximalAngle = NumericT<T>::deg2rad(5));
105
105
@@ -109,7 +109,7 @@ class GravityConstraintsT
109
109
* @param world_T_cameras The transformations transforming camera to world, with default camera pointing towards the negative z-space and y-axis pointing upwards, must be valid
110
110
* @param worldGravityInWorld The world gravity vector in the world coordinate system, mainly defining how the world coordinate system is oriented/aligned wrt gravity
111
111
* @param weightFactor The weight factor to be used during a non-linear optimization of a camera pose; 0 to skip any gravity correction, 1 to apply a normal/default gravity correction, larger values to apply a stronger gravity correction, with range [0, infinity)
112
-
* @param maximalAngle The maximal angle between world and camera gravity vectors (when converted into the same coordinate system), can be used e.g., when the camera pose is determined e.g., with RANSAC or a PnP algorithm, in radian, with range [0, PI/2).
112
+
* @param maximalAngle The maximal angle between world and camera gravity vectors (when converted into the same coordinate system), can be used e.g., when the camera pose is determined e.g., with RANSAC or a PnP algorithm, basically specifying how accurate the gravity vector is, in radian, with range [0, PI/2)
113
113
*/
114
114
explicitinlineGravityConstraintsT(const HomogenousMatricesT4<T>& world_T_cameras, const VectorT3<T>& worldGravityInWorld = VectorT3<T>(0, -1, 0), const T weightFactor = T(1), const T maximalAngle = NumericT<T>::deg2rad(5));
115
115
@@ -244,23 +244,23 @@ class GravityConstraintsT
244
244
inline T alignmentCosine(const QuaternionT<T>& world_Q_camera, constsize_t cameraIndex = 0) const;
245
245
246
246
/**
247
-
* Returns the cosine between the world gravity vector and the camera gravity vector (after converting into the same coordinate system), in radian
247
+
* Returns the cosine between the world gravity vector and the camera gravity vector (after converting into the same coordinate system).
248
248
* @param world_T_camera The transformation transforming camera to world, with a default camera pointing towards the negative z-space and y-axis pointing upwards, must be valid
249
249
* @param cameraIndex The index of the camera for which the cosine will be returned, with range [0, numberCameras() - 1]
250
250
* @return The cosine of the angle between the world gravity vector and the camera gravity vector, with range [-1, 1]
251
251
*/
252
252
inline T alignmentCosine(const HomogenousMatrixT4<T>& world_T_camera, constsize_t cameraIndex = 0) const;
253
253
254
254
/**
255
-
* Returns the cosine between the world gravity vector and the camera gravity vector (after converting into the same coordinate system), in radian
255
+
* Returns the cosine between the world gravity vector and the camera gravity vector (after converting into the same coordinate system).
256
256
* @param flippedCamera_Q_world The rotation rotating world to flipped camera, with a default flipped camera pointing towards the positive z-space and y-axis pointing downwards, must be valid
257
257
* @param cameraIndex The index of the camera for which the cosine will be returned, with range [0, numberCameras() - 1]
258
258
* @return The cosine of the angle between the world gravity vector and the camera gravity vector, with range [-1, 1]
259
259
*/
260
260
inline T alignmentCosineIF(const QuaternionT<T>& flippedCamera_Q_world, constsize_t cameraIndex = 0) const;
261
261
262
262
/**
263
-
* Returns the cosine between the world gravity vector and the camera gravity vector (after converting into the same coordinate system), in radian
263
+
* Returns the cosine between the world gravity vector and the camera gravity vector (after converting into the same coordinate system).
264
264
* @param flippedCamera_T_world The transformation transforming world to flipped camera, with a default flipped camera pointing towards the positive z-space and y-axis pointing downwards, must be valid
265
265
* @param cameraIndex The index of the camera for which the cosine will be returned, with range [0, numberCameras() - 1]
266
266
* @return The cosine of the angle between the world gravity vector and the camera gravity vector, with range [-1, 1]
* Rotates a inverted and flipped camera pose so that the flipped camera is aligned with the gravity constraints.
381
+
* Rotates an inverted and flipped camera pose so that the flipped camera is aligned with the gravity constraints.
382
382
* @param flippedCamera_T_world The transformation transforming world to flipped camera, with a default flipped camera pointing towards the positive z-space and y-axis pointing downwards, must be valid
383
383
* @param cameraIndex The index of the camera for which the alignment will be performed, with range [0, numberCameras() - 1]
384
-
* @return The flipped inverted and flipped camera pose aligned with the gravity constraints (alignedFlippedCamera_T_world)
384
+
* @return The inverted and flipped camera pose aligned with the gravity constraints (alignedFlippedCamera_T_world)
* Helper function returning the camera gravity vector in the camera coordinate system based on a given camera pose and the world gravity vector.
421
-
* The resulting camera gravity vector is obtained by converting the world gravity vector into the camera coordinate system.,br>
421
+
* The resulting camera gravity vector is obtained by converting the world gravity vector into the camera coordinate system.<br>
422
422
* This function return the same gravity vector as cameraGravityInCamera(), but uses the flipped camera pose as input parameter.
423
423
* @param flippedCamera_T_world The transformation transforming world to flipped camera, with default camera pointing towards the positive z-space and y-axis pointing downwards, must be valid
424
424
* @param worldGravityInWorld The world gravity vector defined in the world coordinate system, must be a unit vector
@@ -444,7 +444,7 @@ class GravityConstraintsT
444
444
/// The world gravity vector defined in the world coordinate system, mainly defining how the world coordinate system is oriented/aligned wrt gravity.
/// The weight factor to be used during a non-linear optimization of a camera pose; 0 to skip any gravity correction, 1 to apply a full gravity correction; with range [0, 1).
447
+
/// The weight factor to be used during a non-linear optimization of a camera pose; 0 to skip any gravity correction, 1 to apply a full gravity correction; with range [0, infinity).
448
448
T weightFactor_ = T(-1);
449
449
450
450
/// The maximal angle between world and camera gravity vectors (when converted into the same coordinate system), can be used e.g., when the camera pose is determined e.g., with RANSAC or a PnP algorithm, in radian, with range [0, PI/2).
0 commit comments