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:

  • Adaptive Coherence Estimator: Derived from the Generalized Likelihood Ratio (GLR) approach, this method is invariant to relative scaling of input spectra and has a Constant False Alarm Rate (CFAR) with respect to such scaling. As with CEM and MF, ACE does not require knowledge of all the endmembers within a scene.
  • Constrained Energy Minimization: Similar to Adaptive Coherence Estimator and Matched Filter, this algorithm does not require knowledge of all the endmembers within a scene. Using a specific constraint, it uses a finite impulse response (FIR) filter to pass through the desired target while minimizing its output energy resulting from backgrounds other than the desired targets. A correlation or covariance matrix is used to characterize the composite unknown background. In a mathematical sense, MF is a mean-centered version of CEM, where the data mean is subtracted from all pixel vectors.
  • Mahalanobis Distance: Mahalanobis Distance classification is a direction-sensitive distance classifier that uses statistics for each class. It is similar to Maximum Likelihood classification but assumes all class covariances are equal and therefore is a faster method. All pixels are classified to the closest ROI class unless you specify a distance threshold, in which case some pixels may be unclassified if they do not meet the threshold. You must import ROIs to run this method.
  • Matched Filter: Finds the abundance of targets using a partial unmixing algorithm. This technique maximizes the response of the known spectra and suppresses the response of the composite unknown background, therefore matching the known signature. It provides a rapid means of detecting specific materials based on matches to target spectra and does not require knowledge of all the endmembers within an image scene.
  • Maximum Likelihood: Maximum likelihood classification assumes that the statistics for each class in each band are normally distributed and calculates the probability that a given pixel belongs to a specific class. Unless you select a probability threshold, all pixels are classified. Each pixel is assigned to the class that has the highest probability (that is, the maximum likelihood). If the highest probability is smaller than a threshold you specify, the pixel remains unclassified. You must import ROIs to run this method.
  • Minimum Distance: The Minimum Distance method uses the mean vectors of each endmember and calculates the Euclidean distance from each unknown pixel to the mean vector for each class. All pixels are classified to the nearest class unless a standard deviation or distance threshold is specified, in which case some pixels may be unclassified if they do not meet the selected criteria.
  • Mixture Tuned Matched Filter: MTMF uses an MNF transform input file to perform MF, and it adds an infeasibility image to the results. The infeasibility image is used to reduce the number of false positives that are sometimes found when using MF alone. Pixels with a high infeasibility are likely to be MF false positives. Correctly mapped pixels will have an MF score above the background distribution around zero and a low infeasibility value. The infeasibility values are in noise sigma units that vary in DN scale with an MF score. This method should only be used with an input file of a forward MNF result.
  • Mixture Tuned Target Constrained Interference Minimized Filter: MTTCIMF combines the Mixture Tuned technique and TCIMF target detector. It uses a Minimum Noise Fraction (MNF) transform input file to perform TCIMF, and it adds an infeasibility image to the results. The infeasibility image is used to reduce the number of false positives that are sometimes found when using TCIMF alone. The output of MTTCIMF is a set of rule images corresponding to TCIMF scores and a set of images corresponding to infeasibility values. The infeasibility results are in noise sigma units and indicate the feasibility of the TCIMF result. Correctly mapped pixels have a high TCIMF score and a low infeasibility value. If non-target spectra were specified, MTTCIMF can potentially reduce the number of false positives over MTMF. This method should only be used with an input file of a forward MNF result. You can optionally specify background spectra for this method.
  • Normalized Euclidean Distance Classification: NED is a physically-based spectral classification that calculates the distance between two vectors in the same manner as a Euclidean Distance method, but it normalizes the vectors first by dividing each vector by its mean.
  • Parallelepiped: Parallelepiped classification uses a simple decision rule to classify multispectral data. The decision boundaries form an n-dimensional parallelepiped classification in the image data space. The dimensions of the parallelepiped classification are defined based upon a standard deviation threshold from the mean of each selected class. If a pixel value lies above the low threshold and below the high threshold for all n bands being classified, it is assigned to that class. If the pixel value falls in multiple classes, ENVI assigns the pixel to the first class matched. Areas that do not fall within any of the parallelepiped classes are designated as unclassified. You must import ROIs to run this method.
  • Orthogonal Subspace Projection: OSP first designs an orthogonal subspace projector to eliminate the response of non-targets, then applies MF to match the desired target from the data. OSP is efficient and effective when target signatures are distinct. When the spectral angle between the target signature and the non-target signature is small, the attenuation of the target signal is dramatic and the performance of OSP could be poor. This method is only available if you provided more than one target spectra, or you provided background spectra along with the target spectrum in the Select Signatures step. You can optionally specify background spectra for this method.
  • Spectral Angle Mapper Classification: SAM matches image spectra to reference target spectra in n dimensions. It compares the angle between the target spectrum (considered an n-dimensional vector, where n is the number of bands) and each pixel vector in n-dimensional space. Smaller angles represent closer matches to the reference spectrum. When used on calibrated data, this technique is relatively insensitive to illumination and albedo effects.
  • Spectral Information Divergence Classification: Spectral Information Divergence (SID) classification uses a divergence measure to match pixels to reference spectra. The smaller the divergence, the more likely the pixels are similar.
  • Spectral Similarity Mapper Classification: SSM supervised classification is a physically-based spectral classification that combines elements of both the Spectral Angle Mapper and Minimum Distance classifier methods into a single measure.
  • Target Constrained Interference Minimized Filter: TCIMF detects the desired targets, eliminates non-targets, and minimizes interfering effects in one operation. TCIMF is constrained to eliminate the response of non-targets rather than minimizing their energy, just like other interferences in CEM. Previous studies show that if the spectral angle between the target and the non-target is significant, TCIMF can potentially reduce the number of false positives over CEM results. This method is only available if you provided more than one target spectra, or you provided non-target spectra in the Select Signatures step. You can optionally specify background spectra for this method.

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:

  • To plot all imported spectra, click the Plot Spectra button on the Endmember Collection Classification dialog toolbar. The Spectral Collection Plot window opens.
  • To plot an individual spectrum, right click it under the Endmembers or Background folder and select Plot Spectra.
  • To plot spectra in the open raster, click the Spectral Profile button on the toolbar. The Spectral Profile (Z profile) window opens. Click on a pixel in the view to plot it. To add spectra from the plot to the Endmember Collection Classification dialog, click the Show arrow on the right side of the Spectral Profile window to expand the properties panel, then drag the desired plot key(s) from the panel to the Endmembers or Background folder.

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.

  • To save a spectra collection, click the Save Collection button and specify a location and filename.

  • To restore a saved collection, click the Restore Collection button and select the desired .json file.

ASCII File Format


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

  • The header part has lines that describe the data fields and related information, such as data source, units, timestamp, names, and colors of endmembers.

  • The data part is a table of all numerical values where column 1 stores the wavelength and columns 2 through x (where x is number of endmembers included in file) store the endmember spectral data.

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.