Filtering
Four types of filters are common to all iTools: Smooth filtering, Median Filtering, Convolution, and Unsharp Masking.
Smooth Filter
To remove unwanted noise from data, apply the Smooth filter to the data.
To apply the Smooth filter:
- Select the data that you want to smooth.
- Select Operations
Filter
Smooth.
- The smooth filter editor appears (as shown in the following figure) and desired settings can be edited.
Figure 7-7: The Smooth Filter Editor
Figure 7-7: The Smooth Filter Editor
|
- Click OK and the filter is applied.
Median Filter
Median smoothing replaces each point with the median (a value in an ordered set of values with an equal number of values above and below it) of the one- or two-dimensional neighborhood of a given width. It is similar to smoothing with a boxcar or average filter, but does not blur edges larger than the neighborhood. Median filtering is effective in removing "salt and pepper" noise (isolated high or low values).
To apply the Median filter:
- Select the data that you want to smooth.
- Select Operations
Filter
Median.
- The median filter editor appears (as shown in the following figure) and desired settings can be edited.
Figure 7-8: The Median Filter Editor
Figure 7-8: The Median Filter Editor
|
- Click OK and the filter is applied.
Convolution Filter
To convolve data:
- Select the data to be convolved.
- Select Operations
Filter
Convolution. The Convolution Kernel Editor dialog is displayed.
Figure 7-9: Convolution Kernel Editor
Figure 7-9: Convolution Kernel Editor
|
The dialog displays an image preview for two-dimensional data only. The View 1D slice option is always disabled when you use the editor with existing data. You have access to the option when you open the editor through the Operations Browser (see Convolution Properties).
- Change Convolution Kernel Editor settings as necessary by modifying any of the following items in the property sheet:
- Filter — select a filter type from the list. The default filter is Tent.
- Number of Columns (Rows) — edit if necessary.
- Center — position is centered by default. Select False to turn centering off.
- Auto normalize — scaling is automatic by default. To use a different scale factor, select False and enter a value in the Scale factor property field. You can also set Bias offset to add an offset that will be added to the results after Scale factor.
- Edge values — edges wrap around by default. To choose a different edge format, select Zero result, Repeat last value, or Zero pad from the list.
- Use invalid value — filtering missing data is off by default. To filter missing data using an invalid value, select True and enter the value in the Invalid value property field. You can also set Replacement value to give IDL a value that will replace missing results.
- Click OK to apply the filter with the current settings and close the Convolution Kernel Editor window, or click Cancel to close the window without applying the filter.
Unsharp Mask Filter
An unsharp-mask filter can be applied to any two-dimensional array or a TrueColor image. The unsharp mask enhances the contrast between neighboring pixels in an image, and is widely used for astronomical images and for digital photographs.
To apply the Unsharp Mask filter:
- Select the data that you want to unsharp mask.
- Select Operations
Filter
Unsharp Mask.
- The unsharp mask filter editor appears (as shown in the following figure) and desired settings can be edited.
Figure 7-10: The Unsharp Mask Filter Editor
Figure 7-10: The Unsharp Mask Filter Editor
|
- Click OK and the filter is applied.
IDL Online Help (March 01, 2006)