The continuum removal technique was introduced by Clark and Roush (1984)
to highlight absorption features by removing the effect of the overall
spectral shape (albedo). It is widely used in remote sensing and
spectroscopy to isolate and compare absorption band depths across samples
or sensors.
The algorithm identifies points lying on the convex hull (upper envelope)
of a spectrum, connects them by linear or spline interpolation to form a
continuum line, and normalises the spectrum against that line either by
division or subtraction. Division (default, equivalent to the ENVI
implementation) yields values in [0, 1] for reflectance spectra, where
1 indicates no absorption relative to the continuum. Subtraction yields
residuals relative to the continuum (\(1 + x_i - c_i\)).
When type = "A" (absorbance), spectra are first converted to
reflectance (\(1/X\)) before computing the convex-hull continuum, and
the result is back-transformed to absorbance afterwards. This means that
for absorbance data, continuumRemoval and baseline
are not equivalent: they compute the convex hull on different
scales (reflectance vs absorbance). For reflectance data (type =
"R"), the two functions are more directly comparable, differing only in
the final normalisation step: baseline subtracts the continuum
(\(x_i - c_i\)), whereas continuumRemoval divides by it
(\(x_i / c_i\)).
At wavelengths where both the spectral value and the continuum are zero,
the continuum-removed value is set to 1 (no absorption feature), since
division of zero by zero is undefined.