Ocean
Loading...
Searching...
No Matches
TestNonLinearOptimizationCamera.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_CAMERA_H
9#define META_OCEAN_TEST_TESTGEOMETRY_TEST_NON_LINEAR_OPTIMIZATION_CAMERA_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 implementations for camera profiles.
30 * @ingroup testgeometry
31 */
32class OCEAN_TEST_GEOMETRY_EXPORT TestNonLinearOptimizationCamera
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 * @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 camera parameters.
49 * @param testDuration Number of seconds for each test, with range (0, infinity)
50 * @return True, if succeeded
51 */
52 static bool testNonLinearOptimizationCamera(const double testDuration);
53
54 /**
55 * Tests the non linear optimization function for one camera profile and several poses.
56 * @param testDuration Number of seconds for each test, with range (0, infinity)
57 * @return True, if succeeded
58 */
59 static bool testNonLinearOptimizationCameraPoses(const double testDuration);
60
61 /**
62 * Tests the non linear optimization function for camera parameters with a defined number of correspondences.
63 * @param correspondences Number of point correspondences
64 * @param testDuration Number of seconds for each test, with range (0, infinity)
65 * @param type Estimator type to be used
66 * @param standardDeviation Optional standard deviation of the Gaussian distribution for noised image points
67 * @param outliers Number of outlier correspondences
68 * @return True, if succeeded
69 */
70 static bool testNonLinearOptimizationCamera(const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers);
71
72 /**
73 * Tests the non linear optimization function with one camera profile and a specified number of poses.
74 * @param poses Number of poses to be used
75 * @param correspondences Number of point correspondences
76 * @param testDuration Number of seconds for each test, with range (0, infinity)
77 * @param type Estimator type to be used
78 * @param standardDeviation Optional standard deviation of the Gaussian normal distribution for noised image points
79 * @return True, if succeeded
80 */
81 static bool testNonLinearOptimizationCameraPoses(const unsigned int poses, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation = 0);
82};
83
84}
85
86}
87
88}
89
90#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 camera profiles.
Definition TestNonLinearOptimizationCamera.h:33
static bool testNonLinearOptimizationCameraPoses(const double testDuration)
Tests the non linear optimization function for one camera profile and several poses.
static bool testNonLinearOptimizationCameraPoses(const unsigned int poses, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation=0)
Tests the non linear optimization function with one camera profile and a specified number of poses.
static bool testNonLinearOptimizationCamera(const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers)
Tests the non linear optimization function for camera parameters with a defined number of corresponde...
static bool testNonLinearOptimizationCamera(const double testDuration)
Tests the non linear optimization function for camera parameters.
static bool test(const double testDuration, Worker *worker, const TestSelector &selector)
Tests the non linear optimization 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