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