data(spectral_data)
## Transform speclib
bd <- transformSpeclib(subset(spectral_data, season == "summer"),
method = "sh", out = "bd")
## Define features automatically
features <- define.features(bd)
## Isolate the features around 450nm, 700nm, 1200nm and 1500nm and
## convert to specfeat.
featureSelection <- specfeat(features, c(450,700,1200,1500))
## Plot features
plot(featureSelection,1:4)
## Calculate normalized band depth index for first feature
featureSelection_bdri <- bdri(featureSelection, 1, index = "ndbi")
## Plot result
plot(featureSelection_bdri)
Run the code above in your browser using DataLab