Let's, start with what is OpenCV. OpenCV or Open Source Computer Vision Library is an open-source and free to use library under the Apache 2.0 license. OpenCV is mainly used for computer vision, image processing, and machine learning tasks. The library was originally developed by Intel in 1999. OpenCV supports a variety of languages like C, Python, Java, etc., and can be used on Windows, Linux, Android, and Mac OS.
Although many programmers don't need to worry about processing images in their daily jobs, chances are that we may have to deal with images for small jobs. For instance, we may need to resize thousands of images to a particular size, or we may add a common background to all the images in a particular directory. Without a programmatic solution, these tasks are very tedious and time-consuming. In this article, I want to introduce five basic image manipulation techniques using the OpenCV library that are to address some of these needs. If you haven't installed OpenCV on your computer, you can install it very conveniently with the pip tool: pip install opencv-python.
OpenCV is released under a BSD license and hence it's free for both academic and commercial use. It has C, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for computational efficiency and with a strong focus on real-time applications. Written in optimized C/C, the library can take advantage of multi-core processing. Enabled with OpenCL, it can take advantage of the hardware acceleration of the underlying heterogeneous compute platform.
OpenCV is an integral part of machine vision. In this tutorial, you will learn to deploy the OpenCV library on a Raspberry Pi, using Raspbian Jessie for testing. You'll install OpenCV from source code in the Raspberry Pi board. To start building the OpenCV library from source code on Raspberry Pi, you'll first need to install development libraries. The benefit of this approach is that it isolates the existing Python development environment.
Alight, so you have the NVIDIA CUDA Toolkit and cuDNN library installed on your GPU-enabled system. Let's get OpenCV installed with CUDA support as well. While OpenCV itself doesn't play a critical role in deep learning, it is used by other deep learning libraries such as Caffe, specifically in "utility" programs (such as building a dataset of images). Simply put, having OpenCV installed makes it easier to write code to facilitate the procedure of pre-processing images prior to feeding them into deep neural networks. Because of this, we should install OpenCV into the same environment as our deep learning libraries, to at the very least, make our lives easier.