Open3D (C++ API)
GlobalOptimizationConvergenceCriteria.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #pragma once
28 
29 namespace open3d {
30 namespace registration {
31 
33 public:
34  GlobalOptimizationOption(double max_correspondence_distance = 0.075,
35  double edge_prune_threshold = 0.25,
36  double preference_loop_closure = 1.0,
37  int reference_node = -1)
38  : max_correspondence_distance_(max_correspondence_distance),
39  edge_prune_threshold_(edge_prune_threshold),
40  preference_loop_closure_(preference_loop_closure),
41  reference_node_(reference_node) {
42  max_correspondence_distance_ = max_correspondence_distance < 0.0
43  ? 0.075
44  : max_correspondence_distance;
46  edge_prune_threshold < 0.0 || edge_prune_threshold > 1.0
47  ? 0.25
48  : edge_prune_threshold;
50  preference_loop_closure < 0.0 ? 1.0 : preference_loop_closure;
51  };
53 
54 public:
70 };
71 
73 public:
75  int max_iteration = 100,
76  double min_relative_increment = 1e-6,
77  double min_relative_residual_increment = 1e-6,
78  double min_right_term = 1e-6,
79  double min_residual = 1e-6,
80  int max_iteration_lm = 20,
81  double upper_scale_factor = 2. / 3.,
82  double lower_scale_factor = 1. / 3.)
83  : max_iteration_(max_iteration),
84  min_relative_increment_(min_relative_increment),
85  min_relative_residual_increment_(min_relative_residual_increment),
86  min_right_term_(min_right_term),
87  min_residual_(min_residual),
88  max_iteration_lm_(max_iteration_lm),
89  upper_scale_factor_(upper_scale_factor),
90  lower_scale_factor_(lower_scale_factor) {
91  upper_scale_factor_ =
92  upper_scale_factor < 0.0 || upper_scale_factor > 1.0
93  ? 2. / 3.
94  : upper_scale_factor;
95  lower_scale_factor_ =
96  lower_scale_factor < 0.0 || lower_scale_factor > 1.0
97  ? 1. / 3.
98  : lower_scale_factor;
99  };
101 
102 public:
119 };
120 
121 } // namespace registration
122 } // namespace open3d
int max_iteration_lm_
Definition: GlobalOptimizationConvergenceCriteria.h:113
GlobalOptimizationOption(double max_correspondence_distance=0.075, double edge_prune_threshold=0.25, double preference_loop_closure=1.0, int reference_node=-1)
Definition: GlobalOptimizationConvergenceCriteria.h:34
Definition: GlobalOptimizationConvergenceCriteria.h:72
double preference_loop_closure_
Definition: GlobalOptimizationConvergenceCriteria.h:67
double min_right_term_
Definition: GlobalOptimizationConvergenceCriteria.h:109
double min_relative_increment_
Definition: GlobalOptimizationConvergenceCriteria.h:107
double lower_scale_factor_
Definition: GlobalOptimizationConvergenceCriteria.h:118
double edge_prune_threshold_
Definition: GlobalOptimizationConvergenceCriteria.h:62
double upper_scale_factor_
Definition: GlobalOptimizationConvergenceCriteria.h:117
int reference_node_
The pose of this node is unchanged after optimization.
Definition: GlobalOptimizationConvergenceCriteria.h:69
Definition: GlobalOptimizationConvergenceCriteria.h:32
GlobalOptimizationConvergenceCriteria(int max_iteration=100, double min_relative_increment=1e-6, double min_relative_residual_increment=1e-6, double min_right_term=1e-6, double min_residual=1e-6, int max_iteration_lm=20, double upper_scale_factor=2./3., double lower_scale_factor=1./3.)
Definition: GlobalOptimizationConvergenceCriteria.h:74
Definition: PinholeCameraIntrinsic.cpp:34
int max_iteration_
maximum iteration number for iterative optmization module.
Definition: GlobalOptimizationConvergenceCriteria.h:104
double min_relative_residual_increment_
Definition: GlobalOptimizationConvergenceCriteria.h:108
~GlobalOptimizationConvergenceCriteria()
Definition: GlobalOptimizationConvergenceCriteria.h:100
~GlobalOptimizationOption()
Definition: GlobalOptimizationConvergenceCriteria.h:52
double min_residual_
Definition: GlobalOptimizationConvergenceCriteria.h:110
double max_correspondence_distance_
Definition: GlobalOptimizationConvergenceCriteria.h:59