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

Tukey Cost Function. More...

#include <robust_kernel_impl.h>

Inheritance diagram for g2o::RobustKernelTukey:
Inheritance graph
[legend]
Collaboration diagram for g2o::RobustKernelTukey:
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

Tukey Cost Function.

See http://research.microsoft.com/en-us/um/people/zhang/Papers/ZhangIVC-97-01.pdf

If e2^(1/2) <= d rho(e) = d^2 * (1 - ( 1 - e2 / d^2)^3) / 3

else

rho(e) = d^2 / 3

Definition at line 168 of file robust_kernel_impl.h.

Member Function Documentation

◆ robustify()

void g2o::RobustKernelTukey::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 127 of file robust_kernel_impl.cpp.

127 {
128 const double delta2 = _delta * _delta;
129 if (e2 <= delta2) {
130 const double aux = e2 / delta2;
131 rho[0] = delta2 * (1. - std::pow((1. - aux), 3)) / 3.;
132 rho[1] = std::pow((1. - aux), 2);
133 rho[2] = -2. * (1. - aux) / delta2;
134 } else {
135 rho[0] = delta2 / 3.;
136 rho[1] = 0;
137 rho[2] = 0;
138 }
139}

References g2o::RobustKernel::_delta.


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