Multiple Endmember Spectral Mixture Analysis (Spectral Unmixing)
mesma
performs a multiple endmember spectral mixture analysis on a multiband raster image.
mesma(img, em, method = "NNLS", iterate = 400, tolerance = 1e-08, ..., verbose)
img |
RasterBrick or RasterStack. Remote sensing imagery (usually hyperspectral). |
em |
Matrix or data.frame with spectral endmembers. Rows represent a single endmember of a class, columns represent the spectral bands (i.e. columns correspond to number of bands in |
method |
Character. Select an unmixing method. Currently, only "NNLS" is implemented. Default is "NNLS".
|
iterate |
Integer. Set maximum iteration per pixel. Processing time could increase the more iterations are made possible. Default is 400. |
tolerance |
Numeric. Tolerance limit representing a nearly zero minimal number. Default is 1e-8. |
... |
further arguments passed to writeRaster. |
verbose |
Logical. Prints progress messages during execution. |
RasterBrick. The object will contain one band per endmember, with each value representing the estimated presence probability of the endmember per pixel (0 to 1), and an RMSE band.
Depending on iterate
and tolerance
settings, the sum of estimated presence probabilites per pixel varies around 1.
Jakob Schwalb-Willmann
Franc, V., Hlaváč, V., & Navara, M. (2005). Sequential coordinate-wise algorithm for the non-negative least squares problem. In: International Conference on Computer Analysis of Images and Patterns (pp. 407-414). Berlin, Heidelberg.
#load packages library(raster) library(RStoolbox) #load an example dataset data(lsat) #make up some endmember spectra: water and land em_names <- c("water", "land") pts <- data.frame(class=em_names, cell = c(47916,5294)) em <- lsat[pts$cell] rownames(em) <- em_names #unmix the image for water and land probs <- mesma(lsat, em, method = "NNLS") #take a look raster::hist(probs$water) raster::plot(probs$water, col = c("white","blue")) raster::hist(probs$land) raster::plot(probs$land, col = c("white","brown"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.