ynsat logo

Earth Movers Distance (EMD)

1 min read

Earth Movers Distance answers the question: “How much effort is required to reshape one spectrum into another?”

By treating each spectrum as a distribution of “mass” (reflectance) spread across wavelength “bins,” EMD captures both value and position differences. This makes it well-suited for detecting shifted absorption features—for instance, when a mineral’s diagnostic dip slides a few nanometres due to chemistry, grain size, or moisture.

How it works #

  1. Normalise spectra to probability mass p i = R i k = 1 n R k , q i = S i k = 1 n S k Each vector now sums to 1, acting like a discrete probability distribution over n bands.
  2. Cumulative mass functions (CMFs) P i = k = 1 i p k , Q i = k = 1 i q k
  3. One-dimensional EMD (for ordered bands) EMD raw = i = 1 n | P i Q i | Intuitively, | P i Q i | is the net “mass” still needing to cross the boundary after band i; summing these across all boundaries gives the minimum total work.
  4. Scene-adaptive normalisation (0 – 1) Let EMD 99 % be the 99ᵗʰ-percentile raw distance within the analysis area: EMD norm = 1 clamp ( EMD raw EMD 99 % , 0 , 1 ) Outcome: 1 → best match, 0 → largest practical mismatch.

Key properties #

PropertyBenefit
Shift-awareDetects horizontal displacements of absorption peaks/troughs—not just depth changes.
Global yet sensitiveConsiders every band but penalises mis-alignments proportionally to how far mass must move.
Brightness-invariantProbabilistic scaling removes overall albedo influence, focusing on spectral shape & position.

When to use EMD #

  • Hydroxyl group variations: Identify minerals where the OH-feature centre shifts with Al-Fe substitution.
  • Moisture content studies: Track wavelength drift of water absorption in soils or vegetation.
  • Quality control in calibration: Spot sensors or preprocessing steps that introduce spectral mis-registration.
Updated on June 19, 2025