Loading [MathJax]/extensions/TeX/AMSsymbols.js
Open3D (C++ API)  0.14.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GeneralizedICP.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-2021 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 // @author Ignacio Vizzo [ivizzo@uni-bonn.de]
27 //
28 // Copyright (c) 2021 Ignacio Vizzo, Cyrill Stachniss, University of Bonn.
29 // ----------------------------------------------------------------------------
30 
31 #pragma once
32 
33 #include <Eigen/Core>
34 #include <memory>
35 
39 
40 namespace open3d {
41 namespace pipelines {
42 namespace registration {
43 
44 class RegistrationResult;
45 
47  : public TransformationEstimation {
48 public:
49  ~TransformationEstimationForGeneralizedICP() override = default;
50 
52  const override {
53  return type_;
54  };
58  double epsilon = 1e-3,
59  std::shared_ptr<RobustKernel> kernel = std::make_shared<L2Loss>())
60  : epsilon_(epsilon), kernel_(std::move(kernel)) {}
61 
62 public:
63  double ComputeRMSE(const geometry::PointCloud &source,
64  const geometry::PointCloud &target,
65  const CorrespondenceSet &corres) const override;
66 
67  Eigen::Matrix4d ComputeTransformation(
68  const geometry::PointCloud &source,
69  const geometry::PointCloud &target,
70  const CorrespondenceSet &corres) const override;
71 
72 public:
73  // Small constant representing covariance along the normal.
74  double epsilon_ = 1e-3;
75 
77  std::shared_ptr<RobustKernel> kernel_ = std::make_shared<L2Loss>();
78 
79 private:
80  const TransformationEstimationType type_ =
82 };
83 
87 // A. Segal, D .Haehnel, S. Thrun
97  const geometry::PointCloud &source,
98  const geometry::PointCloud &target,
99  double max_correspondence_distance,
100  const Eigen::Matrix4d &init = Eigen::Matrix4d::Identity(),
103  const ICPConvergenceCriteria &criteria = ICPConvergenceCriteria());
104 
105 } // namespace registration
106 } // namespace pipelines
107 } // namespace open3d
Class that defines the convergence criteria of ICP.
Definition: Registration.h:55
Eigen::Matrix4d ComputeTransformation(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const override
Definition: GeneralizedICP.cpp:117
double ComputeRMSE(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const override
Definition: GeneralizedICP.cpp:95
Definition: Device.h:138
A point cloud consists of point coordinates, and optionally point colors and point normals...
Definition: PointCloud.h:55
std::vector< Eigen::Vector2i > CorrespondenceSet
Definition: TransformationEstimation.h:46
TransformationEstimationType GetTransformationEstimationType() const override
Definition: GeneralizedICP.h:51
RegistrationResult RegistrationGeneralizedICP(const geometry::PointCloud &source, const geometry::PointCloud &target, double max_correspondence_distance, const Eigen::Matrix4d &init, const TransformationEstimationForGeneralizedICP &estimation, const ICPConvergenceCriteria &criteria)
Function for Generalized ICP registration.
Definition: GeneralizedICP.cpp:169
Definition: PinholeCameraIntrinsic.cpp:35
std::shared_ptr< RobustKernel > kernel_
shared_ptr to an Abstract RobustKernel that could mutate at runtime.
Definition: GeneralizedICP.h:77
Definition: TransformationEstimation.h:61
TransformationEstimationType
Definition: TransformationEstimation.h:48
TransformationEstimationForGeneralizedICP(double epsilon=1e-3, std::shared_ptr< RobustKernel > kernel=std::make_shared< L2Loss >())
Constructor that takes as input a RobustKernel kernel Any of the implemented statistical robust kern...
Definition: GeneralizedICP.h:57