Edge enhancement filters, enhances the local discontinuities at the boundaries of different objects (edges) in the image. An edge in a signal is normally defined as the transition in the intensity or amplitude of that signal.
Most of the edge enhancement filters are thus based on first and second order derivatives and different gradient filters are also common to use.
The edge enhancement filters are divided in the following groups:
- Gradient (Roberts, Prewitt, Sobel , Pixel Difference)
The gradient of an image I(x,y) is defined along two orthogonal directions:
Gx(x,y) = ¶ I (x,y) / ¶x and Gy(x,y) = ¶ I (x,y) / ¶y
This operator is approximated in the discrete case as introduced by Roberts.
The output of such filters consists of positive and negative intensities and emphasizes the high frequency details of the image. When the sensitivity for noise is too high larger kernels should be considered to approximate the derivative operators.
The Roberts and Prewitt kernels are implemented by convolution with the different kernels to respectively enhance the edges at 0, 45, 90 and 135,… degrees.
Other typical kernels are the Sobel kernels.
This kernel focuses on the diagonal pixel differentials, which emphasizes corners more clearly, but can blur together small horizontal or vertical features.
This can also be seen in the shape of the kernel.
Example:
0 |
0 |
0 |
0 |
-1 |
0 |
0 |
1 |
0 |
The following example shows a zoomed part of an image containing some grain particles.
When selecting any of the buttons above the different gradients can be retrieved from the data. Here an output is shown with the corresponding result.
Below is seen the results for the Roberts filer applied in 5 orientations (N,E,S,SW and W).
Robers Edge enhancement filter example showing how the different directions can be highlighted
Considers the orthogonal and diagonal pixel differentials equally.
Example:
1 |
1 |
1 |
0 |
0 |
0 |
-1 |
-1 |
-1 |
Provides a more uniform edge enhancement, although it still gives increased weight to the orthogonal pixels over the diagonal pixels.
Example:
1 |
2 |
1 |
0 |
0 |
0 |
-1 |
-2 |
-1 |
The Pixel difference edge enhancement filter is very similar to the Roberts edge enhancement filter and the output will be alike, but for opposite directions.
0 |
0 |
0 |
0 |
1 |
0 |
0 |
-1 |
0 |