Open3D (C++ API)
src
Open3D
Registration
TransformationEstimation.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
#include <Eigen/Core>
30
#include <memory>
31
#include <string>
32
#include <vector>
33
34
namespace
open3d
{
35
36
namespace
geometry {
37
class
PointCloud;
38
}
39
40
namespace
registration {
41
42
typedef
std::vector<Eigen::Vector2i>
CorrespondenceSet
;
43
44
enum class
TransformationEstimationType
{
45
Unspecified
= 0,
46
PointToPoint
= 1,
47
PointToPlane
= 2,
48
ColoredICP
= 3,
49
};
50
54
class
TransformationEstimation
{
55
public
:
56
TransformationEstimation
() {}
57
virtual
~TransformationEstimation
() {}
58
59
public
:
60
virtual
TransformationEstimationType
GetTransformationEstimationType
()
61
const
= 0;
62
virtual
double
ComputeRMSE
(
const
geometry::PointCloud
&source,
63
const
geometry::PointCloud
&target,
64
const
CorrespondenceSet
&corres)
const
= 0;
65
virtual
Eigen::Matrix4d
ComputeTransformation
(
66
const
geometry::PointCloud
&source,
67
const
geometry::PointCloud
&target,
68
const
CorrespondenceSet
&corres)
const
= 0;
69
};
70
72
class
TransformationEstimationPointToPoint
:
public
TransformationEstimation
{
73
public
:
74
TransformationEstimationPointToPoint
(
bool
with_scaling =
false
)
75
:
with_scaling_
(with_scaling) {}
76
~TransformationEstimationPointToPoint
()
override
{}
77
78
public
:
79
TransformationEstimationType
GetTransformationEstimationType
()
80
const override
{
81
return
type_;
82
};
83
double
ComputeRMSE
(
const
geometry::PointCloud
&source,
84
const
geometry::PointCloud
&target,
85
const
CorrespondenceSet
&corres)
const override
;
86
Eigen::Matrix4d
ComputeTransformation
(
87
const
geometry::PointCloud
&source,
88
const
geometry::PointCloud
&target,
89
const
CorrespondenceSet
&corres)
const override
;
90
91
public
:
92
bool
with_scaling_
=
false
;
93
94
private
:
95
const
TransformationEstimationType
type_ =
96
TransformationEstimationType::PointToPoint
;
97
};
98
100
class
TransformationEstimationPointToPlane
:
public
TransformationEstimation
{
101
public
:
102
TransformationEstimationPointToPlane
() {}
103
~TransformationEstimationPointToPlane
()
override
{}
104
105
public
:
106
TransformationEstimationType
GetTransformationEstimationType
()
107
const override
{
108
return
type_;
109
};
110
double
ComputeRMSE
(
const
geometry::PointCloud
&source,
111
const
geometry::PointCloud
&target,
112
const
CorrespondenceSet
&corres)
const override
;
113
Eigen::Matrix4d
ComputeTransformation
(
114
const
geometry::PointCloud
&source,
115
const
geometry::PointCloud
&target,
116
const
CorrespondenceSet
&corres)
const override
;
117
118
private
:
119
const
TransformationEstimationType
type_ =
120
TransformationEstimationType::PointToPlane
;
121
};
122
123
}
// namespace registration
124
}
// namespace open3d
open3d::registration::TransformationEstimationPointToPoint::~TransformationEstimationPointToPoint
~TransformationEstimationPointToPoint() override
Definition:
TransformationEstimation.h:76
open3d::registration::TransformationEstimationPointToPoint::GetTransformationEstimationType
TransformationEstimationType GetTransformationEstimationType() const override
Definition:
TransformationEstimation.h:79
open3d::registration::TransformationEstimationPointToPlane
Estimate a transformation for point to plane distance.
Definition:
TransformationEstimation.h:100
open3d::registration::TransformationEstimationPointToPlane::ComputeTransformation
Eigen::Matrix4d ComputeTransformation(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const override
Definition:
TransformationEstimation.cpp:77
open3d::registration::TransformationEstimationType::PointToPoint
@ PointToPoint
open3d::registration::TransformationEstimationPointToPlane::TransformationEstimationPointToPlane
TransformationEstimationPointToPlane()
Definition:
TransformationEstimation.h:102
open3d::registration::TransformationEstimationPointToPoint::with_scaling_
bool with_scaling_
Definition:
TransformationEstimation.h:92
open3d::registration::TransformationEstimationType::Unspecified
@ Unspecified
open3d::registration::TransformationEstimationPointToPlane::ComputeRMSE
double ComputeRMSE(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const override
Definition:
TransformationEstimation.cpp:63
open3d::registration::TransformationEstimationPointToPoint::TransformationEstimationPointToPoint
TransformationEstimationPointToPoint(bool with_scaling=false)
Definition:
TransformationEstimation.h:74
open3d::registration::TransformationEstimation::GetTransformationEstimationType
virtual TransformationEstimationType GetTransformationEstimationType() const =0
open3d::registration::TransformationEstimationPointToPlane::GetTransformationEstimationType
TransformationEstimationType GetTransformationEstimationType() const override
Definition:
TransformationEstimation.h:106
open3d::registration::TransformationEstimationType::PointToPlane
@ PointToPlane
open3d::registration::TransformationEstimationPointToPlane::~TransformationEstimationPointToPlane
~TransformationEstimationPointToPlane() override
Definition:
TransformationEstimation.h:103
open3d::registration::TransformationEstimation
Definition:
TransformationEstimation.h:54
open3d::registration::TransformationEstimationPointToPoint::ComputeTransformation
Eigen::Matrix4d ComputeTransformation(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const override
Definition:
TransformationEstimation.cpp:49
open3d::registration::TransformationEstimationPointToPoint::ComputeRMSE
double ComputeRMSE(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const override
Definition:
TransformationEstimation.cpp:37
open3d::registration::TransformationEstimationType::ColoredICP
@ ColoredICP
open3d::registration::TransformationEstimation::ComputeTransformation
virtual Eigen::Matrix4d ComputeTransformation(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const =0
open3d::geometry::PointCloud
Definition:
PointCloud.h:50
open3d::registration::TransformationEstimation::ComputeRMSE
virtual double ComputeRMSE(const geometry::PointCloud &source, const geometry::PointCloud &target, const CorrespondenceSet &corres) const =0
open3d
Definition:
PinholeCameraIntrinsic.cpp:34
open3d::registration::TransformationEstimationType
TransformationEstimationType
Definition:
TransformationEstimation.h:44
open3d::registration::TransformationEstimation::~TransformationEstimation
virtual ~TransformationEstimation()
Definition:
TransformationEstimation.h:57
open3d::registration::TransformationEstimationPointToPoint
Estimate a transformation for point to point distance.
Definition:
TransformationEstimation.h:72
open3d::registration::CorrespondenceSet
std::vector< Eigen::Vector2i > CorrespondenceSet
Definition:
TransformationEstimation.h:42
open3d::registration::TransformationEstimation::TransformationEstimation
TransformationEstimation()
Definition:
TransformationEstimation.h:56
Generated by
1.8.18