Chapter 5. Transforming Images with Morphological Operations

In this chapter, we will cover the following recipes:

  • Eroding and dilating images using morphological filters
  • Opening and closing images using morphological filters
  • Applying morphological operators on gray-level images
  • Segmenting images using watersheds
  • Extracting distinctive regions using MSER

Introduction

Mathematical morphology is a theory that was developed in the 1960s for the analysis and processing of discrete images. It defines a series of operators that transform an image by probing it with a predefined shape element. The way this shape element intersects the neighborhood of a pixel determines the result of the operation. This chapter presents the most important morphological operators. ...

Get OpenCV 3 Computer Vision Application Programming Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.