FeatureInitializerOptions.h
Go to the documentation of this file.
1 /*
2  * OpenVINS: An Open Platform for Visual-Inertial Research
3  * Copyright (C) 2018-2023 Patrick Geneva
4  * Copyright (C) 2018-2023 Guoquan Huang
5  * Copyright (C) 2018-2023 OpenVINS Contributors
6  * Copyright (C) 2018-2019 Kevin Eckenhoff
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef OV_CORE_INITIALIZEROPTIONS_H
23 #define OV_CORE_INITIALIZEROPTIONS_H
24 
26 #include "utils/print.h"
27 
28 namespace ov_core {
29 
34 
36  bool triangulate_1d = false;
37 
39  bool refine_features = true;
40 
42  int max_runs = 5;
43 
45  double init_lamda = 1e-3;
46 
48  double max_lamda = 1e10;
49 
51  double min_dx = 1e-6;
52 
54  double min_dcost = 1e-6;
55 
57  double lam_mult = 10;
58 
60  double min_dist = 0.10;
61 
63  double max_dist = 60;
64 
66  double max_baseline = 40;
67 
69  double max_cond_number = 10000;
70 
72  void print(const std::shared_ptr<ov_core::YamlParser> &parser = nullptr) {
73  if (parser != nullptr) {
74  parser->parse_config("fi_triangulate_1d", triangulate_1d, false);
75  parser->parse_config("fi_refine_features", refine_features, false);
76  parser->parse_config("fi_max_runs", max_runs, false);
77  parser->parse_config("fi_init_lamda", init_lamda, false);
78  parser->parse_config("fi_max_lamda", max_lamda, false);
79  parser->parse_config("fi_min_dx", min_dx, false);
80  parser->parse_config("fi_min_dcost", min_dcost, false);
81  parser->parse_config("fi_lam_mult", lam_mult, false);
82  parser->parse_config("fi_min_dist", min_dist, false);
83  parser->parse_config("fi_max_dist", max_dist, false);
84  parser->parse_config("fi_max_baseline", max_baseline, false);
85  parser->parse_config("fi_max_cond_number", max_cond_number, false);
86  }
87  PRINT_DEBUG("\t- triangulate_1d: %d\n", triangulate_1d);
88  PRINT_DEBUG("\t- refine_features: %d\n", refine_features);
89  PRINT_DEBUG("\t- max_runs: %d\n", max_runs);
90  PRINT_DEBUG("\t- init_lamda: %.3f\n", init_lamda);
91  PRINT_DEBUG("\t- max_lamda: %.3f\n", max_lamda);
92  PRINT_DEBUG("\t- min_dx: %.7f\n", min_dx);
93  PRINT_DEBUG("\t- min_dcost: %.7f\n", min_dcost);
94  PRINT_DEBUG("\t- lam_mult: %.3f\n", lam_mult);
95  PRINT_DEBUG("\t- min_dist: %.3f\n", min_dist);
96  PRINT_DEBUG("\t- max_dist: %.3f\n", max_dist);
97  PRINT_DEBUG("\t- max_baseline: %.3f\n", max_baseline);
98  PRINT_DEBUG("\t- max_cond_number: %.3f\n", max_cond_number);
99  }
100 };
101 
102 } // namespace ov_core
103 
104 #endif // OV_CORE_INITIALIZEROPTIONS_H
ov_core::FeatureInitializerOptions::triangulate_1d
bool triangulate_1d
If we should perform 1d triangulation instead of 3d.
Definition: FeatureInitializerOptions.h:36
ov_core::FeatureInitializerOptions::min_dist
double min_dist
Minimum distance to accept triangulated features.
Definition: FeatureInitializerOptions.h:60
PRINT_DEBUG
#define PRINT_DEBUG(x...)
Definition: print.h:97
ov_core::FeatureInitializerOptions::max_baseline
double max_baseline
Max baseline ratio to accept triangulated features.
Definition: FeatureInitializerOptions.h:66
ov_core::FeatureInitializerOptions
Struct which stores all our feature initializer options.
Definition: FeatureInitializerOptions.h:33
ov_core::FeatureInitializerOptions::max_cond_number
double max_cond_number
Max condition number of linear triangulation matrix accept triangulated features.
Definition: FeatureInitializerOptions.h:69
ov_core::FeatureInitializerOptions::refine_features
bool refine_features
If we should perform Levenberg-Marquardt refinment.
Definition: FeatureInitializerOptions.h:39
print.h
ov_core::FeatureInitializerOptions::lam_mult
double lam_mult
Multiplier to increase/decrease lambda.
Definition: FeatureInitializerOptions.h:57
ov_core::FeatureInitializerOptions::min_dx
double min_dx
Cutoff for dx increment to consider as converged.
Definition: FeatureInitializerOptions.h:51
ov_core::FeatureInitializerOptions::init_lamda
double init_lamda
Init lambda for Levenberg-Marquardt optimization.
Definition: FeatureInitializerOptions.h:45
opencv_yaml_parse.h
ov_core::FeatureInitializerOptions::max_runs
int max_runs
Max runs for Levenberg-Marquardt.
Definition: FeatureInitializerOptions.h:42
ov_core::FeatureInitializerOptions::max_dist
double max_dist
Minimum distance to accept triangulated features.
Definition: FeatureInitializerOptions.h:63
ov_core::FeatureInitializerOptions::min_dcost
double min_dcost
Cutoff for cost decrement to consider as converged.
Definition: FeatureInitializerOptions.h:54
ov_core::FeatureInitializerOptions::max_lamda
double max_lamda
Max lambda for Levenberg-Marquardt optimization.
Definition: FeatureInitializerOptions.h:48
ov_core::FeatureInitializerOptions::print
void print(const std::shared_ptr< ov_core::YamlParser > &parser=nullptr)
Nice print function of what parameters we have loaded.
Definition: FeatureInitializerOptions.h:72
ov_core
Core algorithms for OpenVINS.
Definition: CamBase.h:30


ov_core
Author(s): Patrick Geneva , Kevin Eckenhoff , Guoquan Huang
autogenerated on Mon Jan 22 2024 03:08:17