Ocean
Loading...
Searching...
No Matches
TestNonLinearOptimizationLine.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_LINE_H
9#define META_OCEAN_TEST_TESTGEOMETRY_TEST_NON_LINEAR_OPTIMIZATION_LINE_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 implementations for lines.
28 * @ingroup testgeometry
29 */
30class OCEAN_TEST_GEOMETRY_EXPORT TestNonLinearOptimizationLine
31{
32 public:
33
34 /**
35 * Tests the non linear optimization 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 one 2D line.
47 * @param testDuration Number of seconds for each test
48 * @return True, if succeeded
49 */
50 static bool testNonLinearOptimizationLine(const double testDuration);
51
52 /**
53 * Tests the non linear optimization function for a 2D line with ideal 2D image points.
54 * @param numberPoints Number of image points to be used
55 * @param testDuration Number of seconds for each test
56 * @param type Estimator type to be used
57 * @param outliers Number of outlier correspondences
58 * @return True, if succeeded
59 */
60 static bool testOptimizeLineIdeal(const unsigned int numberPoints, const double testDuration, const Geometry::Estimator::EstimatorType type, const unsigned int outliers = 0);
61
62 /**
63 * Tests the non linear optimization function for a 2D line with noisy 2D image points.
64 * @param numberPoints Number of image points to be used
65 * @param testDuration Number of seconds for each test
66 * @param type Estimator type to be used
67 * @param standardDeviation Optional standard deviation of the Gaussian normal distribution for noised image points, with range [0, infinity)
68 * @param outliers Number of outlier correspondences
69 * @return True, if succeeded
70 */
71 static bool testOptimizeLineNoisy(const unsigned int numberPoints, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation = 0, const unsigned int outliers = 0);
72};
73
74}
75
76}
77
78}
79
80#endif // META_OCEAN_TEST_TESTGEOMETRY_TEST_NON_LINEAR_OPTIMIZATION_H
EstimatorType
Definition of individual robust estimator types.
Definition Estimator.h:34
This class tests the non linear optimization implementations for lines.
Definition TestNonLinearOptimizationLine.h:31
static bool testOptimizeLineIdeal(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 2D line with ideal 2D image points.
static bool test(const double testDuration, Worker *worker, const TestSelector &selector)
Tests the non linear optimization function.
static bool testNonLinearOptimizationLine(const double testDuration)
Tests the non linear optimization function for one 2D line.
static bool testOptimizeLineNoisy(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 2D line with noisy 2D image points.
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