Page 156 -
P. 156

130   Chapter 3 ■ Digital Morphology


                             This method can be applied to a variety of textures, although some experi-
                           mentation with structuring elements may be needed to achieve good results.

                           3.4.5    Size Distribution of Objects

                           The use of morphology for segmenting regions by texture suggests another
                           application: the classification of objects by their size or shape. Because the use
                           of shape would require quite a bit of experimenting with different structuring
                           elements, size classification will be explored here. Quite a variety of objects
                           are regularly classified according to their size, from biological objects under a
                           microscope to eggs and apples. A ‘‘grade A large’’ egg, for example, should be
                           noticeably bigger than a ‘‘medium’’ egg, and it should be possible to create a
                           program for classifying eggs using grey-level morphology. However, because
                           eggs are often graded using their weight, we will examine another case close
                           to all of us — that of money.
                             As it happens, and not by accident, coins vary in size according to their
                           value. A dime is the smallest, and a one-dollar coin is, if you can find one, the
                           biggest. Figure 3.32a shows an image of a small collection of coins on a dark
                           background. It is a mixture of U.S. and Canadian coins, since it was easy to
                           obtain a Canadian one-dollar coin (called a loon), but a U.S dollar coin would
                           have worked as well.













                                       (a)                    (b)                    (c)











                                       (d)                    (e)                    (f)
                           Figure 3.32: Classifying coins by their size. (a) The image containing coins to be classified.
                           (b) After opening by a structuring element of radius 6. (c) After opening by radius 6.5. (d)
                           Thresholded version of (c), showing that the dimes can be removed. (e) After opening by
                           radius 8, showing that the pennies have been removed. (f) After opening by radius 10; the
                           only coin remaining is the one-dollar coin.
   151   152   153   154   155   156   157   158   159   160   161