Book Image

Hands-On GPU-Accelerated Computer Vision with OpenCV and CUDA

By : Bhaumik Vaidya
Book Image

Hands-On GPU-Accelerated Computer Vision with OpenCV and CUDA

By: Bhaumik Vaidya

Overview of this book

Computer vision has been revolutionizing a wide range of industries, and OpenCV is the most widely chosen tool for computer vision with its ability to work in multiple programming languages. Nowadays, in computer vision, there is a need to process large images in real time, which is difficult to handle for OpenCV on its own. This is where CUDA comes into the picture, allowing OpenCV to leverage powerful NVDIA GPUs. This book provides a detailed overview of integrating OpenCV with CUDA for practical applications. To start with, you’ll understand GPU programming with CUDA, an essential aspect for computer vision developers who have never worked with GPUs. You’ll then move on to exploring OpenCV acceleration with GPUs and CUDA by walking through some practical examples. Once you have got to grips with the core concepts, you’ll familiarize yourself with deploying OpenCV applications on NVIDIA Jetson TX1, which is popular for computer vision and deep learning applications. The last chapters of the book explain PyCUDA, a Python library that leverages the power of CUDA and GPUs for accelerations and can be used by computer vision developers who use OpenCV with Python. By the end of this book, you’ll have enhanced computer vision applications with the help of this book's hands-on approach.
Table of Contents (15 chapters)

What this book covers

Chapter 1, Introduction to CUDA and Getting Started with CUDA, introduces the CUDA architecture and how it has redefined the parallel processing capabilities of GPUs. The application of the CUDA architecture in real-life scenarios is discussed. Readers are introduced to the development environment used for CUDA and how it can be installed on all operating systems.

Chapter 2, Parallel Programming Using CUDA C, teaches the reader to write programs using CUDA for GPUs. It starts with a simple Hello World program and then incrementally builds toward complex examples in CUDA C. It also covers how the kernel works and how to use device properties, and discusses terminologies associated with CUDA programming.

Chapter 3, Threads, Synchronization, and Memory, teaches the reader about how threads are called from CUDA programs and how multiple threads communicate with each other. It describes how multiple threads are synchronized when they work in parallel. It also describes constant memory and texture memory in detail.

Chapter 4, Advanced Concepts in CUDA, covers advanced concepts such as CUDA streams and CUDA events. It describes how sorting algorithms can be accelerated using CUDA, and looks at the acceleration of simple image-processing functions using CUDA.

Chapter 5, Getting Started with OpenCV with CUDA Support, describes the installation of the OpenCV library with CUDA support in all operating systems. It explains how to test this installation using a simple program. The chapter examines a performance comparison between image-processing programs that execute with and without CUDA support.

Chapter 6, Basic Computer Vision Operations Using OpenCV and CUDA, teaches the reader how to write basic computer vision operations such as pixel-level operations on images, filtering, and morphological operations using OpenCV.

Chapter 7, Object Detection and Tracking Using OpenCV and CUDA, looks at the steps for accelerating some real-life computer vision applications using OpenCV and CUDA. It describes the feature detection and description algorithms that are used for object detection. The chapter also covers the acceleration of face detection using Haar cascade and video analysis techniques, such as background subtraction for object tracking.

Chapter 8, Introduction to Jetson Tx1 Development Board and Installing OpenCV on Jetson TX1, introduces the Jetson TX1 embedded platform and how it can be used to accelerate and deploy computer vision applications. It describes the installation of OpenCV for Tegra on Jetson TX1 with Jetpack.

Chapter 9, Deploying Computer Vision Applications on Jetson TX1, covers deployment of computer vision applications on Jetson Tx1. It teaches the reader how to build different computer vision applications and how to interface the camera with Jetson Tx1 for video-processing applications.

Chapter 10, Getting started with PyCUDA, introduces PyCUDA, which is a Python library for GPU acceleration. It describes the installation procedure on all operating systems.

Chapter 11, Working with PyCUDA, teaches the reader how to write programs using PyCUDA. It describes the concepts of data transfer from host to device and kernel execution in detail. It covers how to work with arrays in PyCUDA and develop complex algorithms.

Chapter 12, Basic Computer Vision Application Using PyCUDA, looks at the development and acceleration of basic computer vision applications using PyCUDA. It describes color space conversion operations, histogram calculation, and different arithmetic operations as examples of computer vision applications.