transformSpeclib | R Documentation |
Transform spectra by using convex hull or segmented upper hull
transformSpeclib(data, ..., method = "ch", out = "bd")
data |
Speclib to be transformed |
method |
Method to be used. See details section. |
out |
Kind of value to be returned. See details section. |
... |
Further arguments passed to generic functions. Currently ignored. |
Function performs a continuum removal transformation by firstly establishing a continuum line/hull which connects the local maxima of the reflectance spectrum. Two kinds of this hull are well established in scientific community: the convex hull (e.g. Mutanga et al. 2004) and the segmented hull (e.g. Clark et al. 1987). Both hulls are established by connecting the local maxima, however, the precondition of the convex hull is that the resulting continuum line must be convex whereas considering the segmented hull it might be concave or convex but the algebraic sign of the slope is not allowed to change from the global maximum of the spectrum downwards to the sides. In contrast to a convex hull, the segmented hull is able to identify small absorption features.
Specify method = "ch"
for the convex hull and method = "sh"
for the segmented hull.
The output might be "raw"
, "bd"
, "difference"
or "ratio"
:
"raw": the continuum line is returned
"bd": the spectra are transformed to band depth by
BD_λ = 1-\frac{R_λ}{CV_λ},
where BD is the band depth, R is the reflectance and CV is the continuum value at the wavelength λ.
"difference": the spectra are transformed by
diff_λ = CV_λ - R_λ
"ratio": the spectra are transformed by
ratio_λ = \frac{R_λ}{CV_λ}.
In some cases it might be useful to apply noiseFiltering
before the transformation if too many small local maxima
are present in the spectra. Anyway, a manual improvement of the continuum line is possible
using addcp
and deletecp
.
If out != "raw"
an object of class Speclib
containing transformed spectra is returned. Otherwise the return object will be of class Clman
.
For large Speclibs, it may be feasible to run the function on multiple cores. See hsdar_parallel()
for further information.
Hanna Meyer and Lukas Lehnert
Clark, R. N., King, T. V. V. and Gorelick, N. S. (1987): Automatic continuum analysis of reflectance spectra. Proceedings of the Third Airborne Imaging Spectrometer Data Analysis Workshop, 30. 138-142.
Mutanga, O. and Skidmore, A. K. (2004): Hyperspectral band depth analysis for a better estimation of grass biomass (Cenchrus ciliaris) measured under controlled laboratory conditions International Journal of applied Earth Observation and Geoinformation, 5, 87-96.
Clman
, addcp
, deletecp
, checkhull
## Example spectrum for wavelength values ## between 400 and 1000 nm example_spectrum <- PROSPECT()[,c(1:600)] ## Default (convex hull and band depth) ch_bd <- transformSpeclib(example_spectrum) ## Construct convex hull but calculate ratios ch_ratio <- transformSpeclib(example_spectrum, out = "ratio") ## Return continuum line of convex hull ch_raw <- transformSpeclib(example_spectrum, out = "raw") ## Plot results par(mfrow=c(2,2)) plot(example_spectrum) plot(ch_raw, ispec = 1, main = "Continuum line", ylim = c(0,0.5)) plot(ch_bd, main = "Band depth") plot(ch_ratio, main = "Ratio") ## Same example but with segmented hull ## Segmented hull and band depth sh_bd <- transformSpeclib(example_spectrum, method = "sh", out = "bd") ## Segmented hull and ratios sh_ratio <- transformSpeclib(example_spectrum, method = "sh", out = "ratio") ## Return continuum line of segmented hull sh_raw <- transformSpeclib(example_spectrum, method = "sh", out = "raw") ## Plot results par(mfrow=c(2,2)) plot(example_spectrum) plot(sh_raw, ispec = 1, main = "Continuum line", ylim = c(0,0.5)) plot(sh_bd, main = "Band depth") plot(sh_ratio, main = "Ratio")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.