Ocean
Loading...
Searching...
No Matches
TestNonLinearOptimizationPlane.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_PLANE_H
9#define META_OCEAN_TEST_TESTGEOMETRY_TEST_NON_LINEAR_OPTIMIZATION_PLANE_H
10
12
14
16
18
19namespace Ocean
20{
21
22namespace Test
23{
24
25namespace TestGeometry
26{
27
28/**
29 * This class tests the non linear optimization plane implementations.
30 * @ingroup testgeometry
31 */
32class OCEAN_TEST_GEOMETRY_EXPORT TestNonLinearOptimizationPlane
33{
34 public:
35
36 /**
37 * Tests the non linear optimization plane function.
38 * @param testDuration Number of seconds for each test
39 * @param worker Optional worker object
40 * @param selector Selector for sub-tests
41 * @return True, if the entire function test has succeeded
42 */
43 static bool test(const double testDuration, Worker* worker, const TestSelector& selector);
44
45 private:
46
47 /**
48 * Tests the non linear optimization function for a plane.
49 * @param testDuration Number of seconds for each test
50 * @return True, if succeeded
51 */
52 static bool testOptimizePlane(const double testDuration);
53
54 /**
55 * Tests the non linear optimization function for two cameras capturing 3D object points lying on a plane.
56 * @param testDuration Number of seconds for each test, with range (0, infinity)
57 * @return True, if succeeded
58 */
59 static bool testOptimizeOnePoseOnePlane(const double testDuration);
60
61 /**
62 * Tests the non linear optimization function for several cameras capturing 3D object points lying on a plane.
63 * @param testDuration Number of seconds for each test, with range (0, infinity)
64 * @return True, if succeeded
65 */
66 static bool testOptimizePosesOnePlane(const double testDuration);
67
68 /**
69 * Tests the non linear optimization function for a 3D plane with ideal 3D object points.
70 * @param numberPoints Number of image points to be used
71 * @param testDuration Number of seconds for each test
72 * @param type Estimator type to be used
73 * @param outliers Number of outlier correspondences
74 * @param randomGenerator The random generator to be used
75 * @return True, if succeeded
76 */
77 static bool testOptimizePlaneIdeal(const unsigned int numberPoints, const double testDuration, const Geometry::Estimator::EstimatorType type, const unsigned int outliers, RandomGenerator& randomGenerator);
78
79 /**
80 * Tests the non linear optimization function for a 3D plane with noisy 3D object points in combination with a RANSAC algorithm.
81 * @param numberPoints Number of image points to be used
82 * @param testDuration Number of seconds for each test
83 * @param type Estimator type to be used
84 * @param standardDeviation Optional standard deviation of the Gaussian normal distribution for noised image points, with range [0, infinity)
85 * @param outliers Number of outlier correspondences
86 * @param randomGenerator The random generator to be used
87 * @return True, if succeeded
88 */
89 static bool testOptimizePlaneNoisy(const unsigned int numberPoints, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers, RandomGenerator& randomGenerator);
90
91 /**
92 * Tests the non linear optimization function for two cameras capturing 3D object points lying on a plane.
93 * @param correspondences Number of point correspondences
94 * @param testDuration Number of seconds for each test, with range (0, infinity)
95 * @param type Estimator type to be used
96 * @param randomGenerator The random generator to be used
97 * @return True, if succeeded
98 */
99 static bool testOptimizeOnePoseOnePlane(const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, RandomGenerator& randomGenerator);
100
101 /**
102 * Tests the non linear optimization function for several cameras capturing 3D object points lying on a plane.
103 * @param numberPoses Number of poses to be used
104 * @param correspondences Number of point correspondences
105 * @param testDuration Number of seconds for each test, with range (0, infinity)
106 * @param type Estimator type to be used
107 * @param randomGenerator The random generator to be used
108 * @return True, if succeeded
109 */
110 static bool testOptimizePosesOnePlane(const unsigned int numberPoses, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, RandomGenerator& randomGenerator);
111};
112
113}
114
115}
116
117}
118
119#endif // META_OCEAN_TEST_TESTGEOMETRY_TEST_NON_LINEAR_OPTIMIZATION_PLANE_H
EstimatorType
Definition of individual robust estimator types.
Definition Estimator.h:34
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
This class tests the non linear optimization plane implementations.
Definition TestNonLinearOptimizationPlane.h:33
static bool testOptimizePosesOnePlane(const unsigned int numberPoses, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, RandomGenerator &randomGenerator)
Tests the non linear optimization function for several cameras capturing 3D object points lying on a ...
static bool testOptimizeOnePoseOnePlane(const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, RandomGenerator &randomGenerator)
Tests the non linear optimization function for two cameras capturing 3D object points lying on a plan...
static bool testOptimizeOnePoseOnePlane(const double testDuration)
Tests the non linear optimization function for two cameras capturing 3D object points lying on a plan...
static bool testOptimizePlaneIdeal(const unsigned int numberPoints, const double testDuration, const Geometry::Estimator::EstimatorType type, const unsigned int outliers, RandomGenerator &randomGenerator)
Tests the non linear optimization function for a 3D plane with ideal 3D object points.
static bool testOptimizePosesOnePlane(const double testDuration)
Tests the non linear optimization function for several cameras capturing 3D object points lying on a ...
static bool testOptimizePlaneNoisy(const unsigned int numberPoints, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers, RandomGenerator &randomGenerator)
Tests the non linear optimization function for a 3D plane with noisy 3D object points in combination ...
static bool testOptimizePlane(const double testDuration)
Tests the non linear optimization function for a plane.
static bool test(const double testDuration, Worker *worker, const TestSelector &selector)
Tests the non linear optimization plane function.
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
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