Internal: Evaluating Linear Spectral Unmixing Results: Reconstructing Image Spectra
Anonym
It's often difficult to evaluate the error associated with linear spectral unmixing results. One particularly useful method is to visually compare the observed spectra from the input image to the spectra that are reconstructed from your unmixing model using the endmembers you chose. In fact, the RMS error image that's included in ENVI's unmixing results is computed by comparing these two sets of data (the observed vs. reconstructed). Unfortunately, ENVI doesn't provide the intermediate image used in the calculation. The user function described here, RECON_UNMIX_SPECTRA, computes this image of reconstructed image spectra.
Some details on the algorithm
The mathematics of the linear spectral unmixing model is remarkably simple. The model that is used to unmix an image looks like this:
A # x = b
where
A = a rectangular matrix of endmembers (num_bands x num_endmembers)
x = a vector of unknown endmember abundances (num_endmembers x 1)
b = a vector containing the observed spectrum from the input image (num_bands x 1)
and # denotes matrix multiplication
To calculate the unknown abundances you just do a little algebra and solve for the vector x. Thus, to reconstruct the spectra using the unmixing results, you matrix multiply A by x (i.e., multiply the endmember matrix by the vector of abundances that resulted from the unmixing).
In order to properly use this function you'll need to have the original input image, the unmixing result, and the endmembers you used when you ran your unmixing. Currently, this routine only works for unconstrained linear unmixing results. If you applied a unit sum weighting constraint when you unmixed your image then this user function will not work for your data.
DISCLAIMER
This additional functionality is provided free of charge as a service for our ENVI users. However, this procedure is not supported by Exelis Visual Information Solutions Technical Support. The procedure RECON_UNMIX_SPECTRA has been been tested and we believe that it works correctly, but it is in no way guaranteed.
To add this user function to your version of ENVI
Click here to download the source code for this user function, recon_unmix_spectra.pro, as a Windows ASCII text file. For more details on how to add this function to ENVI please see "How to Add a User Function to ENVI".