g2o
Public Member Functions | Protected Attributes | List of all members
g2o::RobustKernelScaleDelta Class Reference

scale a robust kernel to another delta (window size) More...

#include <robust_kernel_impl.h>

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

Public Member Functions

 RobustKernelScaleDelta (const RobustKernelPtr &kernel, double delta=1.)
 
 RobustKernelScaleDelta (double delta=1.)
 
const RobustKernelPtr kernel () const
 return the underlying kernel More...
 
void setKernel (const RobustKernelPtr &ptr)
 use another kernel for the underlying operation More...
 
void robustify (double error, Vector3D &rho) const
 
- Public Member Functions inherited from g2o::RobustKernel
 RobustKernel ()
 
 RobustKernel (double delta)
 
virtual ~RobustKernel ()
 
virtual void setDelta (double delta)
 
double delta () const
 

Protected Attributes

RobustKernelPtr _kernel
 
- Protected Attributes inherited from g2o::RobustKernel
double _delta
 

Detailed Description

scale a robust kernel to another delta (window size)

Scales a robust kernel to another window size. Useful, in case if one implements a kernel which only is designed for a fixed window size.

Definition at line 42 of file robust_kernel_impl.h.

Constructor & Destructor Documentation

g2o::RobustKernelScaleDelta::RobustKernelScaleDelta ( const RobustKernelPtr kernel,
double  delta = 1. 
)
explicit

construct the scaled kernel ontop of another kernel which might be shared accross several scaled kernels

Definition at line 34 of file robust_kernel_impl.cpp.

34  :
37 {
38 }
double delta() const
Definition: robust_kernel.h:69
const RobustKernelPtr kernel() const
return the underlying kernel
g2o::RobustKernelScaleDelta::RobustKernelScaleDelta ( double  delta = 1.)
explicit

Definition at line 40 of file robust_kernel_impl.cpp.

40  :
42 {
43 }
double delta() const
Definition: robust_kernel.h:69

Member Function Documentation

const RobustKernelPtr g2o::RobustKernelScaleDelta::kernel ( ) const
inline

return the underlying kernel

Definition at line 53 of file robust_kernel_impl.h.

53 { return _kernel;}
void g2o::RobustKernelScaleDelta::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 50 of file robust_kernel_impl.cpp.

References g2o::RobustKernel::_delta, and _kernel.

51 {
52  if (_kernel.get()) {
53  double dsqr = _delta * _delta;
54  double dsqrReci = 1. / dsqr;
55  _kernel->robustify(dsqrReci * error, rho);
56  rho[0] *= dsqr;
57  rho[2] *= dsqrReci;
58  } else { // no robustification
59  rho[0] = error;
60  rho[1] = 1.;
61  rho[2] = 0.;
62  }
63 }
void g2o::RobustKernelScaleDelta::setKernel ( const RobustKernelPtr ptr)

use another kernel for the underlying operation

Definition at line 45 of file robust_kernel_impl.cpp.

References _kernel.

46 {
47  _kernel = ptr;
48 }

Member Data Documentation

RobustKernelPtr g2o::RobustKernelScaleDelta::_kernel
protected

Definition at line 60 of file robust_kernel_impl.h.

Referenced by robustify(), and setKernel().


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