An introduction to OpenCV

An introduction to OpenCV

By : Ebey Abraham

OpenCV (Open Source Computer Vision) is a library of programming functions aimed at real-time computer vision. The library is cross platform and free for use under the open source BSD license.

OpenCV supports a wide variety of programming languages such as C++, Python, Java, etc., and is available on different platforms including Windows, Linux, OS X, Android, and iOS. Interfaces for high-speed GPU operations based on CUDA and OpenCL are also under active development.

The Beauty of OpenCV

Now, if you are a sci-fi buff like me you will have wow’ed when team Flash identifies a criminal from their database by facial recognition, or how Jarvis analyzes the surrounding environment or how Felicity Smoak siphons useful data from security camera feed. Just think if could do all that, won’t it be most AWESOME thing ever. Now I know we cannot jump off straight to all these, but I’m adding a few beginner projects you can do using OpenCV.

  1. Finger-Drawing with OpenCV

  2. Finger-Counter in OpenCV

  3. Haar Cascade Object Detection Face & Eye - OpenCV with Python for Image and Video Analysis 16

Are you stupefied yet? Yes? Then let’s begin… (If your answer is no then you are an old grandma probably)


Now to install OpenCV, I have a shell script file that will download all the required files on the system. You can find the script file in my Github repo: Poirot1729/Open-CV

Which language to use?

I would prefer you choose from Python or C++ to begin with. With OpenCV-Python you would get almost the same execution time as with C++. This is because OpenCV-Python is a Python wrapper for the original OpenCV C++ implementation. So using Python gives you two advantages:

  1. The code is as fast as the original C++ code. Since it is the actual C++ code working in the background

  2. It is easier to code in Python than in C++.

But, if you use explicit functions in python, they would take the normal execution speed of Python and hence would be slower than C++.

Getting Started

To get started on your journey to become a sci-fi OpenCV superhero, I would suggest you to go through the official OpenCV tutorials first @ OpenCV-Python Tutorials

Apart from the Official documentation you can get help from the following links:

PyImageSearch Be awesome at learning OpenCV, Python, and computer vision

Learn OpenCV by Examples

Guess this would be enough fuel to start off on your first mission as an OpenCV Superhero. ;)

Share this