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:

111
111
111
010
111
010
101
010
101
111
1
1
1
001
010
100
100
010
001
111
101
111
11100
11100
11110
00110
00001
11101
11100
11110
00110
10000
10100
11101
11010
00111
10000
10101
01101
01110
10101
11001
0001000
0011100
0111110
1111111
0111110
0011100
0001000
0100010
1110111
0111110
0011100
0111110
1110111
0100010
1111111
1111111
1100011
1100011
1100011
1111111
1111111
0011100
0011100
1111111
1111111
1111111
0011100
0011100

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.