Book Image

Python Image Processing Cookbook

By : Sandipan Dey
Book Image

Python Image Processing Cookbook

By: Sandipan Dey

Overview of this book

With the advancements in wireless devices and mobile technology, there's increasing demand for people with digital image processing skills in order to extract useful information from the ever-growing volume of images. This book provides comprehensive coverage of the relevant tools and algorithms, and guides you through analysis and visualization for image processing. With the help of over 60 cutting-edge recipes, you'll address common challenges in image processing and learn how to perform complex tasks such as object detection, image segmentation, and image reconstruction using large hybrid datasets. Dedicated sections will also take you through implementing various image enhancement and image restoration techniques, such as cartooning, gradient blending, and sparse dictionary learning. As you advance, you'll get to grips with face morphing and image segmentation techniques. With an emphasis on practical solutions, this book will help you apply deep learning techniques such as transfer learning and fine-tuning to solve real-world problems. By the end of this book, you'll be proficient in utilizing the capabilities of the Python ecosystem to implement various image processing techniques effectively.
Table of Contents (11 chapters)

Robust matching and homography with the RANSAC algorithm

Random Sample Consensus (RANSAC) is an iterative non-deterministic algorithm for the robust estimation of parameters of a mathematical model from several random subsets of inliers from the complete dataset (containing outliers). In this recipe, we will use the skimage.measure module's implementation of the RANSAC algorithm. Each iteration of the RANSAC algorithm does the following:

  1. It selects a random sample of a size of min_samples from the original data (hypothetical inliers) and ensures that the sample dataset is valid for fitting the model.

  2. It fits a model (that is, estimate the model parameters) to the sampled dataset and ensures that the estimated model is valid.

  3. It checks whether the estimated model fits to all of the other data points. Computes the consensus set (inliers) and the outliers from all of the...