54 double dsqrReci = 1. / dsqr;
55 _kernel->robustify(dsqrReci * error, rho);
86 double sqrte = sqrt(e);
87 rho[0] = 2*sqrte*
_delta - dsqr;
89 rho[2] = - 0.5 * rho[1] / e;
102 if (e <= _deltaSqr) {
103 double factor = e*_invDeltaSqr;
106 rho[0] = _deltaSqr*(1-dd*d);
108 rho[2] = -6*_invDeltaSqr*d;
119 double dsqrReci = 1. / dsqr;
120 double aux1 = dsqrReci * e2 + 1.0;
121 double aux2 = sqrt(aux1);
122 rho[0] = 2 * dsqr * (aux2 - 1);
124 rho[2] = -0.5 * dsqrReci * rho[1] / aux1;
130 double dsqrReci = 1. / dsqr;
131 double aux = dsqrReci * e2 + 1.0;
132 rho[0] = dsqr * log(aux);
134 rho[2] = -dsqrReci * std::pow(rho[1], 2);
154 const double& phi =
_delta;
155 double scale = (2.0*phi)/(phi+e2);
159 rho[0] = scale*e2*scale;
160 rho[1] = (scale*scale);
virtual void setDeltaSqr(const double &deltaSqr, const double &inv)
Dynamic covariance scaling - DCS.
RobustKernelScaleDelta(const RobustKernelPtr &kernel, double delta=1.)
#define G2O_REGISTER_ROBUST_KERNEL(name, classname)
Pseudo Huber Cost Function.
virtual void robustify(double e2, Eigen::Vector3d &rho) const
void robustify(double error, Eigen::Vector3d &rho) const
virtual void setDelta(double delta)
base for all robust cost functions
virtual void robustify(double e2, Eigen::Vector3d &rho) const
virtual void robustify(double e2, Eigen::Vector3d &rho) const
void setKernel(const RobustKernelPtr &ptr)
use another kernel for the underlying operation
std::tr1::shared_ptr< RobustKernel > RobustKernelPtr
virtual void robustify(double e2, Eigen::Vector3d &rho) const
virtual void setDeltaSqr(const double &delta, const double &deltaSqr)
virtual void robustify(double e2, Eigen::Vector3d &rho) const
virtual void robustify(double e2, Eigen::Vector3d &rho) const