GBDX

ENVI® Grayscale Morphological Filter

This task performs grayscale morphological filtering on an ENVIRaster.

GBDX Registered Name: ENVI_GrayscaleMorphologicalFilter
Provider: Harris Geospatial Solutions

Table of Contents

Section Description
Imagery Examples Before and after examples.
Quickstart Get started with a Python-based quickstart tutorial.
Inputs Required and optional task inputs.
Outputs Task outputs and example contents.
Known Issues Issues users should be aware of.
Contact Contact information.

Imagery Examples

Before: WorldView 3 Pan imagery

Before: WorldView 3 Pan imagery

After: Output from ENVI Grayscale Morphological Filtering. Note the road lines.

After: Output from ENVI Grayscale Morphological Filtering. Note the road lines.

Quickstart

This is a workflow example for basic processing.

# Quickstart Example running the task name.

# Initialize the Environment.
from gbdxtools import Interface
gbdx = Interface()

tasks = []
cat_id = '103001006FB33600'
aop_output_location = 'ENVI/Grayscale_Morphological_Filter/aop/'
task_output_location = 'ENVI/Grayscale_Morphological_Filter/task/'

# Auto ordering task parameters
order = gbdx.Task("Auto_Ordering")
order.inputs.cat_id = cat_id
order.impersonation_allowed = True
order.persist = True
order.timeout = 36000
order_data_loc = order.outputs.s3_location.value
tasks.append(order)

# AOP task parameters
aop_task = gbdx.Task("AOP_Strip_Processor")
aop_task.inputs.data = order_data_loc
aop_task.inputs.enable_acomp = False
aop_task.inputs.enable_dra = False
aop_task.inputs.enable_pansharpen = False
aop_task.inputs.bands = 'PAN'
aop_task_output = aop_task.outputs.data.value
tasks.append(aop_task)

# ENVI Greyscale Morphological Filter parameters
envi_greyscale_morph_task = gbdx.Task('ENVI_GrayscaleMorphologicalFilter')
envi_greyscale_morph_task.inputs.input_raster = aop_task_output
envi_greyscale_morph_task.inputs.method = 'Erode'
tasks.append(envi_greyscale_morph_task)

# Set up workflow save data
workflow = gbdx.Workflow(tasks)
workflow.savedata(aop_task.outputs.data, location=aop_output_location)
workflow.savedata(envi_greyscale_morph_task.outputs.task_meta_data, location=task_output_location)
workflow.savedata(envi_greyscale_morph_task.outputs.output_raster_uri, location=task_output_location)

# Execute workflow
workflow.execute()

Inputs

The following table lists all ENVI_GrayscaleMorphologicalFilter inputs.
Mandatory (optional) settings are listed as Required = True (Required = False).

Name Required Default Valid Values Description
file_types False N/A string GBDX Option. Comma seperated list of permitted file type extensions. Use this to filter input files -- Value Type: STRING[*]
input_raster True N/A directory Specify a raster on which to perform morphological filtering. -- Value Type: ENVIRASTER
input_raster_format False N/A See ENVIRASTER input type Provide the format of the image, for example: landsat-8. -- Value Type: STRING
input_raster_band_grouping False N/A See ENVIRASTER input type Provide the name of the band grouping to be used in the task, ie - panchromatic. -- Value Type: STRING
input_raster_filename False N/A See ENVIRASTER input type Provide the explicit relative raster filename that ENVI will open. This overrides any file lookup in the task runner. -- Value Type: STRING
kernel False [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]] string Specify a structuring element for the morphological process. Each finite element in the array is either subtracted from (in erosion) or added to (in dilation) the associated pixels. NaN or Infinite values imply pixels that are not included in the computation. If no KERNEL is specified, a 3 x 3 array will be used with a value of 0 for all of the array elements, indicating that all pixels will be used without addition or subtraction. -- Value Type: FLOATARRAY -- Default Value: [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]]
iterations False 1 string Specify the number of iterations used to perform the morphological operation. -- Value Type: INT -- Default Value: 1
method True N/A string Specify the filter method. -- Value Type: STRING
output_raster_uri_filename False N/A string Specify a string with the fully-qualified path and filename for OUTPUT_RASTER. -- Value Type: STRING

Outputs

The following table lists all ENVI_GrayscaleMorphologicalFilter outputs.
Mandatory (optional) settings are listed as Required = True (Required = False).

Name Required Default Valid Values Description
task_meta_data False N/A directory GBDX Option. Output location for task meta data such as execution log and output JSON
output_raster_uri True N/A directory Output for OUTPUT_RASTER. -- Value Type: ENVIURI

Output structure

The output_raster image file will be written to the specified S3 Customer Account Location in GeoTiff (.tif) format, with an ENVI header file (.hdr).

Issues

None at this time.

Background

For additional background information on this task please refer to the Harris Geospatial ENVI documentation and
ENVI® Grayscale Morphological Filter.

Contact

If you have any questions or issues with this task, please contact gbdx-support@digitalglobe.com.

ENVI® Grayscale Morphological Filter

This task performs grayscale morphological filtering on an ENVIRaster.

GBDX Registered Name: ENVI_GrayscaleMorphologicalFilter
Provider: Harris Geospatial Solutions