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)

Summary

In this chapter, we saw some advanced concepts in CUDA that can help us to develop a complex application using CUDA. We saw the method for measuring the performance of the device code and how to see a detailed profile of the kernel function using the Nvidia Visual Profiler tool. It helps us in identifying the operation that slows down the performance of our program. We saw the methods to handle errors in hardware operation from the CUDA code itself, and we saw methods of debugging the code using certain tools. The CPU provides efficient task parallelism where two completely different functions execute in parallel. We saw that the GPU also provides this functionality using CUDA streams and achieves a twofold speedup on the same vector addition program using CUDA streams.

Then, we saw an acceleration of sorting algorithms using CUDA, which is an important concept to understand...