Summary

In this chapter, we presented several useful morphology-based techniques for selecting regions of interest and masking an image. After visiting several examples based on the morphology theory, we also provided an introductory presentation of some powerful object analysis tools that can be used for several image processing applications such as image enhancement, object detection, image registration, and so on. The focus of this chapter was on hands-on, practical examples demonstrating the significance of the methods presented. More specifically, in this chapter we covered:

  • What binary images are and how we can create them using automatic thresholding techniques.
  • How we can refine a region of interest to better suit our needs, using dilation (imdilate) and erosion (imerode) to perform enlargement and shrinking, respectively.
  • What structuring elements are and how they affect the quality of dilation and erosion results.
  • What masking is and how we can use it to process specific regions of interest in an image.
  • How to manually select a region of interest in order to define better masks for our applications, using roipoly and imfreehand.
  • How to detect edges in a grayscale image using function edge.
  • How to detect corners in an image using function corner.
  • How to detect circles in an image with imfindcircles.

In the next chapter, we will expand the methods we have discussed so far to color image processing. We will produce new functions to implement our functions to color images and provide specialized solutions that take advantage of the extra information included in these cases. At the end of the chapter, you will be able to manipulate and process color pictures to produce results that look more appealing and even apply artistic effects that give your photographs a more professional look.