ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::pipelines::registration::HuberLoss Class Reference

#include <RobustKernel.h>

Inheritance diagram for cloudViewer::pipelines::registration::HuberLoss:
Collaboration diagram for cloudViewer::pipelines::registration::HuberLoss:

Public Member Functions

 HuberLoss (double k)
 Parametrized Constructor. More...
 
double Weight (double residual) const override
 
- Public Member Functions inherited from cloudViewer::pipelines::registration::RobustKernel
virtual ~RobustKernel ()=default
 

Public Attributes

double k_
 Scaling paramter. More...
 

Detailed Description

HuberLoss loss function used for outlier rejection.

The loss p(r) for a given residual 'r' is computed as follow: p(r) = r^2 for abs(r) <= k, p(r) = k^2 * (abs(r) - k/2) for abs(r) > k

For more information: http://en.wikipedia.org/wiki/Huber_Loss_Function

Definition at line 93 of file RobustKernel.h.

Constructor & Destructor Documentation

◆ HuberLoss()

cloudViewer::pipelines::registration::HuberLoss::HuberLoss ( double  k)
inlineexplicit

Parametrized Constructor.

Parameters
kIs the scaling paramter of the huber loss function. 'k' corresponds to 'delta' on this page: http://en.wikipedia.org/wiki/Huber_Loss_Function

Definition at line 100 of file RobustKernel.h.

Member Function Documentation

◆ Weight()

double cloudViewer::pipelines::registration::HuberLoss::Weight ( double  residual) const
overridevirtual

The weight w(r) for a given residual 'r' is computed as follow: w(r) = 1.0 for abs(r) <= k, w(r) = k / abs(r) for abs(r) > k Where k Is the scaling paramter of the loss function.

Parameters
residualResidual value obtained during the optimization step.

Implements cloudViewer::pipelines::registration::RobustKernel.

Definition at line 31 of file RobustKernel.cpp.

References abs(), k_, and max().

Member Data Documentation

◆ k_

double cloudViewer::pipelines::registration::HuberLoss::k_

Scaling paramter.

Definition at line 112 of file RobustKernel.h.

Referenced by cloudViewer::pipelines::registration::pybind_robust_kernels(), and Weight().


The documentation for this class was generated from the following files: