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
17namespace Ocean
18{
19
20namespace Test
21{
22
23namespace TestGeometry
24{
25
26/**
27 * This class tests the non linear optimization implementations for camera profiles.
28 * @ingroup testgeometry
29 */
30class OCEAN_TEST_GEOMETRY_EXPORT TestNonLinearOptimizationCamera
31{
32 public:
33
34 /**
35 * Tests the non linear optimization function.
36 * @param testDuration Number of seconds for each test, with range (0, infinity)
37 * @param worker Optional worker object
38 * @return True, if the entire function test has succeeded
39 */
40 static bool test(const double testDuration, Worker* worker);
41
42 private:
43
44 /**
45 * Tests the non linear optimization function for camera parameters.
46 * @param testDuration Number of seconds for each test, with range (0, infinity)
47 * @return True, if succeeded
48 */
49 static bool testNonLinearOptimizationCamera(const double testDuration);
50
51 /**
52 * Tests the non linear optimization function for one camera profile and several poses.
53 * @param testDuration Number of seconds for each test, with range (0, infinity)
54 * @return True, if succeeded
55 */
56 static bool testNonLinearOptimizationCameraPoses(const double testDuration);
57
58 /**
59 * Tests the non linear optimization function for camera parameters with a defined number of correspondences.
60 * @param correspondences Number of point correspondences
61 * @param testDuration Number of seconds for each test, with range (0, infinity)
62 * @param type Estimator type to be used
63 * @param standardDeviation Optional standard deviation of the Gaussian distribution for noised image points
64 * @param outliers Number of outlier correspondences
65 * @return True, if succeeded
66 */
67 static bool testNonLinearOptimizationCamera(const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation, const unsigned int outliers);
68
69 /**
70 * Tests the non linear optimization function with one camera profile and a specified number of poses.
71 * @param poses Number of poses to be used
72 * @param correspondences Number of point correspondences
73 * @param testDuration Number of seconds for each test, with range (0, infinity)
74 * @param type Estimator type to be used
75 * @param standardDeviation Optional standard deviation of the Gaussian normal distribution for noised image points
76 * @return True, if succeeded
77 */
78 static bool testNonLinearOptimizationCameraPoses(const unsigned int poses, const unsigned int correspondences, const double testDuration, const Geometry::Estimator::EstimatorType type, const Scalar standardDeviation = 0);
79};
80
81}
82
83}
84
85}
86
87#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:31
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 test(const double testDuration, Worker *worker)
Tests the non linear optimization function.
static bool testNonLinearOptimizationCamera(const double testDuration)
Tests the non linear optimization function for camera parameters.
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