Book Image

Computer Vision with OpenCV 3 and Qt5

By : Amin Ahmadi Tazehkandi
4 (1)
Book Image

Computer Vision with OpenCV 3 and Qt5

4 (1)
By: Amin Ahmadi Tazehkandi

Overview of this book

Developers have been using OpenCV library to develop computer vision applications for a long time. However, they now need a more effective tool to get the job done and in a much better and modern way. Qt is one of the major frameworks available for this task at the moment. This book will teach you to develop applications with the combination of OpenCV 3 and Qt5, and how to create cross-platform computer vision applications. We’ll begin by introducing Qt, its IDE, and its SDK. Next you’ll learn how to use the OpenCV API to integrate both tools, and see how to configure Qt to use OpenCV. You’ll go on to build a full-fledged computer vision application throughout the book. Later, you’ll create a stunning UI application using the Qt widgets technology, where you’ll display the images after they are processed in an efficient way. At the end of the book, you’ll learn how to convert OpenCV Mat to Qt QImage. You’ll also see how to efficiently process images to filter them, transform them, detect or track objects as well as analyze video. You’ll become better at developing OpenCV applications.
Table of Contents (19 chapters)
Title Page
Dedication
Packt Upsell
Foreword
Contributors
Preface

Chapter 1. Introduction to OpenCV and Qt

In its most basic form and shape, Computer Vision is the term that is used to identify all methods and algorithms that are used to empower digital devices with a sense of vision. What does that mean? Well, it means exactly what it sounds like. Ideally, computers should be able to see the world through the lens of a standard camera (or any other type of camera for that matter), and by applying various Computer Vision algorithms, they should be able to detect faces, even recognize them, count objects in an image, detect motion in video feeds, and do many more, which, at first guess, would only be expected of a human being. So, to understand what Computer Vision really is, it's better to know that Computer Vision aims to develop methods to achieve the ideal that was mentioned, empowering digital devices with the power of seeing and understanding the surrounding environment. It is worth noting that most of the time Computer Vision and Image Processing are used interchangeably (although, a historical study of the subject may prove that it should be otherwise). But nevertheless, throughout this book we'll stick to the term Computer Vision since that is the more popular and widely used term nowadays in computer science communities and also because, as we'll see later in this chapter, Image Processing is a module of OpenCV library that we'll also be introduced to in the upcoming pages of this chapter, and it will also be covered in a complete chapter of its own.

Computer Vision is one of the today's most popular subjects in computer science and it's used in a variety of applications ranging from medical tools that detect cancerous tissues to video editing software that helps make all those shiny music videos and movies, and from military grade target detectors that help locate a specific location on the map to traffic sign detectors that help driverless cars find their way around. Well, it's obvious that we can't finish naming all possibilities for Computer Vision, but we can be sure it's an interesting subject that will be around for a long time. It's also worth mentioning that there is a fast-expanding market for jobs and careers in the field of Computer Vision and it's growing day by day.

Among the most popular tools used by Computer Vision developers and experts, come two of the most prominent frameworks of open source community, which are also in the title of the book you have in hand, OpenCV and Qt. Every day, literally thousands of developers around the world, ranging from established corporations to innovative startup companies, work with these two frameworks to build applications for various sets of industries, such as the ones we mentioned, and that is exactly what you will learn in this book.

In this chapter, we will cover the following topics:

  • Introducing Qt, an open source, and cross-platform application development framework
  • Introducing OpenCV, an open source, and cross-platform computer vision framework
  • How to install Qt on Windows, macOS, and Linux operating systems
  • How to build OpenCV from sources on Windows, macOS, and Linux operating systems
  • Configuring your development environment to build applications using a combination of both Qt and OpenCV frameworks
  • Build your very first application using Qt and OpenCV