Open3D (C++ API)  0.15.1
RobustKernel.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) 2020 Ignacio Vizzo, Cyrill Stachniss, University of Bonn.
29// ----------------------------------------------------------------------------
30
31#pragma once
32
33namespace open3d {
34namespace pipelines {
35namespace registration {
36
63public:
64 virtual ~RobustKernel() = default;
70 virtual double Weight(double residual) const = 0;
71};
72
79class L2Loss : public RobustKernel {
80public:
85 double Weight(double residual) const override;
86};
87
93// p(r) = abs(r)
94class L1Loss : public RobustKernel {
95public:
100 double Weight(double residual) const override;
101};
102
112class HuberLoss : public RobustKernel {
113public:
119 explicit HuberLoss(double k) : k_(k) {}
120
127 double Weight(double residual) const override;
128
129public:
131 double k_;
132};
133
140class CauchyLoss : public RobustKernel {
141public:
145 explicit CauchyLoss(double k) : k_(k) {}
146
152 double Weight(double residual) const override;
153
154public:
156 double k_;
157};
158
165class GMLoss : public RobustKernel {
166public:
170 explicit GMLoss(double k) : k_(k) {}
171
177 double Weight(double residual) const override;
178
179public:
181 double k_;
182};
183
194class TukeyLoss : public RobustKernel {
195public:
199 explicit TukeyLoss(double k) : k_(k) {}
200
201public:
208 double Weight(double residual) const override;
209
210public:
211 double k_;
212};
213
214} // namespace registration
215} // namespace pipelines
216} // namespace open3d
Definition: RobustKernel.h:140
CauchyLoss(double k)
Parametrized Constructor.
Definition: RobustKernel.h:145
double k_
Scaling paramter.
Definition: RobustKernel.h:156
double Weight(double residual) const override
Definition: RobustKernel.cpp:55
Definition: RobustKernel.h:165
double Weight(double residual) const override
Definition: RobustKernel.cpp:59
GMLoss(double k)
Parametrized Constructor.
Definition: RobustKernel.h:170
double k_
Scaling paramter.
Definition: RobustKernel.h:181
Definition: RobustKernel.h:112
double k_
Scaling paramter.
Definition: RobustKernel.h:131
HuberLoss(double k)
Parametrized Constructor.
Definition: RobustKernel.h:119
double Weight(double residual) const override
Definition: RobustKernel.cpp:50
Definition: RobustKernel.h:94
double Weight(double residual) const override
Definition: RobustKernel.cpp:46
Definition: RobustKernel.h:79
double Weight(double residual) const override
Definition: RobustKernel.cpp:44
virtual double Weight(double residual) const =0
Definition: RobustKernel.h:194
double Weight(double residual) const override
Definition: RobustKernel.cpp:63
TukeyLoss(double k)
Parametrized Constructor.
Definition: RobustKernel.h:199
double k_
Definition: RobustKernel.h:211
Definition: PinholeCameraIntrinsic.cpp:35