namespace mola::internal

Overview

namespace internal {

// classes

class IncrementalKDTree;
class ViewDirectionTest;

// global functions

Eigen::Matrix3d shapePointCovariance(const Eigen::Matrix3d& cov, double lambda);

} // namespace internal

Global Functions

Eigen::Matrix3d shapePointCovariance(const Eigen::Matrix3d& cov, double lambda)

Shapes the per-point scatter matrix that becomes a pairing’s information.

With a positive lambda the eigenvalues are replaced by (1, 1, lambda). Every neighborhood then asserts the same confidence along its estimated normal, whether or not the samples support it, and every pairing carries the same total information regardless of how many points were behind it or how spread they were.

A non-positive lambda keeps the eigenvalues the fit produced, so a sparse or rough neighborhood ends up with a broader covariance, and therefore less weight, than a dense flat one.

|lambda| means the same thing in both regimes: the smallest eigenvalue as a fraction of the largest. What the sign changes is whether that number is assigned or only bounded. Positive assigns it, so every neighborhood comes out with exactly that ratio. Non-positive bounds it from below, so a neighborhood flatter than the bound is clamped to it and everything else keeps what it had: -0.01 allows up to 100:1, -0.1 up to 10:1, and 0 leaves the ratio alone but for a numerical guard. The bound is what keeps the matrix invertible on a perfectly planar or collinear neighborhood, and it also stops a handful of near-degenerate ones from dominating the solve.

Note that the two branches differ in scale as well as in shape: kept eigenvalues carry squared metric units, so the resulting information matrices are not comparable with the regularized ones and anything tuned against their magnitude, such as a matching threshold or a robust kernel, has to be revisited.