Open3D (C++ API)  0.15.1
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
40namespace open3d {
41namespace pipelines {
42namespace registration {
43
44class RegistrationResult;
45
48public:
50
52 const override {
53 return type_;
54 };
59 double epsilon = 1e-3,
60 std::shared_ptr<RobustKernel> kernel = std::make_shared<L2Loss>())
61 : epsilon_(epsilon), kernel_(std::move(kernel)) {}
62
63public:
64 double ComputeRMSE(const geometry::PointCloud &source,
65 const geometry::PointCloud &target,
66 const CorrespondenceSet &corres) const override;
67
68 Eigen::Matrix4d ComputeTransformation(
69 const geometry::PointCloud &source,
70 const geometry::PointCloud &target,
71 const CorrespondenceSet &corres) const override;
72
73public:
75 double epsilon_ = 1e-3;
76
78 std::shared_ptr<RobustKernel> kernel_ = std::make_shared<L2Loss>();
79
80private:
83};
84
88// A. Segal, D .Haehnel, S. Thrun
98 const geometry::PointCloud &source,
99 const geometry::PointCloud &target,
100 double max_correspondence_distance,
101 const Eigen::Matrix4d &init = Eigen::Matrix4d::Identity(),
105
106} // namespace registration
107} // namespace pipelines
108} // namespace open3d
A point cloud consists of point coordinates, and optionally point colors and point normals.
Definition: PointCloud.h:55
Class that defines the convergence criteria of ICP.
Definition: Registration.h:55
TransformationEstimationType GetTransformationEstimationType() const override
Definition: GeneralizedICP.h:51
double epsilon_
Small constant representing covariance along the normal.
Definition: GeneralizedICP.h:75
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
std::shared_ptr< RobustKernel > kernel_
shared_ptr to an Abstract RobustKernel that could mutate at runtime.
Definition: GeneralizedICP.h:78
TransformationEstimationForGeneralizedICP(double epsilon=1e-3, std::shared_ptr< RobustKernel > kernel=std::make_shared< L2Loss >())
Constructor that takes as input a RobustKernel.
Definition: GeneralizedICP.h:58
Definition: TransformationEstimation.h:61
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
TransformationEstimationType
Definition: TransformationEstimation.h:48
std::vector< Eigen::Vector2i > CorrespondenceSet
Definition: TransformationEstimation.h:46
Definition: PinholeCameraIntrinsic.cpp:35
Definition: Device.h:138