Environments | PYTHON :: EASI :: MODELER |
Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Algorithm :: References :: Related |
Back to top |
Back to top |
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 - |
Back to top |
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.
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.
FILOTYPE
Specifies the type of the output spectral library 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 |
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 |
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 |
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).
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.
Back to top |
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.