FXSegmentation Task

This task allows you to extract segments only without performing classification. Segmentation is the process of partitioning an image into objects by grouping neighboring pixels with common values. The objects in the image ideally correspond to real-world features. Output includes a single-band label raster with an optional segmentation raster.

This task requires a separate license for the ENVI Feature Extraction; contact your sales representative for more information.

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('FXSegmentation')

 

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

Input parameters (Set, Get): INPUT_RASTER, KERNEL_SIZE, MERGE_ALGORITHM, MERGE_BANDS, MERGE_VALUE, OUTPUT_MEANS_RASTER_URI, OUTPUT_RASTER_URI, SEGMENT_ALGORITHM, SEGMENT_BANDS, SEGMENT_VALUE

Output parameters (Get only): OUTPUT_MEANS_RASTER, OUTPUT_RASTER

Properties marked as (Init) can be set during the initial creation of the object. Properties marked as (Get) can be retrieved. Properties marked as (Set) can be set after initial creation.

Input Parameters

INPUT_RASTER (required)

Specify a raster on which to perform segmentation and merging.

KERNEL_SIZE (optional)

Specify a texture kernel size, in pixels, around a given pixel that will be used to compute texture attributes. Use an odd number between 3 and 19 (e.g., 9 = 9x9 pixels). Specify a higher kernel size if you are segmenting large areas with little texture variance such as fields. Specify a lower size if you are segmenting smaller areas with higher variance such as urban neighborhoods. The default value is 3.0000000.

MERGE_ALGORITHM (optional)

Specify the merge method used to combine adjacent segments with similar spectral attributes.

MERGE_BANDS (optional)

Specify the bands for applying the merge settings.

MERGE_VALUE (optional)

Specify the merge level to combine segments with similar colors (Fast Lambda) or to merge over-segmented areas (Full Lambda Schedule). Increasing the value results in more merging. The default value is 0.000000 (no merging).

OUTPUT_MEANS_RASTER_URI (optional)

Specify a string with the fully qualified filename and path of the associated OUTPUT_MEANS_RASTER.

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

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 parameter, the output raster is only temporary. Once the raster has no remaining references, ENVI deletes the temporary file.

SEGMENT_ALGORITHM (optional)

Specify the segmentation method to use:

SEGMENT_BANDS (optional)

Specify an array of zero-based band numbers on which to apply the segmentation settings. For example, [0,1,2] indicates Band 1, Band 2, and Band 3.

SEGMENT_VALUE (optional)

Specify the scale level used to effectively delineate features of interest in segmentation. Increasing the value results in fewer segments; decreasing the value results in more segments. You should ensure that features of interest are not grouped into segments represented by other features. The default value is 50.0000.

Output Parameters

OUTPUT_MEANS_RASTER

This is a reference to the output for a multispectral image in ENVI raster format that shows the regions defined by segmentation.

This output will not be generated unless its associated URI input parameter is set.

OUTPUT_RASTER

This is a reference to the output for a single band label raster in ENVI format.

Methods

Execute

Parameter

ParameterNames

Properties

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History

ENVI 5.2

Introduced

See Also

ENVITask