Chapter 5. 2-Dimensional Image Filtering

Up to this point, you should be able to use MATLAB at a novice level, to perform various useful image processing operations. It is now time to move on to more advanced image filtering processes and revisit some of the already covered ones. In this chapter, we will dig a little deeper into the image filtering theory and use some more complicated techniques to enhance our images. We will also provide some more information about the processes that you have already learned, so that you take a look behind the curtains and see what they really do. All the methods we will present, will once more be accompanied by hands-on examples that demonstrate their significance in both typical and more advanced image processing tasks.

In this chapter, we shall learn:

  • The basic theory on image filtering and processing pixel neighborhoods
  • How we can filter an image using convolution
  • Alternative ways to filter an image
  • Creating image filters in MATLAB
  • Using filters for image blurring
  • How to remove noise from images
  • Enhancing edges in images
  • Filtering only specific ROIs in an image

So, let's get started!

An introduction to image filtering

The truth is that, even though we did not explain the notion of filtering thoroughly, you have already performed several image filtering processes throughout the previous chapters. Morphological operations and edge detection are actually types of image filtering, even though we used them in a black box sense, without really looking under the hood. Hopefully, this approach will get you accustomed to the details of image filtering a little faster.

First of all, let's give a general definition of image filtering; it can be explained as the process of modifying the values of the pixels using a function that is typically applied on a local neighborhood of the image. In many situations, applying the function on a neighborhood involves a special operation, called convolution, with an operand called kernel. In this sense, you have already applied such a process in the case of erosion or dilation and even in the case of edge detection. The former processes used the strel function to create a kernel, while the latter used a kernel based on your choice of the edge detection method. But let's not get ahead of ourselves. We will try to take things one step at a time, starting by explaining neighborhood processing.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset