Class NormalDeltaOrientation2D

Inheritance Relationships

Base Type

  • public ceres::SizedCostFunction< 1, 1, 1 >

Class Documentation

class NormalDeltaOrientation2D : public ceres::SizedCostFunction<1, 1, 1>

Implements a cost function that models a difference between two 2D orientation variables.

The cost function is of the form:

cost(x) = ||A( (x1 - x0) - b)||^2

where, the matrix A and the vector b are fixed and x0 and x1 are the 2D orientation variables. In case the user is interested in implementing a cost function of the form

cost(x) = ((x1 - x0) - mu)^T S^{-1} ((x1 - x0) - mu)

where, mu is a vector and S is a covariance matrix, then, A = S^{-1/2}, i.e the matrix A is the square root information matrix (the inverse of the covariance). This is a specialization of the generic “normal delta” cost function that handles the 2*pi roll-over that occurs with rotations.

Public Functions

NormalDeltaOrientation2D(const double A, const double b)

Constructor.

The number of rows in vector b must be the same as the number of columns of matrix A.

Parameters:
  • A[in] The residual weighting matrix, most likely the square root information matrix

  • b[in] The measured difference between variable x0 and variable x1. It is assumed that these are the same type of variable. At a minimum, they must have the same dimensions and the per-element subtraction operator must be valid.

virtual ~NormalDeltaOrientation2D() = default

Destructor.

virtual bool Evaluate(double const *const *parameters, double *residuals, double **jacobians) const

Compute the cost values/residuals, and optionally the Jacobians, using the provided variable/parameter values.