Extracts endmember spectra from specified pixel locations.
Arguments
- cube
An hsi_cube object.
- pixels
Data.frame or matrix with columns
x(col) andy(row).- labels
Character vector of class labels for each pixel. Default
NULL(auto-generated).
Examples
cube <- hs_example_cube()
pixels <- data.frame(x = c(5, 25), y = c(5, 25))
em <- hs_endmembers(cube, pixels, labels = c("region_1", "region_2"))
dim(em)
#> [1] 2 61