g2o
Public Member Functions | List of all members
g2o::RobustKernelCauchy Class Reference

Cauchy cost function. More...

#include <robust_kernel_impl.h>

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

Public Member Functions

virtual void robustify (double e2, Vector3D &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

Cauchy cost function.

2 e d log(– + 1) 2 d

Definition at line 108 of file robust_kernel_impl.h.

Member Function Documentation

void g2o::RobustKernelCauchy::robustify ( double  squaredError,
Vector3D 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 91 of file robust_kernel_impl.cpp.

References g2o::RobustKernel::_delta.

92 {
93  double dsqr = _delta * _delta;
94  double dsqrReci = 1. / dsqr;
95  double aux = dsqrReci * e2 + 1.0;
96  rho[0] = dsqr * log(aux);
97  rho[1] = 1. / aux;
98  rho[2] = -dsqrReci * std::pow(rho[1], 2);
99 }

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