2.5 Morphology (Shape Based Operations) [1]
Morphological operations take a binary or sometimes a grey scale
image, plus a binary structuring element which is a local window which
defines the shape and center of the operator (similar to a convolution
kernel). The center is shown with a cyan background.
The structuring element or kernel is moved over the entire image in two
dimensional steps. The center of the kernel is placed over each pixel in the
image and a pixel value in the result image is calculated by the morphological
operation. Example kernels or structural elements:
1 | 1 | 1 | 0 | 0 |
1 | 1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 | 0 |
0 | 0 | 1 | 1 | 0 |
0 | 0 | 0 | 0 | 1 |
|
1 | 1 | 1 | 0 | 1 |
1 | 1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 | 0 |
0 | 0 | 1 | 1 | 0 |
1 | 0 | 0 | 0 | 0 |
|
1 | 0 | 1 | 0 | 0 |
1 | 1 | 1 | 0 | 1 |
1 | 1 | 0 | 1 | 0 |
0 | 0 | 1 | 1 | 1 |
1 | 0 | 0 | 0 | 0 |
|
1 | 0 | 1 | 0 | 1 |
0 | 1 | 1 | 0 | 1 |
0 | 1 | 1 | 1 | 0 |
1 | 0 | 1 | 0 | 1 |
1 | 1 | 0 | 0 | 1 |
|
0 | 0 | 0 | 1 | 0 | 0 | 0 |
0 | 0 | 1 | 1 | 1 | 0 | 0 |
0 | 1 | 1 | 1 | 1 | 1 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 |
0 | 1 | 1 | 1 | 1 | 1 | 0 |
0 | 0 | 1 | 1 | 1 | 0 | 0 |
0 | 0 | 0 | 1 | 0 | 0 | 0 |
|
0 | 1 | 0 | 0 | 0 | 1 | 0 |
1 | 1 | 1 | 0 | 1 | 1 | 1 |
0 | 1 | 1 | 1 | 1 | 1 | 0 |
0 | 0 | 1 | 1 | 1 | 0 | 0 |
0 | 1 | 1 | 1 | 1 | 1 | 0 |
1 | 1 | 1 | 0 | 1 | 1 | 1 |
0 | 1 | 0 | 0 | 0 | 1 | 0 |
|
1 | 1 | 1 | 1 | 1 | 1 | 1 |
1 | 1 | 1 | 1 | 1 | 1 | 1 |
1 | 1 | 0 | 0 | 0 | 1 | 1 |
1 | 1 | 0 | 0 | 0 | 1 | 1 |
1 | 1 | 0 | 0 | 0 | 1 | 1 |
1 | 1 | 1 | 1 | 1 | 1 | 1 |
1 | 1 | 1 | 1 | 1 | 1 | 1 |
|
0 | 0 | 1 | 1 | 1 | 0 | 0 |
0 | 0 | 1 | 1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 |
1 | 1 | 1 | 1 | 1 | 1 | 1 |
1 | 1 | 1 | 1 | 1 | 1 | 1 |
0 | 0 | 1 | 1 | 1 | 0 | 0 |
0 | 0 | 1 | 1 | 1 | 0 | 0 |
|
When the center of the kernel is not in the mathematical or physical center
of the kernel, the resulting image may seem displaced from the original. This
is guaranteed to happen if the kernel size is even - as it has no center pixel.
This is an issue when different processed images are to be combined. This is
usally handled by a translation operator when neeeded.
Without a special plug-in, the Photoshop Maximum and Minimum operators only
use a square kernel with origin at the center.