Learning OpenCV 5 Computer Vision with Python - Fourth Edition

Book description

Updated for OpenCV 5, this book covers the latest on depth cameras, 3D navigation, deep neural networks, and Cloud computing, helping you solve real-world computer vision problems with practical code

Key Features

  • Build powerful computer vision applications in concise code with OpenCV 5 and Python 3
  • Learn the fundamental concepts of image processing, object classification, and 2D and 3D tracking
  • Train, use, and understand machine learning models, and deploy them in the Cloud

Book Description

Computer vision is a rapidly evolving science in the field of artificial intelligence, encompassing diverse use cases and techniques. This book will not only help those who are getting started with computer vision but also experts in the domain. You'll be able to put theory into practice by building apps with OpenCV 5 and Python 3.

You'll start by setting up OpenCV 5 with Python 3 on various platforms. Next, you'll learn how to perform basic operations such as reading, writing, manipulating, and displaying images, videos, and camera feeds. From taking you through image processing, video analysis, depth estimation, and segmentation, to helping you gain practice by building a GUI app, this book ensures you'll have opportunities for hands-on activities. You'll tackle two popular challenges: face detection and face recognition. You'll also learn about object classification and machine learning, which will enable you to create and use object detectors and even track moving objects in real time. Later, you'll develop your skills in augmented reality and real-world 3D navigation. Finally, you'll cover ANNs and DNNs, learning how to develop apps for recognizing handwritten digits and classifying a person's gender and age, and you'll deploy your solutions to the Cloud.

By the end of this book, you'll have the skills you need to execute real-world computer vision projects.

What you will learn

  • Install and familiarize yourself with OpenCV 5's Python 3 bindings
  • Understand image processing and video analysis
  • Use a depth camera to distinguish foreground and background regions
  • Detect and identify objects, and track their motion in videos
  • Train and use your own models to match images and classify objects
  • Detect and recognize faces, and classify their gender and age
  • Build augmented reality applications, and navigate the real 3D world
  • Train neural networks and deploy them as Cloud-based solutions

Who this book is for

This OpenCV book is a good fit for Python programmers who want to get started with computer vision and machine learning. This book will also be useful for Computer vision and AI/ML developers who want to expand their OpenCV skills as well as experts who want to stay up-to-date with OpenCV 5.

Table of contents

  1. Learning OpenCV 5 Computer Vision with Python, Fourth Edition: Tackle tools, techniques, and algorithms for computer vision and machine learning
  2. 5 Detecting and Recognizing Faces
    1. Technical requirements
    2. Conceptualizing Haar cascades
    3. Getting Haar cascade data
    4. Using OpenCV to perform face detection
      1. Performing face detection on a still image
      2. Performing face detection on a video
    5. Performing face recognition
      1. Generating the data for face recognition
      2. Choosing a face recognition algorithm
      3. Loading the training data for face recognition
      4. Performing face recognition with Eigenfaces
      5. Performing face recognition with Fisherfaces
      6. Performing face recognition with LBPH
      7. Discarding results based on the confidence score
    6. Swapping faces in infrared
      1. Modifying the application's loop
      2. Masking a copy operation
    7. Summary
    8. Join our book community on Discord
  3. 6 Retrieving Images and Searching Using Image Descriptors
    1. Technical requirements
    2. Understanding types of feature detection and matching
      1. Defining features
    3. Detecting Harris corners
    4. Detecting DoG features and extracting SIFT descriptors
      1. Anatomy of a keypoint
    5. Detecting Fast Hessian features and extracting SURF descriptors
    6. Using ORB with FAST features and BRIEF descriptors
      1. FAST
      2. BRIEF
      3. Brute-force matching
      4. Matching a logo in two images
    7. Filtering matches using K-Nearest Neighbors and the ratio test
    8. Matching with FLANN
    9. Finding homography with FLANN-based matches
    10. A sample application – tattoo forensics
      1. Saving image descriptors to file
      2. Scanning for matches
    11. Summary
    12. Join our book community on Discord
  4. 7 Building Custom Object Detectors
    1. Technical requirements
    2. Understanding HOG descriptors
    3. Visualizing HOG
    4. Using HOG to describe regions of an image
    5. Understanding NMS
    6. Understanding SVMs
    7. Detecting people with HOG descriptors
    8. Creating and training an object detector
      1. Understanding BoW
      2. Applying BoW to computer vision
    9. Detecting cars
      1. Combining an SVM with a sliding window
    10. Summary
    11. Join our book community on Discord

Product information

  • Title: Learning OpenCV 5 Computer Vision with Python - Fourth Edition
  • Author(s): Joseph Howse, Joe Minichino
  • Release date: December 2024
  • Publisher(s): Packt Publishing
  • ISBN: 9781803230221