This task computes first-order entropy texture metrics on an input raster.

The virtual raster associated with this task is ENVIFirstOrderEntropyTextureRaster.

ENVI uses the following equation from Anys et al. (1994) to compute entropy using the pixel values in a kernel centered at the current pixel. Entropy is calculated based on the distribution of the pixel values in the kernel. It measures the disorder of the values in a kernel.

Where:

= Probability of each pixel value

= Number of distinct grey levels in the quantized image

Reference: Anys, H., A. Bannari, D. C. He, and D. Morin. "Texture analysis for the mapping of urban areas using airborne MEIS-II images." Proceedings of the First International Airborne Remote Sensing Conference and Exhibition 3 (1994): 231-245.

Example


This example computes first-order entropy texture from a raster and displays the first entropy band.

; Start the application
e = ENVI()
 
; Open an input file
File = Filepath('qb_boulder_msi', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('FirstOrderEntropyTexture')
 
; Define inputs
Task.INPUT_RASTER = Raster
 
; Run the task
Task.Execute
 
; Get the collection of data objects currently available in the Data Manager
DataColl = e.Data
 
; Add the output to the Data Manager
DataColl.Add, Task.OUTPUT_RASTER
 
; Display each band of the entropy image in a separate view
View1 = e.GetView()
Layer1 = View1.CreateLayer(Task.OUTPUT_RASTER, BANDS=[0], $
  NAME='First-order entropy for band 1')
 
View2 = e.CreateView()
Layer2 = View2.CreateLayer(Task.OUTPUT_RASTER, BANDS=[1], $
  NAME='First-order entropy for band 2')
 
View3 = e.CreateView()
Layer3 = View3.CreateLayer(Task.OUTPUT_RASTER, BANDS=[2], $
  NAME='First-order entropy for band 3')
 
View4 = e.CreateView()
Layer4 = View4.CreateLayer(Task.OUTPUT_RASTER, BANDS=[3], $
  NAME='First-order entropy for band 4')
 
; Create a geographic and zoom link for all views
View1.GeoLink, /LINK_ALL, /ZOOM_LINK

Syntax


Result = ENVITask('FirstOrderEntropyTexture')

Input properties (Set, Get): BIN_COUNT, INPUT_RASTER, KERNEL_SIZE, MAX_SRC_VALUES, MIN_SRC_VALUES, OUTPUT_RASTER_URI

Output properties (Get only): OUTPUT_RASTER

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

Methods


This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

BIN_COUNT (optional)

Specify the number of bins in the histogram to be used for the entropy calculation. The default value is 64.

INPUT_RASTER (required)

Specify the input ENVIRaster. This routine accepts an image with any number of bands.

KERNEL_SIZE (optional)

Specify a two-element array [n,m] as the kernel size, where n is the number of columns and m is the number of rows. The values must be odd and at least 3, for example [3,3].

MAX_SRC_VALUES (optional)

Specify an array of maximum source values to be used in the histogram for the entropy calculation, one for each band. The number of elements in the array must match the number of bands. If you set this property, you must also set MIN_SRC_VALUES.

MIN_SRC_VALUES (optional)

Specify an array of minimum source values to be used in the histogram for the entropy calculation, one for each band. The number of elements in the array must match the number of bands. If you set this property, you must also set MAX_SRC_VALUES.

OUTPUT_RASTER

This is a reference to the output raster of filetype ENVI.

OUTPUT_RASTER_URI (optional)

Specify a string with the fully qualified filename and path to export the associated OUTPUT_RASTER.

  • If you set this property to an asterisk symbol (*), the output raster will be virtual and not written to disk.
  • If you do not specify this property, or set it to an exclamation symbol (!), a temporary file will be created.

Version History


ENVI 5.4

Introduced

ENVI 5.5

OUTPUT_RASTER_URI now supports '*', which allows OUTPUT_RASTER to be virtual output.

API Version


4.3

See Also


ENVITask, ENVIFirstOrderEntropyTextureRaster, ENVILabelEntropyTextureRaster, LabelEntropyTexture Task, ENVIRankStrengthTextureRaster, RankStrengthTexture Task