This task builds an object detection raster from an input raster and an annotation file indicating features of interest.

This task is part of ENVI Deep Learning, which requires a separate license and installation.

Example


Sample data files are available on our ENVI Tutorials web page. Click the "Deep Learning" link in the ENVI Tutorial Data section to download a .zip file containing the data. Extract the contents of the .zip file to a local directory. Files are located in the object_detection directory.

; Start the application
e = ENVI()
 
; Open an input raster.
; Update the following line with the correct path
; to the tutorial data files
File = 'C:\MyTutorialFiles\DRCOG_AerialImage1.dat'
Raster = e.OpenRaster(File)
 
; Open an annotation file with bounding boxes
AnnFile = 'C:\MyTutorialFiles\Handicap_Parking_Spots1.anz'
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('BuildObjectDetectionRasterFromAnnotation')
 
; Define inputs
Task.INPUT_RASTER = Raster
Task.INPUT_ANNOTATION_URI = annFile
 
; Run the task
Task.Execute
 
; Add the output to the Data Manager
e.Data.Add, Task.OUTPUT_RASTER
 
; Display the result
View = e.GetView()
Layer = View.CreateLayer(Task.OUTPUT_RASTER)

Syntax


Result = ENVITask('BuildObjectDetectionRasterFromAnnotation')

Input properties (Set, Get): INPUT_ANNOTATION_URI, INPUT_RASTER, 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. See the ENVITask topic in ENVI Help.

  • AddParameter
  • Execute
  • Parameter
  • ParameterNames
  • RemoveParameters

Properties


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

See the ENVITask topic in ENVI Help for details.

This task also contains the following properties:

INPUT_ANNOTATION_URI (required)

Specify the annotation file indicating labeled rectangular bounding boxes for each class in the input raster.

INPUT_RASTER (required)

Specify the input raster.

OUTPUT_RASTER

This is a reference to the output raster of filetype ENVI and byte data type. If INPUT_RASTER is not byte data, then each band will be byte stretched to its minimum and maximum.

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.

Version History


1.2

Introduced

See Also


ENVIDeepLearningObjectDetectionRaster, TrainTensorFlowObjectDetectionModel Task, ENVIBoundingBoxSet, Bounding Boxes Background