Expand description
Non-negative least-squares lite for multi-channel spectral unmixing.
Model: observed spectrum y (C channels) ≈ A · x where A is C×N
reference endmember matrix (column-major: channel-major per component),
and x ≥ 0 are component abundances.
Solver: projected multiplicative update / projected gradient (bounded iters). Also supports per-pixel unmix into caller buffers and ROI-mean unmix.
Structs§
- Unmix
Result - Result of a single spectrum unmix.
Constants§
- MAX_
CHANNELS - Max channels / components for stack-bounded unmix.
- MAX_
COMPONENTS
Functions§
- spectral_
unmix_ nnls - Unmix one observed spectrum
y(lengthn_channels) against endmember matrixendmemberslaid out as column-major: componentkoccupiesendmembers[k * n_channels .. (k+1) * n_channels]. - spectral_
unmix_ per_ pixel - Per-pixel unmix: writes abundances into
out_abundanceslaid out aspixel-major×n_components. Returns number of pixels written. - spectral_
unmix_ roi_ mean - Mean the ROI spectra then unmix once (cheap path for bulk regions).