Page 157 -
P. 157

Chapter 3 ■ Digital Morphology   131


                                 Because a grey-level opening will decrease the level of an object, the image
                               was opened with circular structuring elements of gradually increasing radius.
                               At some point, when the radius of the structuring element exceeds that of the
                               coin, the coin will be removed from the image. The radii actually used were
                               those from 5 to 14; opening by a circular structuring element of radius 14
                               actually removes all coins, leaving a dark and empty image.
                                 The first change is at radius 6.5 (diameter 13), where the dimes are reduced
                               in level sufficiently that thresholding can delete them. An opening using a
                               radius of 8 removes the pennies, allowing them to be counted. Finally, an
                               opening using a radius of 10 removes the quarters, leaving only the loon.
                               By counting the regions that vanish after each iteration, it should be possible
                               to accumulate the total value of the coins in the image. In many countries
                               the paper money also varies in size, allowing bills to be classified by size,
                               as well.



                               3.5 Color Morphology

                               Color can be used in two ways. As before, we can assume that the existence
                               of three color components (red, green, and blue) is an extension of the idea of
                               a grey level, or each color can be thought of as a separate domain containing
                               new information. In either case, morphology is not commonly applied to color
                               images, possibly because the construction of the structuring elements necessary
                               to perform a particular task is really quite complex. Color morphology will
                               only be touched on here through the use of a single example.
                                 Figure 3.33a is a grey-level version of a color image, which shows an insect
                               sitting on a leaf. Both the insect and the background are basically green, so
                               automatically locating the insect could be a little tricky. On close examination
                               of each of the three color basis images (red, green, and blue) it is observed that
                               there are slight variations in each component: the insect seems to be brighter
                               in the red and blue images, whereas the background is brighter in the green
                               image.
                                 Closing the red and blue images should brighten the insect further, and
                               opening the green image should suppress the background a little. A circular
                               structuring element with a radius of four was used in each case. Following the
                               closings and opening the three component images were recombined to form a
                               single color image. The insect is now a bright pinkish color, and can be seen in
                               sharp contrast to the darker green background. Figure 3.33e is a grey version
                               of this color image, but the insect is still clearly present. Using this image as a
                               mask of the original will give an isolated picture of the insect, or at least most
                               of it, as seen in Figure 3.33f.
   152   153   154   155   156   157   158   159   160   161   162