This task applies an enhanced Lee filter to a raster, to reduce speckling while preserving texture information. The enhanced Lee filter is an adaptation of the Lee filter and similarly uses local statistics (coefficient of variation) within individual filter windows.
Each pixel is put into one of three classes, which are treated as follows:
- Homogeneous: The pixel value is replaced by the average of the filter window.
- Heterogeneous: The pixel value is replaced by a weighted average.
- Point target: The pixel value is not changed.
Reference: Lopes, A., R. Touzi, and E. Nezry. "Adaptive Speckle Filters and Scene Heterogeneity." IEEE Transactions on Geoscience and Remote Sensing 28, No. 6 (1990): 992-1000.
Example
e = ENVI()
File = Filepath('elev_t.jpg', Subdir=['examples','data'])
Raster = e.OpenRaster(File)
Task = ENVITask('EnhancedLeeAdaptiveFilter')
Task.INPUT_RASTER = Raster
Task.WINDOW_SIZE = 5
Task.HOMOGENEOUS_CUTOFF = 0.0650
Task.HETEROGENEOUS_CUTOFF = 1.850
Task.DAMPING_FACTOR = 1.20
Task.Execute
DataColl = e.Data
DataColl.Add, Task.OUTPUT_RASTER
View = e.GetView()
Layer = View.CreateLayer(Task.OUTPUT_RASTER)
Syntax
Result = ENVITask('EnhancedLeeAdaptiveFilter')
Input properties (Set, Get): DAMPING_FACTOR, HETEROGENEOUS_CUTOFF, HOMOGENEOUS_CUTOFF, INPUT_RASTER, OUTPUT_RASTER_URI, WINDOW_SIZE
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:
DAMPING_FACTOR (required)
Specify a floating-point damping factor that inversely defines the extent of the exponential damping in the weighted average for the heterogeneous class. A larger damping factor produces less averaging.
HETEROGENEOUS_CUTOFF (optional)
Specify a floating-point value that represents the coefficient of variation cutoff for heterogeneous areas. The default value is 1.732.
HOMOGENEOUS_CUTOFF (optional)
Specify a floating-point value that represents the coefficient of variation cutoff for homogeneous areas. The default value is 0.523.
INPUT_RASTER (required)
Specify a raster on which to perform enhanced Lee adaptive filtering.
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.
WINDOW_SIZE (optional)
Specify a square filtering window size, in pixels. The default value is 3.
Version History
API Version
4.3
See Also
ENVITask, ENVISubsetRaster, AdditiveLeeAdaptiveFilter Task, AdditiveMultiplicativeLeeAdaptiveFilter Task, BitErrorAdaptiveFilter Task, EnhancedFrostAdaptiveFilter Task, FrostAdaptiveFilter Task, GammaAdaptiveFilter Task, KuanAdaptiveFilter Task, LocalSigmaAdaptiveFilter Task, MultiplicativeLeeAdaptiveFilter Task