Image Processing Toolbox    

Step 1: Read in Images

Read in the 'afmsurf.tif' image, which is an atomic force microscope image of a surface coating.

The image contains many objects of different sizes that are touching each other. Object detection in an image is an example of image segmentation. To segment touching objects, the Watershed transform is often used. If you view an image as a surface, with mountains (high intensity) and valleys (low intensity), the Watershed transform finds intensity valleys in an image.

To get the best result, maximize the contrast of the objects of interest to minimize the number of valleys found by the Watershed transform. A common technique for contrast enhancement is the combined use of the top-hat and bottom-hat transforms.

The top-hat transform is defined as the difference between the original image and its opening. The opening of an image is the collection of foreground parts of an image that fit a particular structuring element. The bottom-hat transform is defined as the difference between the closing of the original image and the original image. The closing of an image is the collection of background parts of an image that fit a particular structuring element.


  Example: Marker-Controlled Watershed Segmentation Step 2: Create the Structuring Element