>  Docs Center  >  Using ENVI  >  Maximum Likelihood

Maximum Likelihood

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.

ENVI implements maximum likelihood classification by calculating the following discriminant functions for each pixel in the image (Richards, 1999):


i = class

x = n-dimensional data (where n is the number of bands)

pi) = probability that class ωi occurs in the image and is assumed the same for all classes

i| = determinant of the covariance matrix of the data in class ωi

Σi-1 = its inverse matrix

mi = mean vector

Reference: Richards, J. Remote Sensing Digital Image Analysis, Berlin: Springer-Verlag (1999), 240 pp.

  1. Use the ROI Tool to define training regions for each class. The more pixels and classes, the better the results will be.
  2. Use the ROI Tool to save the ROIs to an .roi file.
  3. Display the input file you will use for Maximum Likelihood classification, along with the ROI file.
  4. Select one of the following:
    • From the Toolbox, select Classification > Supervised Classification > Maximum Likelihood Classification.
    • From the Endmember Collection dialog menu bar, select Algorithm > Maximum Likelihood. Import (or re-import) the endmembers so that ENVI will import the endmember covariance information along with the endmember spectra. Click Apply.
  5. The Classification Input File dialog appears.

  6. Select an input file and perform optional spatial and spectral subsetting, and/or masking, then click OK. The Maximum Likelihood Parameters dialog appears.
  7. In the Select Classes from Regions list, select ROIs and/or vectors as training classes. The ROIs listed are derived from the available ROIs in the ROI Tool dialog. The vectors listed are derived from the open vectors in the Available Vectors List.
  8. Select one of the following thresholding options from the Set Probability Threshold area:
    • None: Use no threshold.
    • Single Value: Use a single threshold for all classes. Enter a value between 0 and 1 in the Probability Threshold field. ENVI does not classify pixels with a value lower than this value.
    • Multiple Values: Enter a different threshold for each class. Use this option as follows:
    1. In the list of classes, select the class or classes to which you want to assign different threshold values and click Multiple Values. The Assign Probability Threshold dialog appears.
    2. Select a class, then enter a threshold value in the field at the bottom of the dialog. Repeat for each class. Click OK when you are finished.
  9. Enter a Data Scale Factor. The scale factor is a division factor used to convert integer scaled reflectance or radiance data into floating-point values. For example, for reflectance data scaled into the range of zero to 10,000, set the scale factor to 10,000. For uncalibrated integer data, set the scale factor to the maximum value the instrument can measure 2n - 1, where n is the bit depth of the instrument). For example, for 8-bit instruments (such as Landsat 4) set the scale factor to 255, for 10-bit instruments (such as NOAA 12 AVHRR) set the scale factor to 1023, for 11-bit instruments (such as IKONOS) set the scale factor to 2047.
  10. Select classification output to File or Memory.
  11. Use the Output Rule Images? toggle button to select whether or not to create rule images. Use rule images to create intermediate classification image results before final assignment of classes. You can later use rule images in the Rule Classifier to create a new classification image without having to recalculate the entire classification.
  12. If you selected Yes to output rule images, select output to File or Memory.
  13. Click Preview to see a 256 x 256 spatial subset from the center of the output classification image. Change the parameters as needed and click Preview again to update the display.
  14. Click OK. ENVI adds the resulting output to the Layer Manager. The rule images, one per class, contain a maximum likelihood discriminant function with a modified Chi Squared probability distribution. Higher rule image values indicate higher probabilities. The final classification allocates each pixel to the class with the highest probability.

To convert between the rule image’s data space and probability, use the Rule Classifier. For the classification threshold, enter the probability threshold used in the maximum likelihood classification as a percentage (for example, 95%). The Rule Classifier automatically finds the corresponding rule image Chi Squared value.

Note: If you specify an ROI as a training set for maximum likelihood classification, you may receive a “Too May Iterations in TQLI” error message if the ROI includes only pixels that all have the same value in one band. A band with no variance at all (every pixel in that band in the subset has the same value) leads to a singularity problem where the band becomes a near-perfect linear combination of other bands in the dataset, resulting in an error message.

© 2020 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us