g2o
Loading...
Searching...
No Matches
Public Member Functions | List of all members
g2o::RobustKernelPseudoHuber Class Reference

Pseudo Huber Cost Function. More...

#include <robust_kernel_impl.h>

Inheritance diagram for g2o::RobustKernelPseudoHuber:
Inheritance graph
[legend]
Collaboration diagram for g2o::RobustKernelPseudoHuber:
Collaboration graph
[legend]

Public Member Functions

virtual void robustify (double e2, Vector3 &rho) const
 
- Public Member Functions inherited from g2o::RobustKernel
 RobustKernel ()
 
 RobustKernel (double delta)
 
virtual ~RobustKernel ()
 
virtual void setDelta (double delta)
 
double delta () const
 

Additional Inherited Members

- Protected Attributes inherited from g2o::RobustKernel
double _delta
 

Detailed Description

Pseudo Huber Cost Function.

The smooth pseudo huber cost function: See http://en.wikipedia.org/wiki/Huber_loss_function

2 e 2 d (sqrt(– + 1) - 1) 2 d

Definition at line 93 of file robust_kernel_impl.h.

Member Function Documentation

◆ robustify()

void g2o::RobustKernelPseudoHuber::robustify ( double  squaredError,
Vector3 rho 
) const
virtual

compute the scaling factor for a error: The error is e^T Omega e The output rho is rho[0]: The actual scaled error value rho[1]: First derivative of the scaling function rho[2]: Second derivative of the scaling function

Implements g2o::RobustKernel.

Definition at line 76 of file robust_kernel_impl.cpp.

76 {
77 double dsqr = _delta * _delta;
78 double dsqrReci = 1. / dsqr;
79 double aux1 = dsqrReci * e2 + 1.0;
80 double aux2 = sqrt(aux1);
81 rho[0] = 2 * dsqr * (aux2 - 1);
82 rho[1] = 1. / aux2;
83 rho[2] = -0.5 * dsqrReci * rho[1] / aux1;
84}
Jet< T, N > sqrt(const Jet< T, N > &f)
Definition jet.h:444

References g2o::RobustKernel::_delta.


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