Endmember Collection Classification

Use the Endmember Collection tool to perform different classification techniques using selected endmember spectra from spectral libraries, ROIs, vectors, ASCII files, stats files, and plot windows. Endmembers are spectra that represent pure surface materials in a spectral image.

You can run these classification methods in the Endmember Collection tool:

All incoming spectra are stored at their native resolution, so the same collection can be used with rasters with different wavelength ranges and spacings. ENVI saves both the mean spectra and the associated statistics of the ROI (standard deviation, covariance, eigenvectors, and eigenvalues). This means that a saved spectral collection will work with classification methods that require these statistics (such as Maximum Likelihood, Mahalanobis Distance, and Parallelepiped).

  1. From the Toolbox, select Classification > Endmember Collection. The Endmember Collection Classification dialog appears and the Endmember folder selected.
  2. To import the Endmembers to use in the classification, click the Import drop-down menu or right-click on the Endmembers folder, and select Import Spectra. You can import spectra from one or more of the following sources:

    • From Spectral Library: In the Import from Spectral Library dialog, select a Library, then select one or more Spectra from that libraryand click OK.
    • From ROIs: In the Data Selection dialog, browse to the ROI file for the input raster or, if the ROI file is already open, select the input raster and click OK. In the Import Spectra from ROIs dialog, enable the check boxes for the spectra to import, then click OK.
    • From Vector: In the Data Selection dialog, browse to the vector file for the input raster or, if the vector file is already open, select the input raster and click OK. In the Convert Vector to ROIs dialog, select the conversion options for the vectors, then click OK.
    • From ASCII file: In the Select ASCII for Input dialog, select a .txt file to open. The ASCII file format is a columnar text file, described below.
    • From Stats file: In the Select ENVI Statistics Filename dialog, select a .sta file to open.
    • From Plot Window: If a Plot or Profile window is open, import spectra from the plot to the Endmember Collection Classification dialog with one of the following:
      • In the Endmember Collection Classification dialog toolbar, select Import > From Plot Window. In the Import plot window dialog that appears, select the plot(s) to import and click OK.
      • In the Plot or Profile window, click the arrow on the right side of the plot to expand the properties panel, then click and drag the plot key(s) to the Endmembers or Background folder in the Endmember Collection Classification dialog.

    The endmember selections are added under the Endmembers folder.

    • To remove an endmember from the list, right-click on it and select Remove. To remove all spectra from the list, right-click Endmembers and select Remove Spectra.

    • To save the endmember collection to a .json file that can be used in future ENVI sessions, see Save and Restore a Spectra Collection.

    • To edit spectrum names and colors for the classification output, see Edit Spectrum Names and Colors.

    • To plot the endmember collection, see Plot Endmember Spectra.

  3. You can optionally specify background spectra as input for the Orthogonal Subspace Projection, Target Constrained Interference Minimized Filter, or Mixture Tuned Target Constrained Interference Minimized Filter classification methods. To do this, right-click the Background folder and select Import Spectra, then import the desired spectra, as described previously.

    Note: Background spectra will be ignored for all other classification methods.

  4. Select a Raster for classification and perform optional spatial and spectral subsetting, and/or masking.
  5. Click the Classify button. The Endmember Classification dialog appears.
  6. Select one or more of the following classification methods to perform:

    • Spectral Angle Mapper Classification
    • Matched Filter
    • Mixture Tuned Matched Filter
    • Maximum Likelihood
    • Mahalanobis Distance
    • Parallelepiped
    • Minimum Distance
    • Adaptive Coherence Estimator
    • Constrained Energy Minimization
    • Orthogonal Subspace Projection
    • Spectral Information Divergence Classification
    • Spectral Similarity Mapper Classification
    • Normalized Euclidean Distance Classification
    • Target Constrained Interference Minimized Filter
    • Mixture Tuned Target Constrained Interference Minimized Filter
  7. In the Set Parameters field, select Yes if you want to review or update parameter settings before the classification process starts. If set to No, default parameter settings will be used.
  8. Click OK. If you selected No in the Set Parameters field, classification processing begins. If you selected Yes in the Set field to review or update parameter settings , a dialog for the associated classification appears. Review or edit the parameters, then click OK to start the classification process.

Plot Endmember Spectra

To plot endmember spectra, use one of the following:

Edit Spectrum Names and Colors

You can optionally change spectrum names and colors for the classification output.

  1. Right-click an individual spectrum in the Endmembers list and select Edit.
  2. To change the Spectrumname, enter a new one in the field provided.

  3. To change the color, click the color icon and select a new one.

  4. Click the OK button to save the changes.

Save and Restore a Spectra Collection

You can save the spectra you collected to a .json file that can be used in future ENVI sessions.

ASCII File Format

The ASCII file format should include a header part and a data part.

An example ASCII file:

ENVI ASCII Plot File [Thu Oct 26 14:23:35 2023]

Column 1: Wavelength

Column 2: Min: ROI #1~~2##255,0,0

Column 3: Mean-StdDev: ROI #1~~21##0,200,0

Column 4: Mean: ROI #1~~0##0,0,0

Column 5: Mean+StdDev: ROI #1~~21##0,200,0

Column 6: Max: ROI #1~~2##255,0,0

   365.929800  0.000000  -0.002840  0.000594  0.004028  0.035500

   375.594000  0.000000  -0.003664  0.000866  0.005396  0.041400

   385.262500  0.000000   0.001473  0.012179  0.022884  0.075800

   394.935500  0.006000   0.014289  0.026053  0.037817  0.092100

   404.612900  0.010500   0.017070  0.029485  0.041900  0.099400

   414.294600  0.012500   0.020445  0.033426  0.046407  0.108000

   423.980800  0.015900   0.025730  0.039122  0.052515  0.114200

   433.671300  0.021600   0.032261  0.046269  0.060276  0.124100

   443.366200  0.024900   0.036815  0.051492  0.066169  0.132200

.

.

   ...and so on.