Apply Convolutions and Morphology to apply convolution filters or morphology filters to image information. See the following sections:

  • Convolution Filters
    • Directional Filters
    • Gaussian High Pass Filters
    • Gaussian Depression Pass Filters
    • Loftier Pass Filters
    • Laplacian Filters
    • Low Laissez passer Filters
    • Median Filters
    • Roberts Filters
    • Sobel Filters
  • Morphology Filters
    • Binary Morphological Filters
    • Grayscale Morphological Filters

Convolution Filters


Convolution filters produce output images in which the brightness value at a given pixel is a part of some weighted average of the brightness of the surrounding pixels. Convolution of a user-selected kernel with the paradigm array returns a new, spatially filtered image. You can select the kernel size and values, producing different types of filters.

Note: To apply a custom convolution filter to a raster, use the RasterConvolution chore in the ENVI API.

Directional Filters

This is a outset derivative edge enhancement filter that selectively enhances image features having specific direction components (gradients). The sum of the directional filter kernel elements is zero. The result is that areas with uniform pixel values are zeroed in the output paradigm, while those that are variable are presented as bright edges.

You can likewise write a script to apply a directional filter to a raster, using the DirectionalFilter task.

  1. From the ENVI Toolbox, select Filter > Directional Filter. The Directional Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Optional: Specify a filter Add Back percentage value between 0.0 and ane.0. A value of 1.0 is equal to 100%.
  4. Optional: Specify a Kernel Size, in pixels. The default value is 3 x 3.
  5. Optional: Specify the directional Angle, in degrees. The default value is 0.
  6. Specify a filename and location for the Output Raster.
  7. Enable the Preview check box to see a preview of the settings before you click OK to process the information. The preview is calculated only on the surface area in the Image window. See Preview for details on the results. To preview a unlike expanse in your image, pan and zoom to the area of interest and reenable the Preview pick.
  8. Enable the Display result cheque box to display the output raster in the Image window when processing is complete. Otherwise, if the check box is disabled, the raster can be loaded from the Data Manager.
  9. To run the process on a local or remote ENVI Server, click the downwardly arrow and select Run Task in the Background or Run Chore on remote ENVI Server name. The ENVI Server Task Console will show the progress of the job and will provide a link to brandish the result when processing is complete. Run across the ENVI Servers topic for more information.

  10. Optional: Click Open in Modeler to encounter a model-based version of this tool that shows how the tool is constructed from private tasks.
  11. Click OK. ENVI adds the resulting output to the Data Manager and, if the Display Result check box was enabled, adds the layer to the Layer Manager and displays the output in the Image window.

Gaussian High Pass Filters

This filter uses unsharp masking to enhance local image variations. It operates by subtracting a depression pass (Gaussian Low Pass) version of the image to enhance the high frequency components.

You lot can besides write a script to apply a Gaussian loftier laissez passer filter to a raster, using the GaussianHighPassFilter task.

  1. From the ENVI Toolbox, select Filter > Gaussian High Pass Filter. The Gaussian High Laissez passer Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Optional: Specify a filter Add together Back percent value between 0.0 and ane.0. A value of 1.0 is equal to 100%.
  4. Optional: Specify a Kernel Size, in pixels. The default value is 3 10 3.
  5. Specify a filename and location for the Output Raster.
  6. Enable the Preview bank check box to run across a preview of the settings before you click OK to procedure the data. The preview is calculated simply on the area in the Image window. Run into Preview for details on the results. To preview a unlike surface area in your epitome, pan and zoom to the area of interest and reenable the Preview pick.
  7. Enable the Brandish event cheque box to display the output raster in the Prototype window when processing is consummate. Otherwise, if the check box is disabled, the raster can be loaded from the Data Manager.
  8. To run the process on a local or remote ENVI Server, click the down arrow and select Run Job in the Groundwork or Run Task on remote ENVI Server name. The ENVI Server Job Console will bear witness the progress of the job and volition provide a link to display the effect when processing is complete. See the ENVI Servers topic for more information.

  9. Optional: Click Open in Modeler to run into a model-based version of this tool that shows how the tool is constructed from individual tasks.
  10. Click OK. ENVI adds the resulting output to the Information Manager and, if the Brandish Consequence check box was enabled, adds the layer to the Layer Manager and displays the output in the Epitome window.

Gaussian Low Laissez passer Filters

This filter is used to smooth images. It uses a kernel defined by a 2d Gaussian function with standard deviation Due north/8.

Yous tin can also write a script to apply a low laissez passer filter to a raster, using the GaussianLowPassFilter task.

  1. From the ENVI Toolbox, select Filter > Gaussian Low Pass Filter. The Gaussian Low Pass Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Optional: Specify a filter Add together Back per centum value betwixt 0.0 and 1.0. A value of ane.0 is equal to 100%.
  4. Optional: Specify a Kernel Size, in pixels. The default value is 3 x 3.
  5. Specify a filename and location for the Output Raster.
  6. Enable the Preview check box to see a preview of the settings earlier you click OK to procedure the information. The preview is calculated only on the area in the Prototype window. See Preview for details on the results. To preview a unlike area in your image, pan and zoom to the area of interest and reenable the Preview option.
  7. Enable the Display consequence cheque box to display the output raster in the Image window when processing is complete. Otherwise, if the check box is disabled, the raster can exist loaded from the Data Manager.
  8. To run the process on a local or remote ENVI Server, click the down arrow and select Run Task in the Background or Run Task on remote ENVI Server name. The ENVI Server Task Console volition show the progress of the chore and will provide a link to display the effect when processing is consummate. Run across the ENVI Servers topic for more than information.

  9. Optional: Click Open in Modeler to see a model-based version of this tool that shows how the tool is synthetic from individual tasks.
  10. Click OK. ENVI adds the resulting output to the Data Managing director and, if the Brandish Result check box was enabled, adds the layer to the Layer Manager and displays the output in the Prototype window.

High Laissez passer Filters

This filter removes the low frequency components of an image while retaining the loftier frequency (local variations). It can enhance edges between different regions as well every bit to sharpen an image. It uses a kernel with a high central value, typically surrounded by negative weights. ENVI'southward default loftier laissez passer filter uses a 3 x 3 kernel with a value of 8 for the center pixel and values of -i for the outside pixels. Loftier pass filters can only have odd kernel dimensions.

You tin as well write a script to use a high laissez passer filter to a raster, using the HighPassFilter task.

  1. From the ENVI Toolbox, select Filter > High Pass Filter. The High Pass Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Optional: Specify a filter Add together Back percentage value between 0.0 and i.0. A value of 1.0 is equal to 100%.
  4. Optional: Specify a Kernel Size, in pixels. The default value is iii ten 3.
  5. Optional: In the Data Ignore Value field, specify a unique data value for pixels in the output raster that take a non-zero pixel country value.
  6. Specify a filename and location for the Output Raster.
  7. Enable the Preview check box to come across a preview of the settings before you click OK to process the data. The preview is calculated but on the surface area in the Image window. Run into Preview for details on the results. To preview a different area in your image, pan and zoom to the area of interest and reenable the Preview option.
  8. Enable the Brandish event bank check box to display the output raster in the Paradigm window when processing is complete. Otherwise, if the check box is disabled, the raster can be loaded from the Data Director.
  9. To run the process on a local or remote ENVI Server, click the downward arrow and select Run Task in the Background or Run Task on remote ENVI Server proper name. The ENVI Server Job Console will evidence the progress of the job and will provide a link to display the effect when processing is complete. Run into the ENVI Servers topic for more data.

  10. Click OK. ENVI adds the resulting output to the Data Director and, if the Display Event check box was enabled, adds the layer to the Layer Managing director and displays the output in the Epitome window.

Laplacian FIlters

This is a second derivative edge enhancement filter that operates without regard to border direction. Laplacian filtering emphasizes maximum values within the image by using a kernel with a high central value typically surrounded by negative weights in the north-south and eastward-west directions and zero values at the kernel corners. ENVI's default Laplacian filter uses a 3 x 3 kernel with a value of iv for the middle pixel and values of -1 for the n-south and east-w pixels. All Laplacian filters must have odd kernel sizes.

You can also write a script to apply a low pass filter to a raster, using the LaplacianFilter task.

  1. From the ENVI Toolbox, select Filter > Laplacian Filter. The Laplacian Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Optional: Specify a filter Add Dorsum percentage value betwixt 0.0 and 1.0. A value of 1.0 is equal to 100%.
  4. Optional: Specify a Kernel Size, in pixels. The default value is 3 10 3.
  5. Specify a filename and location for the Output Raster.
  6. Enable the Preview bank check box to encounter a preview of the settings earlier you lot click OK to process the information. The preview is calculated merely on the area in the Paradigm window. See Preview for details on the results. To preview a different area in your image, pan and zoom to the area of interest and reenable the Preview option.
  7. Enable the Display result check box to display the output raster in the Image window when processing is complete. Otherwise, if the check box is disabled, the raster can exist loaded from the Data Manager.
  8. To run the procedure on a local or remote ENVI Server, click the down arrow and select Run Task in the Background or Run Task on remote ENVI Server name. The ENVI Server Chore Console volition show the progress of the job and will provide a link to brandish the result when processing is complete. Come across the ENVI Servers topic for more than information.

  9. Click OK. ENVI adds the resulting output to the Data Manager and, if the Display Result check box was enabled, adds the layer to the Layer Manager and displays the output in the Prototype window.

Low Pass Filters

This filter reserves the depression frequency components of an image, which smoothes it. ENVI's low pass filter contains the aforementioned weights in each kernel element, replacing the center pixel value with an average of the surrounding values.

You can besides write a script to apply a low pass filter to a raster, using the LowPassFilter task.

  1. From the ENVI Toolbox, select Filter > Low Pass Filter. The Depression Laissez passer Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Optional: Specify a filter Add Back percentage value between 0.0 and 1.0. A value of 1.0 is equal to 100%.
  4. Optional: Specify a Kernel Size, in pixels. The default value is 3 ten 3.
  5. Optional: In the Data Ignore Value field, specify a unique data value for pixels in the output raster that have a non-zero pixel land value.
  6. Specify a filename and location for the Output Raster.
  7. Enable the Preview check box to see a preview of the settings before you click OK to process the information. The preview is calculated only on the area in the Image window. Run across Preview for details on the results. To preview a unlike area in your image, pan and zoom to the area of interest and reenable the Preview option.
  8. Enable the Display effect bank check box to display the output raster in the Image window when processing is complete. Otherwise, if the check box is disabled, the raster can be loaded from the Data Manager.
  9. To run the process on a local or remote ENVI Server, click the downwards arrow and select Run Job in the Groundwork or Run Task on remote ENVI Server name. The ENVI Server Job Console will show the progress of the job and volition provide a link to brandish the effect when processing is complete. See the ENVI Servers topic for more data.

  10. Click OK. ENVI adds the resulting output to the Information Manager and, if the Brandish Upshot check box was enabled, adds the layer to the Layer Manager and displays the output in the Prototype window.

Median Filters

This filter smooths an prototype, while preserving edges larger than the kernel dimensions (practiced for removing speckling noise). ENVI's Median filter replaces each center pixel with the median value (not to be confused with the average) within the neighborhood specified by the filter size.

You can likewise write a script to apply a Median filter to a raster, using the MedianFilter task.

  1. From the ENVI Toolbox, select Filter > Median Filter. The Median Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Optional: Specify a filter Add Dorsum percentage value between 0.0 and ane.0. A value of 1.0 is equal to 100%.
  4. Optional: Specify a square Window Size for median filtering. The default value is 3.
  5. Specify a filename and location for the Output Raster.
  6. Enable the Preview check box to meet a preview of the settings before yous click OK to process the data. The preview is calculated simply on the expanse in the Image window. See Preview for details on the results. To preview a unlike area in your image, pan and zoom to the area of interest and reenable the Preview option.
  7. Enable the Display outcome bank check box to display the output raster in the Image window when processing is complete. Otherwise, if the bank check box is disabled, the raster can be loaded from the Information Manager.
  8. To run the procedure on a local or remote ENVI Server, click the down pointer and select Run Task in the Background or Run Job on remote ENVI Server name. The ENVI Server Job Console volition show the progress of the task and will provide a link to display the outcome when processing is complete. See the ENVI Servers topic for more data.

  9. Click OK. ENVI adds the resulting output to the Data Manager and, if the Display Result bank check box was enabled, adds the layer to the Layer Manager and displays the output in the Prototype window.

Roberts Filters

This is a non-linear edge detector filter like to the Sobel. It is a special case filter that uses a preset ii x two approximation of the true Roberts office, a elementary, 2D differencing method for edge-sharpening and isolation.

You tin can likewise write a script to utilize a Roberts filter to a raster, using the RobertsFilter task.

  1. From the ENVI Toolbox, select Filter > Roberts Filter. The Roberts Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Optional: Specify a filter Add Back percentage value betwixt 0.0 and one.0. A value of i.0 is equal to 100%.
  4. Specify a filename and location for the Output Raster.
  5. Enable the Preview check box to see a preview of the settings before you lot click OK to procedure the information. The preview is calculated merely on the area in the Image window. See Preview for details on the results. To preview a different area in your image, pan and zoom to the area of interest and reenable the Preview selection.
  6. Enable the Display result bank check box to display the output raster in the Epitome window when processing is consummate. Otherwise, if the check box is disabled, the raster tin be loaded from the Data Manager.
  7. To run the process on a local or remote ENVI Server, click the down arrow and select Run Chore in the Groundwork or Run Chore on remote ENVI Server name. The ENVI Server Job Console volition show the progress of the job and will provide a link to display the outcome when processing is complete. Run into the ENVI Servers topic for more than information.

  8. Click OK. ENVI adds the resulting output to the Information Managing director and, if the Display Result bank check box was enabled, adds the layer to the Layer Manager and displays the output in the Epitome window.

Sobel Filters

This is a not-linear, border enhancement, special case filter that uses an approximation of the true Sobel function. It uses a preset iii ten 3, not-linear edge enhancement operator.

Y'all can also write a script to utilize a Sobel filter to a raster, using the SobelFilter task.

  1. From the ENVI Toolbox, select Filter > Sobel Filter. The Sobel Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Optional: Specify a filter Add together Dorsum per centum value between 0.0 and 1.0. A value of ane.0 is equal to 100%.
  4. Specify a filename and location for the Output Raster.
  5. Enable the Preview cheque box to see a preview of the settings earlier yous click OK to process the information. The preview is calculated merely on the area in the Epitome window. See Preview for details on the results. To preview a dissimilar area in your epitome, pan and zoom to the area of involvement and reenable the Preview option.
  6. Enable the Display result check box to brandish the output raster in the Image window when processing is complete. Otherwise, if the check box is disabled, the raster can be loaded from the Data Manager.
  7. To run the process on a local or remote ENVI Server, click the down arrow and select Run Chore in the Background or Run Task on remote ENVI Server proper noun. The ENVI Server Chore Console will evidence the progress of the chore and will provide a link to brandish the result when processing is complete. See the ENVI Servers topic for more information.

  8. Click OK. ENVI adds the resulting output to the Data Manager and, if the Display Result check box was enabled, adds the layer to the Layer Managing director and displays the output in the Image window.

Morphology Filters


Mathematical morphology filtering is a not-linear method of processing digital images on the footing of shape. Its principal goal is the quantification of geometrical structures. Morphological kernels used in ENVI are just the structuring chemical element and should not be dislocated with convolution kernels.

Reference: Haralick, Sternberg, and Zhuang. "Prototype Analysis Using Mathematical Morphology." IEEE Transactions on Pattern Analysis and Motorcar Intelligence PAMI-9, No. four (1987): 532-550.

Binary Morphological Filters

Use the Binary Morphological Filter tool to produce output pixels in black or white.

Yous tin also write a script to apply a binary morphological filter to a raster, using the BinaryMorphologicalFilter task.

  1. From the ENVI Toolbox, select Filter > Binary Morphological Filter. The Binary Morphological Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Select an choice from the Method drop-down list. The choices are:
    • Dilate: Unremarkably known as fill, expand, or grow, it fills holes smaller than the structural element (kernel) in a binary or grayness scale image. Use only with unsigned byte, unsigned long-integer, or unsigned integer data.
    • Erode: Commonly known equally compress or reduce, it removes islands of pixels smaller than the structural element (kernel) in a binary or grayness calibration epitome. Utilize only with unsigned byte, unsigned long-integer, or unsigned integer data.
    • Open: Smoothen the contours, break narrow isthmuses, and eliminate small islands and precipitous peaks or capes in an epitome. The opening of an image is divers as the erosion of the image followed by subsequent dilation using the same structural element. Using the Erode filter followed by using the Dilate filter produces the same result every bit using an Open filter.
    • Shut: Smooth the contours, fuse narrow breaks and long sparse gulfs, eliminate small holes, and make full gaps in the contours of an paradigm. The endmost of an prototype is defined as the dilation of the image followed past subsequent erosion using the same structural element. Using the Amplify filter followed by using the Erode filter produces the aforementioned result as using the Closing filter.
  4. Optional: Select a Kernel size for filtering, using the Cols and Rows field. The default value is three x three. You lot tin manage kernels every bit follows:
    • Click the Edit Kernel Values push to edit the elements of the kernel, using values of 0 or 1.
    • Click the Save Kernel push button to save the kernel to a JSON-formatted text file.
    • Click the Load Kernel push button to restore a kernel file.
  5. Optional: Specify the number of Iterations used to perform filtering.
  6. Specify a filename and location for the Output Raster.
  7. Enable the Preview cheque box to encounter a preview of the settings earlier you click OK to process the data. The preview is calculated only on the surface area in the Image window. See Preview for details on the results. To preview a different area in your image, pan and zoom to the area of interest and reenable the Preview selection.
  8. Enable the Display result check box to display the output raster in the Paradigm window when processing is consummate. Otherwise, if the check box is disabled, the raster can be loaded from the Data Managing director.
  9. To run the process on a local or remote ENVI Server, click the down arrow and select Run Task in the Background or Run Task on remote ENVI Server proper noun. The ENVI Server Task Console will prove the progress of the chore and will provide a link to display the result when processing is consummate. See the ENVI Servers topic for more information.

  10. Click OK. ENVI adds the resulting output to the Information Managing director and, if the Display Result cheque box was enabled, adds the layer to the Layer Manager and displays the output in the Image window.

Grayscale Morphological Filters

Use the Grayscale Morphological Filter tool to produce output pixels that retain a grayscale gradient.

Y'all can also write a script to apply a binary morphological filter to a raster, using the GrayscaleMorphologicalFilter task.

  1. From the ENVI Toolbox, select Filter > Grayscale Morphological Filter. The Grayscale Morphological Filter dialog appears.
  2. Select an Input Raster and perform optional spatial and spectral subsetting.
  3. Select an option from the Method drop-downward list. The choices are:
    • Amplify: Commonly known as fill, expand, or abound, it fills holes smaller than the structural element (kernel) in a binary or greyness scale image. Utilise simply with unsigned byte, unsigned long-integer, or unsigned integer information.
    • Erode: Commonly known equally shrink or reduce, it removes islands of pixels smaller than the structural chemical element (kernel) in a binary or greyness scale paradigm. Use only with unsigned byte, unsigned long-integer, or unsigned integer data.
    • Open: Smoothen the contours, break narrow isthmuses, and eliminate pocket-sized islands and sharp peaks or capes in an epitome. The opening of an epitome is defined as the erosion of the image followed by subsequent dilation using the aforementioned structural element. Using the Erode filter followed past using the Amplify filter produces the same outcome as using an Open filter.
    • Close: Smooth the contours, fuse narrow breaks and long sparse gulfs, eliminate small holes, and fill gaps in the contours of an image. The closing of an epitome is divers equally the dilation of the image followed by subsequent erosion using the same structural element. Using the Dilate filter followed past using the Erode filter produces the same issue equally using the Endmost filter.
  4. Optional: Select a Kernel size for filtering, using the Cols and Rows field. The default value is 3 ten 3. You can manage kernels every bit follows:
    • Click the Edit Kernel Values button to edit the elements of the kernel, using values of 0 or 1.
    • Click the Save Kernel push to save the kernel to a JSON-formatted text file.
    • Click the Load Kernel button to restore a kernel file.
  5. Optional: Specify the number of Iterations used to perform filtering.
  6. Specify a filename and location for the Output Raster.
  7. Enable the Preview bank check box to see a preview of the settings before you lot click OK to procedure the data. The preview is calculated but on the expanse in the Image window. See Preview for details on the results. To preview a different expanse in your image, pan and zoom to the area of interest and reenable the Preview option.
  8. Enable the Display result cheque box to display the output raster in the Epitome window when processing is complete. Otherwise, if the check box is disabled, the raster can be loaded from the Data Director.
  9. To run the process on a local or remote ENVI Server, click the downwards arrow and select Run Job in the Background or Run Task on remote ENVI Server name. The ENVI Server Job Console volition prove the progress of the task and will provide a link to brandish the result when processing is complete. See the ENVI Servers topic for more than information.

  10. Click OK. ENVI adds the resulting output to the Data Manager and, if the Brandish Result cheque box was enabled, adds the layer to the Layer Manager and displays the output in the Image window.

Related Topics


Adaptive Filters, Frequency Filters, Texture Filters