Page 129 -
P. 129

Chapter 3 ■ Digital Morphology   103

















                                          (a)                 (b)              (c)           (d)
                               Figure 3.11: The use of opening. (a) An image having many connected objects. (b)
                               Objects can be isolated by opening using the simple structuring element. (c) An image
                               that has been subjected to noise. (d) The noisy image after opening, showing that the
                               black noise pixels have been removed.

                                 A closing is similar to an opening, except that the dilation is performed first,
                               followed by an erosion using the same structuring element. If an opening
                               creates small gaps in the image, a closing will fill them, or ‘‘close’’ the gaps.
                               Figure 3.12a shows a closing applied to the image of Figure 3.11d, which
                               you may remember was opened in an attempt to remove noise. The closing
                               removes much of the white pixel noise, giving a fairly clean image.











                                                                           (b)









                                          (a)                              (c)
                               Figure 3.12: The closing operation. (a) The result of closing Figure 3.11d using the simple
                               structuring element. (b) A thresholded image of a circuit board, showing broken traces. (c)
                               The same image after closing, showing that most of the breaks have been repaired.

                                 The same figure shows an application of a closing to reconnect broken
                               features. Figure 3.12b is a section of a printed circuit board that has been
                               thresholded. Noise somewhere in the process has resulted in the traces
   124   125   126   127   128   129   130   131   132   133   134