Page 120 -
P. 120

94    Chapter 3 ■ Digital Morphology




















                                   (a)                     (b)                     (c)
                           Figure 3.5: Dilating an image using a structuring element. (a) The origin of the structuring
                           element is placed over the first black pixel in the image, and the pixels in the structuring
                           element are copied into their corresponding positions in the result image. (b) Then the
                           structuring element is placed over the next black pixel in the image and the process is
                           repeated. (c) This is done for every black pixel in the image.



                           3.3.3    Binary Erosion

                           If dilation can be said to add pixels to an object, or to make it bigger, erosion
                           will make an image smaller. In the simplest case, a binary erosion will remove
                           the outer layer of pixels from an object. For example, Figure 3.2b is the result of
                           such a simple erosion process applied to Figure 3.2c. This can be implemented
                           by marking all black pixels having at least one white neighbor and then
                           setting to white all the marked pixels. The structuring element implicit in this
                           implementation is the same 3x3 array of black pixels that defined the simple
                           binary dilation.
                             In general, the erosion of image A by structuring element B can be defined as


                                                     A   B ={c|(B) c ⊆ A}                 (EQ 3.11)
                             In other words, it is the set of all pixels c such that the structuring element
                           B translated by c corresponds to a set of black pixels in A. That the result of
                           an erosion is a subset of the original image seems clear enough; any pixels
                           that do not match the pattern defined by the black pixels in the structuring
                           element will not belong to the result. However, the manner in which the
                           erosion removes pixels is not clear, at least at first, so a few examples are
                           in order, and the statement above that the eroded image is a subset of the
                           original is not necessarily true if the structuring element does not contain the
                           origin.
   115   116   117   118   119   120   121   122   123   124   125