Morphological image processing refers to the application of a set of non-linear operation(s) that is related to the shape (that is, morphology) of image features. These operations are particularly suited to the processing of binary images (where pixels are represented as 0 or 1 and, by convention, the foreground of the object = 1 or white, and the background = 0 or black) since they don't depend on the exact numerical values of the pixels; rather, they depend only on how the pixel values are relatively ordered—although these operations can be extended to grayscale images.
Hence, in this chapter, we will discuss binary image processing with morphological operations, although a few grayscale morphological operations will also be discussed, for the sake of completeness. In morphological operations, a structuring element (a small template image...