Book Image

Mastering OpenCV 4 with Python

By : Alberto Fernández Villán
5 (1)
Book Image

Mastering OpenCV 4 with Python

5 (1)
By: Alberto Fernández Villán

Overview of this book

OpenCV is considered to be one of the best open source computer vision and machine learning software libraries. It helps developers build complete projects in relation to image processing, motion detection, or image segmentation, among many others. OpenCV for Python enables you to run computer vision algorithms smoothly in real time, combining the best of the OpenCV C++ API and the Python language. In this book, you'll get started by setting up OpenCV and delving into the key concepts of computer vision. You'll then proceed to study more advanced concepts and discover the full potential of OpenCV. The book will also introduce you to the creation of advanced applications using Python and OpenCV, enabling you to develop applications that include facial recognition, target tracking, or augmented reality. Next, you'll learn machine learning techniques and concepts, understand how to apply them in real-world examples, and also explore their benefits, including real-time data production and faster data processing. You'll also discover how to translate the functionality provided by OpenCV into optimized application code projects using Python bindings. Toward the concluding chapters, you'll explore the application of artificial intelligence and deep learning techniques using the popular Python libraries TensorFlow, and Keras. By the end of this book, you'll be able to develop advanced computer vision applications to meet your customers' demands.
Table of Contents (20 chapters)
Free Chapter
1
Section 1: Introduction to OpenCV 4 and Python
6
Section 2: Image Processing in OpenCV
12
Section 3: Machine Learning and Deep Learning in OpenCV
16
Section 4: Mobile and Web Computer Vision

Preface

In a nutshell, this book is about computer vision using OpenCV, which is a computer vision (and also machine learning) library, and the Python programming language. You may be wondering why OpenCV and Python? That is really a good question, which we address in the first chapter of this book. To summarize, OpenCV is the best open source computer vision library (BSD license—it is free for both academic and commercial use), offering more than 2,500 optimized algorithms, including state-of-the-art computer vision algorithms, and it also has machine learning and deep learning support. OpenCV is written in optimized C/C++, but it provides Python wrappers. Therefore, this library can be used in your Python programs. In this sense, Python is considered the ideal language for scientific computing because it stimulates rapid prototyping and has a lot of prebuilt libraries for every aspect of your computer vision projects.

As introduced in the previous paragraph, there are many prebuilt libraries you can use in your projects. Indeed, in this book, we use lots of them, showing you that it's really easy to install and use new libraries. Libraries such as Matplotlib, scikit-image, SciPy, dlib, face-recognition, Pillow, cvlib, Keras, TensorFlow, and Flask will be used in this book to show you the potential of the Python ecosystem. If this is the first time that you're reading about these libraries, don't worry, because we introduce hello world examples for almost all of these libraries.

This book is a complete resource for creating advanced applications with Python and OpenCV using various techniques, such as facial recognition, target tracking, augmented reality, object detection, and classification, among others. In addition, this book
explores the potential of machine learning and deep learning techniques in computer vision applications using the Python ecosystem.

It's time to dive deeper into the content of this book. We are going to introduce you to what this book covers, including a short paragraph talking about each chapter of the book. So, let's get started!