Image Processing Masterclass with Python
eBook - ePub

Image Processing Masterclass with Python

50+ Solutions and Techniques Solving Complex Digital Image Processing Challenges Using Numpy, Scipy, Pytorch and Keras

Sandipan Dey

Compartir libro
  1. English
  2. ePUB (apto para móviles)
  3. Disponible en iOS y Android
eBook - ePub

Image Processing Masterclass with Python

50+ Solutions and Techniques Solving Complex Digital Image Processing Challenges Using Numpy, Scipy, Pytorch and Keras

Sandipan Dey

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Over 50 problems solved with classical algorithms + ML / DL models

Key Features

  • Problem-driven approach to practice image processing.
  • Practical usage of popular Python libraries: Numpy, Scipy, scikit-image, PIL and SimpleITK.
  • End-to-end demonstration of popular facial image processing challenges using MTCNN and Microsoft's Cognitive Vision APIs.

Description
This book starts with basic Image Processing and manipulation problems and demonstrates how to solve them with popular Python libraries and modules. It then concentrates on problems based on Geometric image transformations and problems to be solved with Image hashing. Next, the book focuses on solving problems based on Sampling, Convolution, Discrete Fourier transform, Frequency domain filtering and image restoration with deconvolution. It also aims at solving Image enhancement problems using different algorithms such as spatial filters and create a super resolution image using SRGAN.Finally, it explores popular facial image processing problems and solves them with Machine learning and Deep learning models using popular python ML / DL libraries.

What you will learn

  • Develop strong grip on the fundamentals of Image Processing and Image Manipulation.
  • Solve popular Image Processing problems using Machine Learning and Deep Learning models.
  • Working knowledge on Python libraries including numpy, scipy and scikit-image.
  • Use popular Python Machine Learning packages such as scikit-learn, Keras and pytorch.
  • Live implementation of Facial Image Processing techniques such as Face Detection / Recognition / Parsing dlib and MTCNN.

Who this book is for
This book is designed specially for computer vision users, machine learning engineers, image processing experts who are looking for solving modern image processing/computer vision challenges.

Table of Contents
1. Chapter 1: Basic Image & Video Processing
2. Chapter 2: More Image Transformation and Manipulation
3. Chapter 3: Sampling, Convolution and Discrete Fourier Transform
4. Chapter 4: Discrete Cosine / Wavelet Transform and Deconvolution
5. Chapter 5: Image Enhancement
6. Chapter 6: More Image Enhancement
7. Chapter 7: Face Image Processing

About the Author
Sandipan Dey is a Data Scientist with a wide range of interests, covering topics such as Machine Learning, Deep Learning, Image Processing and Computer Vision. He has worked in numerous data science fields, such as recommender systems, predictive models for the events industry, sensor localization models, sentiment analysis, and device prognostics. He earned his master's degree in Computer Science from the University of Maryland, Baltimore County, and has published in a few IEEE data mining conferences and journals. He has also authored a couple of Image Processing books, published from an international publication house. He has earned certifications from 100+ MOOCs on data science and related courses. He is a regular blogger (at sandipanweb @wordpress, medium and data science central) and is a Machine Learning education enthusiast. LinkedIn Profile: https://www.linkedin.com/in/sandipan-dey-0370276

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Image Processing Masterclass with Python un PDF/ePUB en línea?
Sí, puedes acceder a Image Processing Masterclass with Python de Sandipan Dey en formato PDF o ePUB, así como a otros libros populares de Computer Science y Software Development. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2021
ISBN
9789389898644

CHAPTER 1

Basic Image and Video Processing

Introduction

Image processing refers to the automatic processing, manipulation, analysis, and interpretation of images using algorithms and codes on a computer. Video processing refers to a special case of image processing that often employs video filters and where the input and output signals are video files or video streams. Image and video processing have applications in many disciplines and fields in science and technology such as television, photography, robotics, remote sensing, medical diagnosis (CT scan/X-Ray/MRI), and industrial inspection. Social networking sites such as Facebook and Instagram, which we have got used to in our daily lives and where we upload tons of images/videos every day, are typical examples of the industries that need to use/innovate many image/video processing algorithms to process the images/videos we upload.
In this chapter, we shall solve a few initial image and video processing problems that will help us understand the basic concepts of image and video processing. Before we start processing/analysing an image/video, we need to be able to load the image into memory using a suitable data structure and also be able to save the processed image/video back to the disk. It is also important to be able to visualize (plot) the image on the computer screen (to see the impact of an image processing algorithm on an image immediately). Often an image/a video needs to be pre-processed before it can be used in some complex image/video processing algorithms (such as classification or segmentation that you will get to know more in the later chapters); some transformation/manipulation techniques (such as resizing/cropping/changing brightness and contrast) are very useful. Similarly, as a post-processing step, we may need to apply some image/video manipulation/transformation techniques to get back the desired output. With image transformation and manipulation, we can also enhance the appearance of an image (for example, by applying a filter).
In this chapter, you are going to learn how to use different Python libraries (numpy, scipy, scikit-image, opencv-python, and matplotlib) for basic image/video processing, manipulation, and transformation. We shall start by displaying the three channels of an RGB image with 3D visualizations. Next, we shall demonstrate how to capture a video from a camera and extract frames. Then, we shall show how to implement Instagram-like Gotham filter. Finally, we shall explore the following few problems on image manipulations and see how to solve them using python libraries:
  • Plot image montage, crop/resize images, and draw contours
  • Convert PNG image with a palette to grayscale
  • Rotate an image and convert RGB to YUV color space (using scikit-image, PIL, python-opencv, and scipy.ndimage/misc)

Structure

This chapter is organized as follows:
  • Objectives
  • Problems
    Display RGB image color channels in 3D
    Video I/O
    Read/write video files
    Capture video from camera and extract frames with OpenCV-Python
    Implement Instagram-like Gotham filter
    Explore image manipulations (using scikit-image, PIL, python-opencv, and scipy ndimage/misc)
    Plot image montage with scikit-image
    Crop/resize images with SciPy ndimage module
    Draw contours with OpenCV-Python
    Counting objects in an image
    Convert a PNG image with a palette to grayscale with PIL
    Different ways to convert an RGB image to grayscale
    Rotating an image with scipy.ndimage
    Image differences with PIL
    Converting RGB to HSV and YUV color spaces with scikit-image
    Resizing an image with OpenCV-Python
    Add a logo to an image with scikit-image
    Change brightness/contrast of an image with linear transformation and gamma correction with OpenCV-Python
    Detecting colors and changing colors of objects with OpenCV-Python
    Object removal with seam carving
    Creating fake miniature effect
  • Summary
  • Questions
  • Key terms
  • References

Objectives

After studying this Chapter, you should be able to:
  • Understand the image/video storage and data structures in python
  • Do image/video file I/O in python using different libraries
  • Write python code to do basic image/video manipulations

Problems

Display RGB image color channels in 3D

It is very useful to be able to conceptualize an image as a function and visualize it to understand what it is and then do further analysis/processing. A grayscale image can be thought of a 2-D function f(x, y) of the pixel locations (x, y), a function that maps each pixel into its corresponding grey level (for example, an integer in [0,255] or equivalently a floating-point number in [0,1]), that is:
f : (x, y)R
For an RGB image, there are three such functions that can be denoted as:
fR (x, y), fG (x. y) and fB(x. y)
which is corresponding to each of the channels R, G, and B, respectively. The library matplotlib’s 3-D plot functions can be used to plot each of these functions. The following Python code shows how to plot the RGB channels separately in 3D.
The following are the steps you need to follow:
  1. First, start by importing all the required packages by using the following code. For reading an image, we need the imread() function from the scikit-image library’s io module. For array operations, ...

Índice