Ocean
Loading...
Searching...
No Matches
TestNonLinearOptimizationPose.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_TEST_TESTGEOMETRY_TEST_NON_LINEAR_OPTIMIZATION_POSE_H
9#define META_OCEAN_TEST_TESTGEOMETRY_TEST_NON_LINEAR_OPTIMIZATION_POSE_H
10
12
14
18
19namespace Ocean
20{
21
22namespace Test
23{
24
25namespace TestGeometry
26{
27
28/**
29 * This class implements the tests of the non linear optimization functions for camera poses.
30 * @ingroup testgeometry
31 */
32class OCEAN_TEST_GEOMETRY_EXPORT TestNonLinearOptimizationPose
33{
34 public:
35
36 /**
37 * Tests the non linear optimization function.
38 * @param testDuration Number of seconds for each test, with range (0, infinity)
39 * @param worker Optional worker object
40 * @return True, if the entire function test has succeeded
41 */
42 static bool test(const double testDuration, Worker* worker);
43
44 /**
45 * Deprecated.
46 *
47 * Tests the non linear optimization function for a 6DOF pose and a pinhole camera.
48 * @param testDuration Number of seconds for each test, with range (0, infinity)
49 * @return True, if succeeded
50 */
51 static bool testNonLinearOptimizationPosePinholeCamera(const double testDuration);
52
53 /**
54 * Deprecated.
55 *
56 * Tests the non linear optimizations function for a 6DOF pose and a pinhole camera, with specified correspondences, estimator type and outliers.
57 * @param pinholeCamera The pinhole camera profile to be used, must be valid
58 * @param correspondences Number of point correspondences
59 * @param testDuration Number of seconds for each test, with range (0, infinity)
60 * @param type Estimator type to be used
61 * @param standardDeviation Optional standard deviation of the Gaussian distribution for noised image points
62 * @param outliers Number of outlier correspondences
63 * @param useCovariances True, to use covariances
64 * @return True, if succeeded
65 */
66 static bool testNonLinearOptimizationPosePinholeCamera(const PinholeCamera& pinholeCamera, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers, const bool useCovariances);
67
68 /**
69 * Tests the non linear optimization function for a 6DOF pose and any camera.
70 * @param testDuration Number of seconds for each test, with range (0, infinity)
71 * @return True, if succeeded
72 */
73 static bool testNonLinearOptimizationPoseAnyCamera(const double testDuration);
74
75 /**
76 * Tests the non linear optimizations function for a 6DOF pose and any camera, with specified correspondences, estimator type and outliers.
77 * @param anyCamera The camera profile to be used, must be valid
78 * @param correspondences Number of point correspondences
79 * @param testDuration Number of seconds for each test, with range (0, infinity)
80 * @param type Estimator type to be used
81 * @param standardDeviation Optional standard deviation of the Gaussian distribution for noised image points
82 * @param outliers Number of outlier correspondences
83 * @param useCovariances True, to use covariances
84 * @return True, if succeeded
85 */
86 static bool testNonLinearOptimizationPoseAnyCamera(const AnyCamera& anyCamera, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers, const bool useCovariances);
87
88 /**
89 * Tests the non linear optimization function for a 6DOF pose with flexible zoom factor.
90 * @param testDuration Number of seconds for each test, with range (0, infinity)
91 * @return True, if succeeded
92 */
93 static bool testNonLinearOptimizationPoseZoom(const double testDuration);
94
95 /**
96 * Tests the non linear optimizations function for a 6DOF pose with flexible zoom factor, with specified correspondences, estimator type and outliers.
97 * @param pinholeCamera The pinhole camera to be used
98 * @param correspondences Number of point correspondences
99 * @param testDuration Number of seconds for each test, with range (0, infinity)
100 * @param type Estimator type to be used
101 * @param standardDeviation Optional standard deviation of the Gaussian distribution for noised image points
102 * @param outliers Number of outlier correspondences
103 * @param useCovariances True, to use covariances
104 * @return True, if succeeded
105 */
106 static bool testNonLinearOptimizationPoseZoom(const PinholeCamera& pinholeCamera, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers, const bool useCovariances);
107};
108
109}
110
111}
112
113}
114
115#endif // META_OCEAN_TEST_TESTGEOMETRY_TEST_NON_LINEAR_OPTIMIZATION_POSE_H
This class implements the abstract base class for all AnyCamera objects.
Definition AnyCamera.h:130
EstimatorType
Definition of individual robust estimator types.
Definition Estimator.h:34
This class implements the tests of the non linear optimization functions for camera poses.
Definition TestNonLinearOptimizationPose.h:33
static bool test(const double testDuration, Worker *worker)
Tests the non linear optimization function.
static bool testNonLinearOptimizationPosePinholeCamera(const PinholeCamera &pinholeCamera, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers, const bool useCovariances)
Deprecated.
static bool testNonLinearOptimizationPoseZoom(const PinholeCamera &pinholeCamera, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers, const bool useCovariances)
Tests the non linear optimizations function for a 6DOF pose with flexible zoom factor,...
static bool testNonLinearOptimizationPoseZoom(const double testDuration)
Tests the non linear optimization function for a 6DOF pose with flexible zoom factor.
static bool testNonLinearOptimizationPoseAnyCamera(const AnyCamera &anyCamera, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers, const bool useCovariances)
Tests the non linear optimizations function for a 6DOF pose and any camera, with specified correspond...
static bool testNonLinearOptimizationPosePinholeCamera(const double testDuration)
Deprecated.
static bool testNonLinearOptimizationPoseAnyCamera(const double testDuration)
Tests the non linear optimization function for a 6DOF pose and any camera.
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
float Scalar
Definition of a scalar type.
Definition Math.h:129
The namespace covering the entire Ocean framework.
Definition Accessor.h:15