Open3D (C++ API)  0.18.0+252c867
RobustKernel.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 // @author Ignacio Vizzo [ivizzo@uni-bonn.de]
8 //
9 // Copyright (c) 2020 Ignacio Vizzo, Cyrill Stachniss, University of Bonn.
10 // ----------------------------------------------------------------------------
11 
12 #pragma once
13 
14 namespace open3d {
15 namespace pipelines {
16 namespace registration {
17 
43 class RobustKernel {
44 public:
45  virtual ~RobustKernel() = default;
51  virtual double Weight(double residual) const = 0;
52 };
53 
60 class L2Loss : public RobustKernel {
61 public:
66  double Weight(double residual) const override;
67 };
68 
74 // p(r) = abs(r)
75 class L1Loss : public RobustKernel {
76 public:
81  double Weight(double residual) const override;
82 };
83 
93 class HuberLoss : public RobustKernel {
94 public:
100  explicit HuberLoss(double k) : k_(k) {}
101 
108  double Weight(double residual) const override;
109 
110 public:
112  double k_;
113 };
114 
121 class CauchyLoss : public RobustKernel {
122 public:
126  explicit CauchyLoss(double k) : k_(k) {}
127 
133  double Weight(double residual) const override;
134 
135 public:
137  double k_;
138 };
139 
146 class GMLoss : public RobustKernel {
147 public:
151  explicit GMLoss(double k) : k_(k) {}
152 
158  double Weight(double residual) const override;
159 
160 public:
162  double k_;
163 };
164 
175 class TukeyLoss : public RobustKernel {
176 public:
180  explicit TukeyLoss(double k) : k_(k) {}
181 
182 public:
189  double Weight(double residual) const override;
190 
191 public:
192  double k_;
193 };
194 
195 } // namespace registration
196 } // namespace pipelines
197 } // namespace open3d
Definition: RobustKernel.h:121
CauchyLoss(double k)
Parametrized Constructor.
Definition: RobustKernel.h:126
double k_
Scaling parameter.
Definition: RobustKernel.h:137
double Weight(double residual) const override
Definition: RobustKernel.cpp:36
Definition: RobustKernel.h:146
double Weight(double residual) const override
Definition: RobustKernel.cpp:40
GMLoss(double k)
Parametrized Constructor.
Definition: RobustKernel.h:151
double k_
Scaling parameter.
Definition: RobustKernel.h:162
Definition: RobustKernel.h:93
double k_
Scaling parameter.
Definition: RobustKernel.h:112
HuberLoss(double k)
Parametrized Constructor.
Definition: RobustKernel.h:100
double Weight(double residual) const override
Definition: RobustKernel.cpp:31
Definition: RobustKernel.h:75
double Weight(double residual) const override
Definition: RobustKernel.cpp:27
Definition: RobustKernel.h:60
double Weight(double residual) const override
Definition: RobustKernel.cpp:25
virtual double Weight(double residual) const =0
Definition: RobustKernel.h:175
double Weight(double residual) const override
Definition: RobustKernel.cpp:44
TukeyLoss(double k)
Parametrized Constructor.
Definition: RobustKernel.h:180
double k_
Definition: RobustKernel.h:192
Definition: PinholeCameraIntrinsic.cpp:16