Open3D (C++ API)  0.11.0
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 pipelines {
31 namespace registration {
32 
37 public:
50  GlobalOptimizationOption(double max_correspondence_distance = 0.075,
51  double edge_prune_threshold = 0.25,
52  double preference_loop_closure = 1.0,
53  int reference_node = -1)
54  : max_correspondence_distance_(max_correspondence_distance),
55  edge_prune_threshold_(edge_prune_threshold),
56  preference_loop_closure_(preference_loop_closure),
57  reference_node_(reference_node) {
58  max_correspondence_distance_ = max_correspondence_distance < 0.0
59  ? 0.075
60  : max_correspondence_distance;
62  edge_prune_threshold < 0.0 || edge_prune_threshold > 1.0
63  ? 0.25
64  : edge_prune_threshold;
66  preference_loop_closure < 0.0 ? 1.0 : preference_loop_closure;
67  };
69 
70 public:
86 };
87 
92 public:
104  int max_iteration = 100,
105  double min_relative_increment = 1e-6,
106  double min_relative_residual_increment = 1e-6,
107  double min_right_term = 1e-6,
108  double min_residual = 1e-6,
109  int max_iteration_lm = 20,
110  double upper_scale_factor = 2. / 3.,
111  double lower_scale_factor = 1. / 3.)
112  : max_iteration_(max_iteration),
113  min_relative_increment_(min_relative_increment),
114  min_relative_residual_increment_(min_relative_residual_increment),
115  min_right_term_(min_right_term),
116  min_residual_(min_residual),
117  max_iteration_lm_(max_iteration_lm),
118  upper_scale_factor_(upper_scale_factor),
119  lower_scale_factor_(lower_scale_factor) {
120  upper_scale_factor_ =
121  upper_scale_factor < 0.0 || upper_scale_factor > 1.0
122  ? 2. / 3.
123  : upper_scale_factor;
124  lower_scale_factor_ =
125  lower_scale_factor < 0.0 || lower_scale_factor > 1.0
126  ? 1. / 3.
127  : lower_scale_factor;
128  };
130 
131 public:
158 };
159 
160 } // namespace registration
161 } // namespace pipelines
162 } // namespace open3d
~GlobalOptimizationOption()
Definition: GlobalOptimizationConvergenceCriteria.h:68
double edge_prune_threshold_
Definition: GlobalOptimizationConvergenceCriteria.h:78
double min_relative_increment_
Minimum relative increments.
Definition: GlobalOptimizationConvergenceCriteria.h:138
int max_iteration_
Maximum iteration number for iterative optimization module.
Definition: GlobalOptimizationConvergenceCriteria.h:133
int max_iteration_lm_
Maximum iteration number for Levenberg Marquardt method.
Definition: GlobalOptimizationConvergenceCriteria.h:149
int reference_node_
The pose of this node is unchanged after optimization.
Definition: GlobalOptimizationConvergenceCriteria.h:85
double preference_loop_closure_
Definition: GlobalOptimizationConvergenceCriteria.h:83
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:103
double upper_scale_factor_
Upper scale factor value.
Definition: GlobalOptimizationConvergenceCriteria.h:155
Option for GlobalOptimization.
Definition: GlobalOptimizationConvergenceCriteria.h:36
double max_correspondence_distance_
Definition: GlobalOptimizationConvergenceCriteria.h:75
double lower_scale_factor_
Lower scale factor value.
Definition: GlobalOptimizationConvergenceCriteria.h:157
double min_right_term_
Minimum right term value.
Definition: GlobalOptimizationConvergenceCriteria.h:142
double min_residual_
Minimum residual value.
Definition: GlobalOptimizationConvergenceCriteria.h:144
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:50
Definition: PinholeCameraIntrinsic.cpp:35
Convergence criteria of GlobalOptimization.
Definition: GlobalOptimizationConvergenceCriteria.h:91
double min_relative_residual_increment_
Minimum relative residual increments.
Definition: GlobalOptimizationConvergenceCriteria.h:140
~GlobalOptimizationConvergenceCriteria()
Definition: GlobalOptimizationConvergenceCriteria.h:129