ENDMEMB

Select Endmembers


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Algorithm :: References :: Related

Back to top

Description


ENDMEMB estimates a set of endmember spectra for a specified image region using the iterative error analysis (IEA) algorithm and outputs these spectra to a file.
Back to top

Parameters


endmemb(file, dbic, wlenint, valonly, dbiw, dbib, nendmem, errsetsz, bvangthr, specfilo, filotype, rtlevel)

Name Type Caption Length Value range
FILE* str Input file name 1 -    
DBIC List[int] Input raster channel 0 -    
WLENINT List[float] Wavelength interval 0 - 2  
VALONLY str Valid bands only 0 - 3 YES | NO
Default: NO
DBIW List[int] Input raster window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
DBIB List[int] Input bitmap channel 0 - 1  
NENDMEM List[int] Number of endmembers 0 - 1 1 -
ERRSETSZ List[int] Largest-error band vector set size 0 - 1 1 -
Default: 10
BVANGTHR List[float] Between-vector angle threshold 0 - 1 0 - 180
Default: 5
SPECFILO* str Output spectral library file name 1 -    
FILOTYPE str Output file type 0 - 4 SPCB | XLS | TXT
Default: SPCB
RTLEVEL List[int] Radiometric transformation level 0 - 1 0 -

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the file containing the image data set from which the endmembers will be derived.

DBIC

Specifies the input image channels that contain a subset of the input data set bands from which to derive the endmembers. The input file may contain channels that do not store data set bands; the image metadata indicates which channels do. The default is all data set band channels.

WLENINT

Specifies that the selected bands are to be restricted to those whose center wavelength is either inside or outside a closed interval, specified in nanometers. The default is no restriction.

The wavelength interval may be specified as follows:

This parameter has no effect if the input file contains no band center wavelength metadata.

VALONLY

Specifies whether the selected bands are to be restricted to those with "plot" or "bmask" (begin mask) quality values. The default is NO.

This parameter has no effect if the input file contains no band-validity metadata.

DBIW

Specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) that is read from the input layers.

Either an input window (DBIW) or an input bitmap (DBIB) must be specified. If an input bitmap is specified, this parameter is ignored.

Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.

DBIB

Specifies the bitmap channel in the input file that indicates the region from which endmembers are to be derived.

Either an input window (DBIW) or an input bitmap (DBIB) must be specified. If an input window (DBIW) is specified, this parameter is ignored.

NENDMEM

Specifies the number of endmembers to be estimated and output. If this parameter is not specified, ENDMEMB will compute and use an estimate of the maximum number of non-redundant endmembers.

A specified value must be greater than 0.

ERRSETSZ

Specifies the number of largest-error band vectors to collect from the image region at each IEA iteration. The endmember generated during an iteration is the mean of those largest-error band vectors that are within a specified angle of the overall largest-error band vector. The error of a band vector at a given iteration is defined with respect to the linear combination of endmembers computed so far at that iteration that best approximates the band vector.

A specified value must be greater than 0; the default value is 10.

BVANGTHR

Specifies the between-vector angle threshold to use in endmember generation at each iteration.

A specified value must be between 0 and 180 degrees; the default is 5.0 degrees.

SPECFILO

Specifies the name of a new spectral library file to receive the endmember set. If a file with the specified name already exists, it will be overwritten.

The following rules apply to the output spectral library filename extensions:

FILOTYPE

Specifies the type of the output spectral library file.

Supported file types are:
Note: If the "TXT (text file) type is specified, a file with a ".gav" extension is also generated; this file contains the schema for the file.

RTLEVEL

Specifies the radiometric transformations associated with the data set be applied to the stored pixel values before they are used to derive the endmembers. The default is to apply the full sequence of transformations.

This parameter has no effect if the input file metadata contains no radiometric transformation parameter values.

Back to top

Details

An "endmember" set is a set of spectra that can be linearly combined to closely approximate a set of image-derived spectra. Endmember spectra (or, simply, endmembers) act as basic constituents of a hyperspectral image in the process of "spectral unmixing," which estimates the contribution of each endmember to the spectrum at each image location (see SPUNMIX).

ENDMEMB automatically computes, for a user-defined input image region, an endmember set using the iterative error analysis (IEA) algorithm (Szeredi et. al.). ENDMEMB then outputs the endmembers to a file that can be used as input into SPUNMIX.

The IEA algorithm has been shown to be the most reliable of several different automatic endmember selection algorithms when applied to examples of real imaging spectrometer data (Lefebvre et. al.).

The size of the endmember set to generate may be specified by the user. If left unspecified, ENDMEMB will estimate the number of non-redundant endmembers and generate that many endmembers.

Endmembers computed by ENDMEMB may correspond to elementary materials in the imaged scene (for example, various types of exposed soil, various agricultural crops, asphalt, concrete), but there is no guarantee that this will be the case. A fraction map for each endmember may be computed using SPUNMIX. The locations where the fraction map values for each endmember are high may be compared to knowledge of the scene to determine which, if any, of the endmembers correspond to elementary scene materials.

The output report lists the RMS-error of the unconstrained unmixing solution for each of the endmembers, other than the first computed endmember. For each endmember, the unmixing is done using the previously generated endmembers. As the RMS-error decreases, the endmember approaches a linear combination of the previously generated endmembers. A linear combination of endmembers would be a redundant endmember.

Back to top

Example

This example shows the use of ENDMEMB in computing an endmember set for cupref.pix. SPUNMIX may then be used to compute a fraction vector map for cupref.pix and the endmember set, and to reconstruct an image from the fraction vector map that may be used to assess how well the endmember set represents the spectral classes in cupref.pix on a band-by-band basis.

Compute the endmember set:

from pci.endmemb import *

file		=	"cupref.pix"
dbic		=	[]			# no channel restrictions on input bands
wlenint		=	[]			# no wavelength interval restriction on input bands
valonly		=	"yes"		# involve only "plot" or "bmask" bands in computation
dbiw		=	[]			# use full extent of cupref.pix
dbib		=	[]
nendmem		=	[20]		# compute 20 endmembers
errsetsz	=	[10]
bvangthr	=	[5.0]
specfilo	=	"endmemb.spl"
filotype	=	"spcb"
rtlevel		=	[]			# apply full r.t. sequence, DN to reflectance

endmemb( file, dbic, wlenint, valonly, dbiw, dbib, nendmem, errsetsz, bvangthr, specfilo, filotype, rtlevel )

The following report is written to endmemb.txt:

RMSE of unconstrained unmixing model for endmember i,
   where unmixing is done with endmembers 1 to i-1
             endmember      RMSE
             ---------      ----
                  2        0.480
                  3        0.232
                  4        0.212
                  5        0.088
                  6        0.065
                  7        0.112
                  8        0.041
                  9        0.070
                 10        0.035
                 11        0.033
                 12        0.028
                 13        0.025
                 14        0.033
                 15        0.026
                 16        0.021
                 17        0.024
                 18        0.024
                 19        0.028
                 20        0.065

Compare the reconstructed image in recon.pix to the original image to assess how well the endmember set represents the spectral classes in cupref.pix on a band-by-band basis.

Back to top

Algorithm

ENDMEMB estimates the number of non-redundant endmembers by numbering the eigenvalues for the image-region spectra in order of decreasing value, and then determining after which eigenvalue the adjacent eigenvalue differences become 'close to' uniform.

Let del1 be the difference between eigenvalues i and i-1 and del0 be the difference between eigenvalues i-1 and i-2. Then, the number of non-redundant endmembers is selected to be the smallest i such that del0/del1 < 1.5 (eigenvalue 1 is the first eigenvalue).

To help describe the IEA algorithm, certain notations and concepts are established up front:
  1. Let the default or specified image region have M pixels, and let _d_i denote the N-dimensional band vector at the i'th pixel.
  2. Let _S be a N-by-Q matrix whose columns are endmembers s_j, j = 1, ...,Q, selected for the image region.
  3. A constrained unmixing solution for band vector _b_i is the N-dimensional vector _f_i such that _S * _f_i = _b_i, the elements of _f_i are all non-negative, and sum to 1.
  4. The constrained unmixing error for _d_i is the scalar e_i, such that e_i = ||_d_i - _S * _f_i||.

The IEA algorithm computes a new endmember vector in each process iteration, starting with one endmember in the first iteration. The algorithm executes a total of K iterations, where K is the value of NENDMEMB, if specified, or, alternatively, the automatically estimated number of non-redundant endmembers.

The algorithm is as follows (Szeredi et. al.):
  1. Initialize the iteration counter k to 0.
  2. Compute the mean band vector, _d_mean for the image region according to _d_mean = (Sum i=1, ..., M _d_i)/M.
  3. Compute the constrained unmixing solution _f_i and the error e_i for each _d_i, i = 1, ..., M, using _d_mean as the only endmember.
  4. Find the R band vectors with the largest unmixing error (R is the value of the parameter ERRSETSZ). Denote the band vector with the largest error by _d_max1.
  5. Compute the k'th endmember _s_k as the mean of the r &amp;amp;lt;= R largest-error band vectors that lie within an angle T of _d_max1. T is the specified or default value of the parameter BVANGLETHR.
  6. Increment k. If k = K then stop.
  7. Compute the constrained unmixing solution _f_i and the error e_i for each _d_i, i = 1, ..., M, using endmembers _s_1, ..., _s_k.
  8. Go to Step 4.
Back to top

References

J. H. Lefebvre, T. Szeredi, J. Secker, K. Staenz, and R. A. Neville, Automatic Endmember Selection: Part II - Application and Comparison. in press (2002), "Remote Sensing Of Environment."

T. Szeredi, K. Staenz, and R. A. Neville, Automatic Endmember Selection: Part I - Theory, in press (2002), "Remote Sensing of Environment."

© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.