Use Endmember Collection to select endmember spectra from many sources for use in classification and advanced spectral analysis techniques.

See the following sections to continue:

Endmember Collection Dialog Components


The following input file information is provided in the text at the top of the Endmember Collection dialog:

  • File: The name of the input file and its selected spatial subset range. If the image is not spatially subset, the phrase Full Scene displays.
  • Mask: The name of the mask associated with the input file.
  • Wavelength: The wavelength range of the image data. The units of these wavelengths are derived from the header file of the input file. If the units cannot be derived from the header file, the phrase <unknown units> displays.
  • Number and range of the bands in the spectral subset: The number of bands spectrally subsetted from the input file and the range of the subset. If the input file is not spectrally subsetted, the total number of bands in the input file and the entire range displays.

The Endmember Collection dialog also contains the Endmember Spectra table. This table enables you to view and edit properties associated with any of the spectra listed in the table. The table contains the following columns:

  • Row Number: Contains the row number of each spectrum. You can select one or more spectra. Use the Select All button to select all of the spectra in the table. Click Plot or Delete to plot or delete the selected spectra.
  • Spectrum Name: Contains the name of each spectrum. You can edit the name of a spectrum by selecting its cell in this column. You can also specify the spectrum names for all the spectra from an ASCII file by right-clicking the Spectrum Name column title and selecting the Import names from ASCII. This menu also contains a Reset names option to reset all the spectra to their original names. All of the options in this menu are also available in the Options menu.
  • Color: Contains the color of each spectrum. You can use any of the following methods to change the color of a spectrum.
  • Right-click in the cell to display the color menu.
  • Left-click in the cell to enter a valid ENVI graphics color name. If a valid color is not provided, ENVI sets the color value to <none> by default.
  • Left-click in the cell to enter an RGB triplet (such as 255, 0, 0 for red). If you provide an RGB triplet, ENVI uses the closest valid ENVI graphics color.

You can also set the default ENVI colors for all the spectra by right-clicking in the Color column title and selecting Assign default colors to all. You can set all the spectra colors to <none> with Assign default colors to undefined, and you can select Reset Colors to reset all the spectra to their original colors. All of the right-click menu options are also available in the Endmember Collection dialog Options menu.

  • Source: Displays the source of each spectrum. The values in this column cannot be edited. The following list shows the possible sources for the spectra in the table.

    ASD file: Spectrum imported from ASD formatted file (which is output from the Analytical Spectral Devices spectrometers).

    Spec Lib: Spectrum imported from ENVI spectral library (.sli) file.

    ROI mean: Mean spectrum from either an ROI or a vector.

    Stats file: Spectrum imported from ENVI statistics (.sta) file.

    Plot: Spectrum imported from a plot window.

    Unknown: Spectrum retrieved from any other source.

  • ASCII file: Spectrum imported from ASCII column data file.
  • Bands: Displays the number of spectral bands contained in each spectrum. You cannot edit the values in this column.
  • Wavelength: Contains the wavelength range of each spectrum. ENVI converts the wavelengths of the spectra to the wavelengths of the image data when you click either Plot or Apply in the dialog. This conversion does not occur if the wavelength units of the spectra are unknown. You can change the wavelength units by right-clicking in the cell of the Wavelength column.

To change an input file with unknown wavelength units to a file containing known wavelength units, select File > Change input File option from the Endmember Collection dialog menu bar.

  • Status: Displays the status of each spectrum related to the input file. You cannot edit the values in this column. The following list shows the possible status values for the spectra in the table:
  • Match: The wavelengths of the input file and the spectrum match exactly and no resampling is necessary when you click either Plot or Apply.
  • Resample: The wavelengths of the input file and the spectrum are different, but ENVI is able to resample the spectrum to the wavelength space of the input file when you click either Plot or Apply.
  • Invalid: The wavelengths of the input file and the spectrum are different, but ENVI is not able to resample because the wavelength units of either the spectrum or the input file are unknown. If a spectrum is invalid, it cannot be plotted and is not used when you click Apply.

Import Spectra


You can import endmember spectra from the following sources:

When using the Mahalanobis distance or maximum likelihood classifiers, you can only import the endmember spectra from ROIs or statistics files because these classifications use the endmember covariance statistics.

Import Spectra from Spectral Libraries

  1. Select Import > from Spectral Library. The Input File dialog appears.
  2. Choose the spectral library name.
  3. Click OK. The Input Spectral Library dialog appears. If the desired spectral library was not previously opened, select File > Open Spectral Library in the Input File dialog.
  4. Select endmember spectra by selecting the spectrum names.
  5. Change the Wavelength Units and Y Scale Factor parameters as needed.

    If the Reflectance Scale Factor parameter is set in both the spectral library header and the image data header, then ENVI will automatically scale the library data to match the image data. If one of the two data sources has no scale factor in its header, then no scaling will be done.

  6. Click OK to enter the selected spectra into the Endmember Spectra list.

Import Spectra from ROIs and Vectors

You can import mean spectra from previously defined ROIs or vectors open in the Available Vectors List. You can associate these ROIs and vectors with either the current input file or another file.

To import ROIs and vectors associated with the current file:

  1. From the Endmember Collection dialog menu bar, select Import > from ROI/EVF from input file. The Select Regions for Stats Calculation dialog appears. The Select Regions for Stats Calculation dialog is only provided if more than one ROI or vector is available.
  2. Select endmember spectra (ROI or vector averages) by selecting the ROI or vector names. To open an ROI or EVF file, click Open ROI/EVF file. The Enter ROI/EVF Filenames dialog appears. Use this dialog to select and open ROI and EVF files. The Select Regions for Stats Calculation dialog is updated with the ROIs and vectors from the open files.
  3. Click OK to enter the ROI and vector means into the Endmember Spectra list.

To import ROIs and vectors associated with another file:

  1. From the Endmember Collection dialog menu bar, select Import > from ROI/EVF from other file. The Input File of associated ROI/EVF dialog appears.
  2. Select the input file. The Select Regions for Stats Calculation dialog appears. The Select Regions for Stats Calculation dialog is only provided if more than one ROI or vector is available.
  3. Select endmember spectra (ROI or vector averages) by selecting the ROI or vector names. To open an ROI or EVF file, click Open ROI/EVF file. The Enter ROI/EVF Filenames dialog appears. Use this dialog to select and open ROI and EVF files. The Select Regions for Stats Calculation dialog is updated with the ROIs and vectors from the open files.
  4. Click OK to enter the ROI and vector means into the Endmember Spectra list.

Import Spectra from ASCII Files

  1. From the Endmember Collection dialog menu bar, select Import > from ASCII File. The Select ASCII Files to Import dialog appears.
  2. Select an ASCII file or a group of ASCII files of the same format and click Open. The Input ASCII File dialog appears, with a list of the number of columns and rows and the first few data values of each column of data.
  3. Enter the X Axis Column number that contains the x axis data.
  4. Select the endmember spectra to import in the Select Y Axis Columns area.
  5. Change the Wavelength Units and Y Scale Factor parameters as needed.
  6. Click OK to enter the selected endmember spectra into the list on the Endmember Collection dialog.

To select another ASCII file and read the data using the settings previously defined the Input ASCII File dialog:

  1. From the Endmember Collection dialog menu bar, select Import > from ASCII file (previous template). The Select ASCII Files to Import dialog appears.
  2. Select an ASCII file and click Open. This option reads the data directly into the Endmember Collection dialog without the intermediate parameter dialog.

Import Spectra from ASD Binary Files

  1. From the Endmember Collection dialog menu bar, select Import > From ASD Binary File. The Enter ASD Files to Import dialog appears.
  2. Select the ASD file or files and click Open. ENVI automatically resamples the file to match the wavelengths from a data file, ASCII file, or first imported spectrum as designated when the Spectral Library Builder function was started. If importing the ASD file from the Endmember Collection dialog, ENVI automatically resamples the first input spectrum.

If the range of the ASD file does not match the range of the input wavelengths, all zeroes will result.

Import Spectra from Statistics Files

Use from Stats file to import the mean spectrum from a previous classification result that was calculated using the Statistics option in the Toolbox:

  1. Select Import > from Stats file. The Enter Statistics Filename dialog appears.
  2. Select one or more statistics files.
  3. Click OK. The mean spectrum from the statistics file is entered into the list on the Endmember Collection dialog.

Import Spectra from Plot Windows

You can import spectra from plot windows by using the right-click menu, by dragging and dropping the spectra from the plot window to the Endmember Spectra table, or by using a dialog box menu option, as described in the next sections.

To derive spectra from the Spectral Profile plot window for your displayed image and import them into the Endmember Spectra table:

  1. If your image is displayed in a display group (only available from certain tools), you can right-click in the display group and select Z Profile (Spectrum). The Spectral Profile plot window appears.
  2. From the Spectral Profile plot window menu bar, select Options > Collect Spectra.
  3. Click on the spectra you want to collect for the Endmember Spectra table.
  4. In the Endmember Collection dialog, right-click on either an empty space in the table or on the upper-left corner of the table. The resulting menu contains all the available spectra from every displayed plot window.

    If no spectrum was available in any plot window, the right-click menu states that no spectrum is available.

  5. Left-click on the spectra you want to import into the table. The selected spectra appears in the Endmember Spectra table.
  6. Use the right-click menu to import all of the spectrum you want to include in the table.

To drag-and-drop a spectrum from the Spectral Profile plot window key to the Endmember Spectra table to collect it in the Endmember Collection dialog:

  1. From the Spectral Profile plot window menu bar, select Options > Plot Key. The key (legend) for the plot window appears to the right of the spectral plot.
  2. Click and drag the key of a spectrum into the Endmember Spectra table. The spectrum appears in the Endmember Collection table.

To import multiple spectra by using an Endmember Collection dialog menu option:

  1. From the Endmember Collection dialog menu bar, select Import > from Plot Windows. The Import from Plot Windows dialog appears.
  2. Select one or more spectra.
  3. Click OK. The selected spectra appear in the Endmember Collection dialog.

Import Spectra from Endmember Collection Files

Use from Endmember Collection file to import an Endmember Collection file:

  1. From the Endmember Collection dialog menu bar, select Import > from Endmember Collection file. The Select Endmember Collection File to Import dialog appears.
  2. Select and open an Endmember Collection .txt file. ENVI updates the Endmember Collection dialog with the spectra from the specified file.

Manage Endmember Spectra


Use the File menu in the Endmember Collection dialog to save endmember spectra to an ASCII file, as a spectral library, or as an Endmember Collection file. You can also use the File menu to change the input file or exit the dialog.

  • To save spectra to an ASCII file, select File > Save Spectra As > ASCII file.
  • To save spectra to spectral libraries, select File > Save Spectra As > Spectral Library file.
  • To save the current state of the Endmember Collection dialog to a text file, select File > Save Spectra As > Endmember Collection file. The Endmember Collection file contains all the current information that is provided for each spectrum in the Endmember Spectra table.
  • To change the input file while the selected endmembers, select File > Change Input File. You can change the spectral or spatial subset of your input file by selecting File > Change Input File again, selecting the same filename, and changing the subset.

Plot Spectra


  • To plot a spectrum from the Endmember Spectra table, select the row number column of the spectrum to plot, then click Plot.
  • To plot multiple spectra, use the Shift or Ctrl key as you select the row number columns, then click Plot.
  • To plot all the spectra in the table, click Select All, then click Plot.

Delete Spectra


  • To delete a spectrum from the Endmember Spectra table, select the row number column of the spectrum to delete, then click Delete.
  • To delete multiple spectra, use the Shift or Ctrl key as you select the row number columns, then click Delete.
  • To delete all the spectra in the table, click Select All, then click Delete.

Endmember Options


Use the Options menu in the Endmember Collection dialog to edit the endmember names, edit the endmember colors, or suppress backgrounds (using BandMax).

  • To edit endmember names, select Options > Import spectrum names from ASCII. Select and open the ASCII file that contains the spectrum names. The names of the spectra collected in the dialog are changed to the names from the ASCII file.
  • To reset the spectra to their initial names, select Options > Reset spectrum names.
  • To assign default colors to all of the endmember spectra, select Options > Assign default colors to all.
  • To assign default colors to all of the undefined spectra colors (indicated by <none>), select Options > Assign default colors to undefined.
  • To reset the spectra to their initial colors, select Options > Reset colors.

Select Processing Methods


Use the Algorithm menu in the Endmember Collection dialog to select a classification or advanced spectral processing method. The classification methods available are parallelepiped, minimum distance, Mahalanobis distance, maximum likelihood, Spectral Angle Mapper, and binary encoding. The advanced spectral processing methods available are linear spectral unmixing, matched filtering, mixture tuned matched filtering, and spectral feature fitting.

When using the Mahalanobis distance or maximum likelihood classifiers, you can only import the endmember spectra from ROIs or statistic files because these classifications use the endmember covariance statistics. You must also have at least two endmembers.

  1. From the Endmember Collection dialog menu bar, select Algorithm > classification_method.

    You can also start the classification methods from the Classification > Supervised menu and you can start the advanced spectral processing methods from the Spectral Tools menu.

  2. Click Apply. The Algorithm Parameters dialog appears.
  3. Enter the selected algorithm’s required parameters.