RXAnomalyDetection Task

This task uses the Reed-Xiaoli Detector (RXD) algorithm to identify the spectral or color differences between a region to test and its neighboring pixels or the entire dataset.

Example

; 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('RXAnomalyDetection')

 

; 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 the result

View = e.GetView()

Layer = View.CreateLayer(Task.OUTPUT_RASTER)

Syntax

Result = ENVITask('RXAnomalyDetection')

Input properties (Set, Get): ANOMALY_DETECTION_METHOD, INPUT_RASTER, KERNEL_SIZE, MEAN_CALCULATION_METHOD, OUTPUT_RASTER_URI, SUPPRESS_VEGETATION

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:

ANOMALY_DETECTION_METHOD (optional)

Specify one of the following strings, indicating which anomaly detection method to use. See the RX Anomaly Detection help topic for more detailed descriptions of each method. The default value is RXD.

INPUT_RASTER (required)

Specify a raster on which to perform anomaly detection.

KERNEL_SIZE (optional)

Specify the kernel size in pixels, around a given pixel that will be used to create a mean spectrum. Use an odd number. The minimum value is 3, and the maximum value is (number of columns - 1) less than (number of rows - 1). Specify KERNEL_SIZE only when using the Local option for MEAN_CALCULATION_METHOD. The default value is 9.

MEAN_CALCULATION_METHOD (optional)

Specify one of the following strings, indicating which mean calculation method to use. The default value is Global.

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 of the associated OUTPUT_RASTER. If you do not specify this property, or set it to an exclamation symbol (!), a temporary file will be created.

SUPPRESS_VEGETATION (optional)

Set this property to true to suppress vegetation anomalies in the RXD results. The options are true or false (default).

Version History

ENVI 5.2

Introduced

API Version

4.2

See Also

ENVITask