NDEVR
API Documentation
robust_kernel_impl.h
1#pragma once
2#include "Base/Headers/BaseValues.hpp"
3#include "robust_kernel.h"
4
5namespace NDEVR {
6
14 class RobustKernelScaleDelta : public RobustKernel
15 {
16 public:
21 explicit RobustKernelScaleDelta(const RobustKernelPtr& kernel, g_type delta = 1.);
22 explicit RobustKernelScaleDelta(g_type delta = 1.);
23
25 const RobustKernelPtr kernel() const { return _kernel; }
27 void setKernel(const RobustKernelPtr& ptr);
28
29 void robustify(g_type error, Eigen::Vector3<g_type>& rho) const final override;
30
31 protected:
32 RobustKernelPtr _kernel;
33 };
34
49 class RobustKernelHuber : public RobustKernel
50 {
51 public:
57 virtual void setDelta(g_type delta) override;
61 virtual void setDeltaSqr(const g_type &delta, const g_type &deltaSqr);
65 virtual void robustify(g_type e2, Eigen::Vector3<g_type>& rho) const final override;
66
67 private:
68 g_type dsqr;
69 };
70
82 class RobustKernelTukey : public RobustKernel
83 {
84 public:
86 RobustKernelTukey() : _deltaSqr(g_type(1.0)), _invDeltaSqr(g_type(1.0)) {}
90 virtual void setDeltaSqr(g_type deltaSqr, g_type inv);
94 virtual void robustify(g_type e2, Eigen::Vector3<g_type>& rho) const;
95 private:
96 g_type _deltaSqr;
97 g_type _invDeltaSqr;
98 };
99
100
112 class RobustKernelPseudoHuber : public RobustKernel
113 {
114 public:
115 virtual void robustify(g_type e2, Eigen::Vector3<g_type>& rho) const;
116 };
117
126 class RobustKernelCauchy : public RobustKernel
127 {
128 public:
129 virtual void robustify(g_type e2, Eigen::Vector3<g_type>& rho) const;
130 };
131
137 class RobustKernelSaturated : public RobustKernel
138 {
139 public:
140 virtual void robustify(g_type e2, Eigen::Vector3<g_type>& rho) const;
141 };
142
150 class RobustKernelDCS : public RobustKernel
151 {
152 public:
153 virtual void robustify(g_type e2, Eigen::Vector3<g_type>& rho) const;
154 };
155
156} // end namespace NDEVR
Cauchy cost function.
virtual void robustify(g_type e2, Eigen::Vector3< g_type > &rho) const
compute the scaling factor for a error: The error is e^T Omega e The output rho is rho[0]: The actual...
Dynamic covariance scaling - DCS.
virtual void robustify(g_type e2, Eigen::Vector3< g_type > &rho) const
compute the scaling factor for a error: The error is e^T Omega e The output rho is rho[0]: The actual...
RobustKernelHuber(g_type delta)
Constructs a Huber kernel with the given delta.
virtual void setDeltaSqr(const g_type &delta, const g_type &deltaSqr)
Sets both delta and its square directly.
virtual void setDelta(g_type delta) override
Sets the delta parameter.
virtual void robustify(g_type e2, Eigen::Vector3< g_type > &rho) const final override
Computes the Huber robustification.
Pseudo Huber Cost Function.
virtual void robustify(g_type e2, Eigen::Vector3< g_type > &rho) const
compute the scaling factor for a error: The error is e^T Omega e The output rho is rho[0]: The actual...
Saturated cost function.
virtual void robustify(g_type e2, Eigen::Vector3< g_type > &rho) const
compute the scaling factor for a error: The error is e^T Omega e The output rho is rho[0]: The actual...
void setKernel(const RobustKernelPtr &ptr)
use another kernel for the underlying operation
void robustify(g_type error, Eigen::Vector3< g_type > &rho) const final override
compute the scaling factor for a error: The error is e^T Omega e The output rho is rho[0]: The actual...
RobustKernelScaleDelta(const RobustKernelPtr &kernel, g_type delta=1.)
construct the scaled kernel ontop of another kernel which might be shared accross several scaled kern...
const RobustKernelPtr kernel() const
return the underlying kernel
RobustKernelTukey()
Default constructor with unit delta.
virtual void robustify(g_type e2, Eigen::Vector3< g_type > &rho) const
Computes the Tukey robustification.
virtual void setDeltaSqr(g_type deltaSqr, g_type inv)
Sets the squared delta and its inverse.
g_type delta() const
Returns the current delta (window size) value.
The primary namespace for the NDEVR SDK.
std::shared_ptr< RobustKernel > RobustKernelPtr
Shared pointer type for RobustKernel.