struct mp2p_icp::PointWeightByIncidence
Overview
How much a correspondence counts, as a function of how obliquely its beam struck the surface.
Disabled by default (alpha = 0, every point weighs the same), which is the behavior of every release before this existed.
where \(c = |\cos\theta|\) and \(\theta\) is the angle between the beam and the surface normal: \(c = 1\) is a head-on hit and \(c = 0\) a perfectly grazing one.
A positive alpha with the default maxWeight = 1 is a knee that trusts head-on returns fully and discounts grazing ones. The motivation is that a range measurement is biased, not merely noisier, at a shallow incidence: the footprint is stretched along the surface, and the returned range mixes contributions across it. On a ground-hugging sensor the far ground is measured almost entirely this way, so a bias that varies slowly with geometry enters as a slow apparent change in surface height rather than as noise, which no amount of averaging removes.
As with range weighting, minWeight is the safety parameter, not maxWeight. A large alpha with minWeight = 0 discards the grazing returns outright, and on a sensor mounted low those returns ARE the ground: removing them leaves the vertical unconstrained, which is the opposite of the intent. Keep minWeight well above zero unless a sweep says otherwise.
The consumer multiplies a correspondence’s information matrix by this weight, so it acts as an inverse variance. Only the SHAPE of the curve matters when the solver rescales the whole data block.
#include <PointWeightByIncidence.h> struct PointWeightByIncidence { // fields double alpha = 0.0; double refCos = 0.5; double minWeight = 0.05; double maxWeight = 1.0; // methods bool enabled() const; double operator () (double cosIncidence) const; };
Fields
double alpha = 0.0
Decay exponent. 0 disables this entirely (the default).
double refCos = 0.5
|cos| of the incidence angle below which the weight starts to fall. The default, 0.5, is 60 degrees away from the surface normal.
double minWeight = 0.05
Floor, so a grazing point is never dropped outright.
double maxWeight = 1.0
Ceiling. Keep at 1 for a plain knee.
Methods
double operator () (double cosIncidence) const
Weight of a correspondence whose beam met the surface at |cos| = c.