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
20
21namespace Ocean
22{
23
24namespace Test
25{
26
27namespace TestGeometry
28{
29
30/**
31 * This class implements the tests of the non linear optimization functions for camera poses.
32 * @ingroup testgeometry
33 */
34class OCEAN_TEST_GEOMETRY_EXPORT TestNonLinearOptimizationPose
35{
36 public:
37
38 /**
39 * Tests the non linear optimization function.
40 * @param testDuration Number of seconds for each test, with range (0, infinity)
41 * @param worker Optional worker object
42 * @param selector Selector for sub-tests
43 * @return True, if the entire function test has succeeded
44 */
45 static bool test(const double testDuration, Worker* worker, const TestSelector& selector);
46
47 /**
48 * Deprecated.
49 *
50 * Tests the non linear optimization function for a 6DOF pose and a pinhole camera.
51 * @param testDuration Number of seconds for each test, with range (0, infinity)
52 * @return True, if succeeded
53 */
54 static bool testNonLinearOptimizationPosePinholeCamera(const double testDuration);
55
56 /**
57 * Deprecated.
58 *
59 * Tests the non linear optimizations function for a 6DOF pose and a pinhole camera, with specified correspondences, estimator type and outliers.
60 * @param pinholeCamera The pinhole camera profile to be used, must be valid
61 * @param correspondences Number of point correspondences
62 * @param testDuration Number of seconds for each test, with range (0, infinity)
63 * @param type Estimator type to be used
64 * @param standardDeviation Optional standard deviation of the Gaussian distribution for noised image points
65 * @param outliers Number of outlier correspondences
66 * @param useCovariances True, to use covariances
67 * @return True, if succeeded
68 */
69 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);
70
71 /**
72 * Tests the non linear optimization function for a 6DOF pose and any camera.
73 * @param testDuration Number of seconds for each test, with range (0, infinity)
74 * @return True, if succeeded
75 */
76 static bool testNonLinearOptimizationPoseAnyCamera(const double testDuration);
77
78 /**
79 * Tests the non linear optimizations function for a 6DOF pose and any camera, with specified correspondences, estimator type and outliers.
80 * @param anyCamera The camera profile to be used, must be valid
81 * @param correspondences Number of point correspondences
82 * @param testDuration Number of seconds for each test, with range (0, infinity)
83 * @param type Estimator type to be used
84 * @param standardDeviation Optional standard deviation of the Gaussian distribution for noised image points
85 * @param outliers Number of outlier correspondences
86 * @param useCovariances True, to use covariances
87 * @return True, if succeeded
88 */
89 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);
90
91 /**
92 * Tests the non linear optimization function for a 6DOF pose with flexible zoom factor.
93 * @param testDuration Number of seconds for each test, with range (0, infinity)
94 * @return True, if succeeded
95 */
96 static bool testNonLinearOptimizationPoseZoom(const double testDuration);
97
98 /**
99 * Tests the non linear optimizations function for a 6DOF pose with flexible zoom factor, with specified correspondences, estimator type and outliers.
100 * @param pinholeCamera The pinhole camera to be used
101 * @param correspondences Number of point correspondences
102 * @param testDuration Number of seconds for each test, with range (0, infinity)
103 * @param type Estimator type to be used
104 * @param standardDeviation Optional standard deviation of the Gaussian distribution for noised image points
105 * @param outliers Number of outlier correspondences
106 * @param useCovariances True, to use covariances
107 * @return True, if succeeded
108 */
109 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);
110};
111
112}
113
114}
115
116}
117
118#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:131
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:35
static bool test(const double testDuration, Worker *worker, const TestSelector &selector)
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 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