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 
36 public:
49  GlobalOptimizationOption(double max_correspondence_distance = 0.075,
50  double edge_prune_threshold = 0.25,
51  double preference_loop_closure = 1.0,
52  int reference_node = -1)
53  : max_correspondence_distance_(max_correspondence_distance),
54  edge_prune_threshold_(edge_prune_threshold),
55  preference_loop_closure_(preference_loop_closure),
56  reference_node_(reference_node) {
57  max_correspondence_distance_ = max_correspondence_distance < 0.0
58  ? 0.075
59  : max_correspondence_distance;
61  edge_prune_threshold < 0.0 || edge_prune_threshold > 1.0
62  ? 0.25
63  : edge_prune_threshold;
65  preference_loop_closure < 0.0 ? 1.0 : preference_loop_closure;
66  };
68 
69 public:
85 };
86 
91 public:
103  int max_iteration = 100,
104  double min_relative_increment = 1e-6,
105  double min_relative_residual_increment = 1e-6,
106  double min_right_term = 1e-6,
107  double min_residual = 1e-6,
108  int max_iteration_lm = 20,
109  double upper_scale_factor = 2. / 3.,
110  double lower_scale_factor = 1. / 3.)
111  : max_iteration_(max_iteration),
112  min_relative_increment_(min_relative_increment),
113  min_relative_residual_increment_(min_relative_residual_increment),
114  min_right_term_(min_right_term),
115  min_residual_(min_residual),
116  max_iteration_lm_(max_iteration_lm),
117  upper_scale_factor_(upper_scale_factor),
118  lower_scale_factor_(lower_scale_factor) {
119  upper_scale_factor_ =
120  upper_scale_factor < 0.0 || upper_scale_factor > 1.0
121  ? 2. / 3.
122  : upper_scale_factor;
123  lower_scale_factor_ =
124  lower_scale_factor < 0.0 || lower_scale_factor > 1.0
125  ? 1. / 3.
126  : lower_scale_factor;
127  };
129 
130 public:
157 };
158 
159 } // namespace registration
160 } // namespace open3d
int max_iteration_lm_
Maximum iteration number for Levenberg Marquardt method.
Definition: GlobalOptimizationConvergenceCriteria.h:148
GlobalOptimizationOption(double max_correspondence_distance=0.075, double edge_prune_threshold=0.25, double preference_loop_closure=1.0, int reference_node=-1)
Parameterized Constructor.
Definition: GlobalOptimizationConvergenceCriteria.h:49
Convergence criteria of GlobalOptimization.
Definition: GlobalOptimizationConvergenceCriteria.h:90
double preference_loop_closure_
Definition: GlobalOptimizationConvergenceCriteria.h:82
double min_right_term_
Minimum right term value.
Definition: GlobalOptimizationConvergenceCriteria.h:141
double min_relative_increment_
Minimum relative increments.
Definition: GlobalOptimizationConvergenceCriteria.h:137
double lower_scale_factor_
Lower scale factor value.
Definition: GlobalOptimizationConvergenceCriteria.h:156
double edge_prune_threshold_
Definition: GlobalOptimizationConvergenceCriteria.h:77
double upper_scale_factor_
Upper scale factor value.
Definition: GlobalOptimizationConvergenceCriteria.h:154
int reference_node_
The pose of this node is unchanged after optimization.
Definition: GlobalOptimizationConvergenceCriteria.h:84
Option for GlobalOptimization.
Definition: GlobalOptimizationConvergenceCriteria.h:35
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.)
Parameterized Constructor.
Definition: GlobalOptimizationConvergenceCriteria.h:102
Definition: Open3DViewer.h:29
int max_iteration_
Maximum iteration number for iterative optimization module.
Definition: GlobalOptimizationConvergenceCriteria.h:132
double min_relative_residual_increment_
Minimum relative residual increments.
Definition: GlobalOptimizationConvergenceCriteria.h:139
~GlobalOptimizationConvergenceCriteria()
Definition: GlobalOptimizationConvergenceCriteria.h:128
~GlobalOptimizationOption()
Definition: GlobalOptimizationConvergenceCriteria.h:67
double min_residual_
Minimum residual value.
Definition: GlobalOptimizationConvergenceCriteria.h:143
double max_correspondence_distance_
Definition: GlobalOptimizationConvergenceCriteria.h:74