Chapter 11. Analyzing Images

In this chapter, we will cover the following recipes:

  • Setting up OpenCV
  • Applying Scale-Invariant Feature Transform (SIFT)
  • Detecting features with SURF
  • Quantizing colors
  • Denoising images
  • Extracting patches from an image
  • Detecting faces with Haar cascades
  • Searching for bright stars
  • Extracting metadata from images
  • Extracting texture features from images
  • Applying hierarchical clustering on images
  • Segmenting images with spectral clustering

Introduction

Image processing is a very large field of study. The techniques used for image processing can often (with small changes) be applied to video analysis as well. We can view image processing as a special type of signal processing. Signal processing is covered in Chapter 6, Signal Processing and Timeseries. However, images pose special challenges, such as high dimensionality (we can define each image pixel to be a feature) and spatial dependence (pixel location matters).

The human visual system is very advanced compared to what computers can do. We are able to recognize objects, facial expressions, and object motion. Apparently, this has to do with predators and with their tendency to consume human flesh. Instead of trying to understand how human vision works, we will concentrate on finding features in images and clustering image pixels (segmenting) in this chapter.

In this chapter, we use the OpenCV library quite a lot, and since it is a fairly large library, I decided to create a special Docker container for this chapter only. As you probably know already, I made a Docker image called pydacbk. Well, the Docker container for this chapter is named pydacbk11.

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

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