The concept of filtering involves neighborhood operations work with the image pixel values in the neighborhood and the corresponding values of a sub-image that has the same dimensions as the neighborhood. The filter operation can be classified as:
Edge
Detection
Local discontinuities in image luminance from one level to another are called luminance edges, limited to image amplitude discontinuities between reasonably smooth regions. There are two major classes of differential edge detection: first- and second-order derivative. For the first-order class, some form of spatial first-order differentiation is performed, and the resulting edge gradient is compared to a threshold value. An edge is judged present if the gradient exceeds the threshold. For the second-order derivative class of differential edge detection, an edge is judged present if there is a significant spatial change in the polarity of the second derivative.
Sobel: The Sobel operator edge detector where the mask values of the north, south, east, and west pixels are doubled. The motivation for this weighting is to give equal importance to each pixel in terms of its contribution to the spatial gradient.
Roberts: Diagonal edge gradients can be obtained by forming running differences of diagonal pairs of pixels. This is the basis of the Roberts cross-difference operator:
Morphological Filters
Morphological image processing is a type of processing in which the spatial form or structure of objects within an image are modified. Dilation and erosion are three fundamental morphological operations.
Dilation: With dilation, an object grows uniformly in spatial extent, whereas with erosion an object shrinks uniformly.
Erosion: With erosion, an object shrinks uniformly.
Mode: The Mode filter is used to remove noise from an image by replacing pixels with the most frequently occurring pixel value selected from a certain window size.
Median: A median filter, which, as its name implies, replaces the value of a pixel by the median of the gray levels in the neighborhood of that pixel (the original value of the pixel is included in the computation of the median). Median filters are quite popular because, certain types of random noise, they provide excellent noise-reduction capabilities, with considerably less blurring than linear smoothing filters of similar size.
Smoothing Spatial Filters
Smoothing filters are used for blurring and for noise reduction. Blurring is used in preprocessing steps, such as removal of small details from an image prior to (large) object extraction, and bridging of small gaps in lines or curves. Noise reduction can be accomplished by blurring with a linear filter and also by nonlinear filtering.
Mean: The output of a mean, linear spatial filter is simply the average of the pixels contained in the neighborhood of the filter mask. These filters sometimes are called averaging filters or lowpass filters. A major use of averaging filters is in the reduction of “irrelevant” detail in an image. By “irrelevant” we mean pixel regions that are small with respect to the size of the filter mask.
Mode: The Mode filter is used to remove noise from an image by replacing pixels with the most frequently occurring pixel value selected from a certain window size.
Median: A median filter, which, as its name implies, replaces the value of a pixel by the median of the gray levels in the neighborhood of that pixel (the original value of the pixel is included in the computation of the median). Median filters are quite popular because, for certain types of random noise, they provide excellent noise-reduction capabilities, with considerably less blurring than linear smoothing filters of similar size.
Select PROCESSING → RASTER PROCESSING → FILTER in the main menu.
On the Layer field select the raster layer to apply the filter.
Filter parameters
Type: select the filter type to be applied on the image. Depending on the selected type different and additional parameters field will appear below, e.g., if a morphological filter is selected another parameter (Morph Type) appears and proper value should be setup
Iterations: Set the number of iterations.
In Bands select the desired bands to be processed.
Check in the Preview box to activate visualization of operation and click on the New ROI button to draw the area to be used by the filter operation.
If the user selects the User Mask Definition, it is allowed to define information about the mask being used.
Size: size of the mask matrix. Select mask to be used in filtering operation. Depending on the filter type, there will be different masks to be selected. The mask will be applied in the center position (i,j) where i is the number of rows and j is the number of columns on the image. It replaces the pixel value in position (i,j) by a new value that depends on the neighbor pixels and the mask weighs, generating a new image with removal of initial and final rows and columns.
Default Value: default value used in the mask.
The tool
shows a empty component that allows the definition of a mask with a
size defined by the user.
The tool
shows a component with previous mask defined by the user.
Output information
Repository -
Select one type of repository by
clicking on the
button to save the output layer as a file or on the
button to save it in the database.
Layer Name - inform the raster name.
Press the OK button to save the resulting filtered raster.
Note: Although the user can change the layer by selecting in the Layer Explorer, it does not change the layer selected in the filter interface.