This task performs a simple atmospheric correction by subtracting a value from each band to account for atmospheric scattering (haze). The digital number (DN) to subtract from each band can be either the band minimum, an average based upon an region of interest (ROI), or a specific value. If the user does not provide an ROI or array of values, the band minimum is used.

Example


This example subtracts the band minimum DN value of each 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('DarkSubtractionCorrection')
   
  ; 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('DarkSubtractionCorrection')

Input parameters (Set, Get): INPUT_RASTER, OUTPUT_RASTER_URI, VALUES, ROI

Output parameters (Get only): OUTPUT_RASTER

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

Input Parameters


INPUT_RASTER (required)

Specify a raster on which to perform dark subtraction correction.

ROI (optional)

Specify an ROI of dark regions which contain the average value to subtract from each band.

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, or set it to an exclamation symbol (!), ENVI creates a temporary file.
  • If you set it to the hash symbol (#), ENVI creates a file in the temporary directory, but this file will not be deleted when ENVI closes.

VALUES (required)

Specify a digital number (DN) value or array of DN values to subtract from each band. The number of elements in the array must match the number of bands.

Output Parameters


OUTPUT_RASTER

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

Methods


Execute

Parameter

ParameterNames

Properties


DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History


ENVI 5.2

Introduced

ENVI 6.1

Added the ROI keyword and default band minimum.

See Also


ENVITask, ENVISubsetRaster, FlatFieldCorrection Task, IARReflectanceCorrection Task, QUAC Task, Masking Support in ENVITasks