Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  Using ENVI  >  Statistics

ENVI

Statistics

Statistics

The Statistics View displays plot and tabulated statistics for rasters. You can calculate statistics that include the following.

  • Pixel count and percentage per class for classification images.
  • Basic statistics (minimum, maximum, mean, and standard deviation) for single- or multi-band images.
  • Histograms with frequency distributions (number of points, cumulative points, percent for each bin, and cumulative percentage for each DN (digital number)) for single- or multi-band images.
  • Covariance statistics, including a covariance matrix, correlation matrix, and eigenvectors, for multi-band images.

The statistics are calculated in double-precision.

To learn how to compute statistics in ENVI, see the following:

You can also write a script to compute raster statistics using the ENVIRasterStatisticsTask routine. Use the ENVIRasterHistogramTask routine to compute a histogram.

Quick Stats


Quick Stats computes basic statistics and histograms for all bands. To also compute statistics for covariance, use Compute Statistics in the Toolbox, described in the next section.

  1. In the Layer Manger or Data Manager, right-click an image file and select Quick Stats.
  2. ENVI calculates the statistics and displays them in the Statistics View. The following provide details on the Statistics View:

Compute Statistics


Compute Statistics enables you to compute basic statistics, histograms, and covariance for all bands.

  1. From the Toolbox, select Statistics > Compute Statistics. The Compute Statistics Input File dialog appears.
  2. In the Select Input File list, select the input file, and perform optional spatial and spectral subsetting, and/or masking.
  3. Click OK. The Compute Statistics Parameters dialog appears.
  4. Select the statistics to include in the report:
    • Basic Stats: Calculates basic statistics. Basic statistics are always calculated, so this option is always set. ENVI does not calculate statistics for any bands specified as bad bands in the image header file.
    • Histograms: Calculates the histogram of each band.
    • Covariance: Calculates the covariance matrix, the correlation matrix, eigenvalues, and eigenvectors. When enabled, the Covariance Image check box also appears. Enable the Covariance Image check box to return the covariance and correlation matrices, and the eigenvectors as images in the Layer Manager and Data Manager. The dimensions of the resulting images are nb by nb, where nb is the number of bands of the input data. The eigenvectors are associated with the rows in the output eigenvector image.
  5. Enable the Output to the Screen check box to display the statistics report in the Statistics View dialog.
  6. To save the output to an ENVI-format statistics file, enable the Output to a Statistics File check box and enter a filename in the Enter Output Stats Filename field. The default file extension for statistics files is .sta.
  7. To save the output to a text file, enable the Output to a Text Report File check box and enter a filename in the Enter Output Text Filename field.
  8. To change the data precision displayed in the output statistics report, click Report Precision. The Set Report Precision dialog appears.
    1. Set the number of digits to display after the decimal point in the Data Precision field.
    2. Use the Floating Report toggle button to set Normal or Scientific for the numbers in the ASCII report. Normal numbers are in decimal format (for example, 25.88). Scientific numbers are a single digit followed by a decimal value, the letter e, and the exponential power (for example, 2.588e+001).
  9. Click OK to calculate the statistics for the selected output and display them in the Statistics View. The following provide details on the Statistics View:

Class Statistics


You can compute pixel count and percentage per class, basic statistics, and histograms for all bands on classifications (including classification images, Raster Color Slices, and Scatter Plot classes).

  1. In the Layer Manger, do one of the following:

    • Right-click the Classes folder and select Statistics for All Classes.
    • Right-click the Slices folder and select Statistics for All Color Slices.
    • Right-click a class or color slice and select Class Statistics.
  2. ENVI calculates the statistics and displays them in the Statistics View. The following provide details on the Statistics View:

When you use Class Statistics from the Toolbox, you can compute covariance for all bands in a classification image, in addition to pixel count and percentage per class, basic statistics, and histograms.

  1. From the Toolbox, select Classification > Post Classification > Class Statistics. The Classification Input File dialog appears.
  2. In the Select Input File list, select the classification input file.
  3. Click OK. The Statistics Input File dialog appears.
  4. Select an input file from which to calculate the class statistics. This is usually the data file, which will be used for the areas identified in the classification image. You can also apply a mask to the calculation through the Select Mask Band, Build Mask, Spectral Subset buttons.
  5. Click OK. The Class Selection dialog appears.
  6. Select the class(es) to calculate statistics for.
  7. Click OK. The Compute Statistics Parameters dialog appears.
  8. Select the statistics to include in the report:
    • Basic Stats: Calculates basic statistics. Basic statistics are always calculated, so this option is always set. ENVI does not calculate statistics for any bands specified as bad bands in the image header file.
    • Histograms: Calculates the histogram of each band.
    • Covariance: Calculates the covariance matrix, the correlation matrix, eigenvalues, and eigenvectors. When enabled, the Covariance Image check box also appears. Enable the Covariance Image check box to return the covariance and correlation matrices, and the eigenvectors as images in the Layer Manager and Data Manager. The dimensions of the resulting images are nb by nb, where nb is the number of bands of the input data. The eigenvectors are associated with the rows in the output eigenvector image.
  9. Enable the Output to the Screen check box to display the statistics report in the Statistics View.
  10. To save the output to an ENVI-format statistics file, enable the Output to a Statistics File check box and enter a filename in the Enter Output Stats Filename field. The default file extension for statistics files is .sta.
  11. To save the output to a text file, enable the Output to a Text Report File check box and enter a filename in the Enter Output Text Filename field.
  12. To change the data precision displayed in the output statistics report, click Report Precision. The Set Report Precision dialog appears.
    1. Set the number of digits to display after the decimal point in the Data Precision field.
    2. Use the Floating Report toggle button to set Normal or Scientific for the numbers in the ASCII report. Normal numbers are in decimal format (for example, 25.88). Scientific numbers are a single digit followed by a decimal value, the letter e, and the exponential power (for example, 2.588e+001).
  13. Click OK to calculate the statistics for the selected output and display them in the Statistics View. The following provide details on the Statistics View:

Region of Interest Statistics


  1. To view pixel statistics for ROIs, do one of the following:

    • From the Region of Interest Tool menu bar, select Options > Compute Stats From ROIs. If only one ROI is open, the ROI Statistics Results window appears. If multiple ROIs are open, the Choose Regions dialog appears; select the ROIs to include in the report, then click OK.
    • In the Layer Manager, right-click the Regions of Interest folder and select Statistics for All ROIs to report the statistics for all open ROIs. The ROI Statistics Results window appears. Or, right-click a single ROI and select Statistics.
    • In the Region of Interest Tool toolbar, click the Compute Statistics button.
  2. ENVI calculates the statistics and displays them in the Statistics View. The following provide details on the Statistics View:

View the Statistics Report


The report section in the Statistics view displays the tabulated statistics for each band and (for classifications) class.

  • Select Locate Stat to change the information displayed in the report.
  • Click the Select All button, or click and drag, to select rows in the report table. To copy the selected data to the clipboard, click the Copy to Clipboard button.
  • Use the Report Precision drop-down list to change the precision of the information in the Statistics View. This option does not affect histogram precision. By default, the numbers display as decimal format, with 6 digits following the decimal value. You can change the number of decimal digits to 2, 4, or 8. You can also select Scientific Notation to display numbers as a single digit followed by a decimal value, the letter e, and the exponential power (for example, 2.588e+001).



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