Open3D (C++ API)  0.20.0
Loading...
Searching...
No Matches
TransformationEstimation.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------------
2// - Open3D: www.open3d.org -
3// ----------------------------------------------------------------------------
4// Copyright (c) 2018-2026 www.open3d.org
5// SPDX-License-Identifier: MIT
6// ----------------------------------------------------------------------------
7
8#pragma once
9
10#include <Eigen/Core>
11#include <memory>
12#include <string>
13#include <utility>
14#include <vector>
15
17
18namespace open3d {
19
20namespace geometry {
21class PointCloud;
22}
23
24namespace pipelines {
25namespace registration {
26
27typedef std::vector<Eigen::Vector2i> CorrespondenceSet;
28
30 Unspecified = 0,
31 PointToPoint = 1,
32 PointToPlane = 2,
33 ColoredICP = 3,
35 SymmetricICP = 5,
36};
37
44public:
48
49public:
51 const = 0;
60 const CorrespondenceSet &corres) const = 0;
67 virtual Eigen::Matrix4d ComputeTransformation(
70 const CorrespondenceSet &corres) const = 0;
71
78 virtual std::tuple<std::shared_ptr<const geometry::PointCloud>,
79 std::shared_ptr<const geometry::PointCloud>>
83 double max_correspondence_distance) const = 0;
84};
85
90public:
95 TransformationEstimationPointToPoint(bool with_scaling = false)
96 : with_scaling_(with_scaling) {}
98
99public:
101 const override {
102 return type_;
103 };
106 const CorrespondenceSet &corres) const override;
107 Eigen::Matrix4d ComputeTransformation(
110 const CorrespondenceSet &corres) const override;
111
112 std::tuple<std::shared_ptr<const geometry::PointCloud>,
113 std::shared_ptr<const geometry::PointCloud>>
117 double max_correspondence_distance) const override;
118
119public:
126 bool with_scaling_ = false;
127
128private:
129 const TransformationEstimationType type_ =
131};
132
137public:
141
146 std::shared_ptr<RobustKernel> kernel)
147 : kernel_(std::move(kernel)) {}
148
149public:
151 const override {
152 return type_;
153 };
156 const CorrespondenceSet &corres) const override;
157 Eigen::Matrix4d ComputeTransformation(
160 const CorrespondenceSet &corres) const override;
161
162 std::tuple<std::shared_ptr<const geometry::PointCloud>,
163 std::shared_ptr<const geometry::PointCloud>>
167 double max_correspondence_distance) const override;
168
169public:
171 std::shared_ptr<RobustKernel> kernel_ = std::make_shared<L2Loss>();
172
173private:
174 const TransformationEstimationType type_ =
176};
177
178} // namespace registration
179} // namespace pipelines
180} // namespace open3d
Real target
Definition SurfaceReconstructionPoisson.cpp:270
Eigen::Vector3d source
Definition SymmetricICP.cpp:62
A point cloud consists of point coordinates, and optionally point colors and point normals.
Definition PointCloud.h:36
Definition TransformationEstimation.h:43
virtual std::tuple< std::shared_ptr< const geometry::PointCloud >, std::shared_ptr< const geometry::PointCloud > > InitializePointCloudsForTransformation(const geometry::PointCloud &source, const geometry::PointCloud &target, double max_correspondence_distance) const =0
virtual double ComputeRMSE(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const =0
virtual Eigen::Matrix4d ComputeTransformation(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const =0
virtual TransformationEstimationType GetTransformationEstimationType() const =0
virtual ~TransformationEstimation()
Definition TransformationEstimation.h:47
TransformationEstimation()
Default Constructor.
Definition TransformationEstimation.h:46
double ComputeRMSE(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const override
Definition TransformationEstimation.cpp:65
TransformationEstimationPointToPlane()
Default Constructor.
Definition TransformationEstimation.h:139
Eigen::Matrix4d ComputeTransformation(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const override
Definition TransformationEstimation.cpp:79
~TransformationEstimationPointToPlane() override
Definition TransformationEstimation.h:140
std::shared_ptr< RobustKernel > kernel_
shared_ptr to an Abstract RobustKernel that could mutate at runtime.
Definition TransformationEstimation.h:171
TransformationEstimationType GetTransformationEstimationType() const override
Definition TransformationEstimation.h:150
TransformationEstimationPointToPlane(std::shared_ptr< RobustKernel > kernel)
Constructor that takes as input a RobustKernel.
Definition TransformationEstimation.h:145
std::tuple< std::shared_ptr< const geometry::PointCloud >, std::shared_ptr< const geometry::PointCloud > > InitializePointCloudsForTransformation(const geometry::PointCloud &source, const geometry::PointCloud &target, double max_correspondence_distance) const override
Definition TransformationEstimation.cpp:114
TransformationEstimationPointToPoint(bool with_scaling=false)
Parameterized Constructor.
Definition TransformationEstimation.h:95
double ComputeRMSE(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const override
Definition TransformationEstimation.cpp:20
Eigen::Matrix4d ComputeTransformation(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const override
Definition TransformationEstimation.cpp:32
TransformationEstimationType GetTransformationEstimationType() const override
Definition TransformationEstimation.h:100
bool with_scaling_
Set to True to estimate scaling, False to force scaling to be 1.
Definition TransformationEstimation.h:126
std::tuple< std::shared_ptr< const geometry::PointCloud >, std::shared_ptr< const geometry::PointCloud > > InitializePointCloudsForTransformation(const geometry::PointCloud &source, const geometry::PointCloud &target, double max_correspondence_distance) const override
Definition TransformationEstimation.cpp:48
~TransformationEstimationPointToPoint() override
Definition TransformationEstimation.h:97
std::vector< Eigen::Vector2i > CorrespondenceSet
Definition Feature.h:26
TransformationEstimationType
Definition TransformationEstimation.h:29
Definition PinholeCameraIntrinsic.cpp:16
Definition Device.h:113