CS 432 Project 5: Mathematical Morphology *

The goal of this project is quite simple to state: build a system which inputs an image of quarters, dimes, nickels and pennies (against a green background) and outputs the total monetary value of the coins. For example, given an image like the one below, your program should return $1.04. To accomplish this, you will use the mathematical morphology toolbox, MMACH.**

Technical Background

Consider two point sets, A and B. Set A might be an isolated region of a binary image (e.g., the result of a thresholding operation). Set B is termed a structuring element. In mathematical morphology, it plays a role analogous to a convolution kernel.

The binary image which results from eroding A by B is the set of points, (x,y), such that if B is translated so that its center is at (x,y), then B is completely contained in A. The binary image which results from dilating A by B is the set of points, (x,y), such that if B is translated so that its center is at (x,y), then its intersection with A is not empty.***

It is useful to observe the changes in the effect of the erosion and dilation operations if we add a small hole to A.

Note that the small hole has a huge effect on the result of the erosion process---it creates a large "gouge" in its side. The resulting shape is highly asymmetrical and much smaller than it otherwise would be. How might this affect subsequent erosion operations? In contrast, the result of the dilation process is essentially the same as before except that the small hole has been filled in.

Higher order morphological operations are implemented by applying lower order operations in sequence. For example, erosion followed by dilation is termed opening and dilation followed by erosion is termed closing. What is the effect of closing A with B?

Coin Images

Hints

What You Should Hand In

Nothing.

When You Should Hand It In

You will be required to demonstrate your working project to me, by appointment, sometime during the period, May 1-12. Your grade will be based on your project's performance on the nine test images.

* This webpage is located at http://cs.unm.edu/~williams/cs432/project5s00.html
** MMACH is written by Junior Barrera, Gerald Jean Francis Banon and Roberto de Alencar Lotufo.
*** These definitions are adapted from those described in Digital Image Processing by Ken Castleman.