X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



7874 Rate this article:
No rating

How ENVI Quick filters and Morphology filters differ

ENVI's "quick" filters that are applied from an image Display menu (Enhance ->Filter ->Sharpen/Smooth/Median) produce different results than the High Pass/Low Pass and Median filters available from the Filter ->Convolutions and Morphology menu on the main ENVI menu. This Help Article describes why you get different results using the two methods of applying filters.
 
The "quick" Sharpen filter (available from an image Display menu Enhance -> Filter ->Sharpen[n] ) is a 3x3 high pass filter with the value of "[n]" in the center. For example, the "Sharpen [10]" will use the following kernel:

kernel =
    [[-1,-1,-1, $
    -1,10,-1, $
    -1,-1,-1]]


The difference between the "quick" sharpen filter and the filters from the main ENVI Filter menu is that the ENVI routine CONV_DOIT calls CONVOL() with a scale factor for the "quick" filter:

result = CONVOL(data, kernel, total(kernel), /edge)

The High Pass filter available through the main ENVI menu via Filter ->Convolutions and Morphology, uses CONV_DOIT but doesn't use a scale factor. Instead, it will scale the kernel based on the add_back value. While add_back is similar to scaling, it isn't exactly the same thing.

The scale factor is used for the "quick" filter to keep the data range of the result within the input data range of the raw data. The stretch applied to the result in the display is still based on the raw data and not the resulting sharpened data. In the Convolutions and Morphology filters, there is no need to constrain the data with a scale factor because the output data type can easily be expanded (from byte to integer) to encompass the full range of the applied filter.

For the High Pass filter, it might be useful to apply the scale factor from the "quick" filter into our kernel for the "regular" filter:

kernel = kernel / total(kernel)

which gives a new kernel of:

kernel =
   [[-.5, -.5, -.5, $
    -.5, 5, -.5, $
    -.5, -.5, -.5]]


This produces *nearly* the same result as the "quick" filter except that if the input data to the "quick" filter is byte, different roundoffs will occur and some data will get clipped at zero.

The differences between the Smooth and Median "quick" filters (available from the Display Enhance menu) and their Low Pass and Median filter counterparts (available from the main ENVI Filter menu) are not as pronounced as those between the Sharpen/High Pass filters. This is because the output data range of these filters will not deviate as much from the input data range. The Low Pass and Median filters in ENVI use the IDL routines SMOOTH(n) and MEDIAN(n) (where the "[n]" referes to the kernel size) and will produce nearly identical results as the "quick" Smooth and Median filters.


Review on 12/31/2013 MM

Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »