Thursday, 17 August 2017

Installing OpenCV on Linux


To install OpenCV in Debain/Ubuntu systems:
  1. Go to the following link and save the bash script on your system: bash script
  2. Open your terminals and change directory to where the bash script is saved
  3. Run the bash script using sudo bash file_name.sh ; where file_name is the name by which you have saved the script
  4. It may take quite a bit of time to install all the dependencies, depending on your system
  5. Once the installation is finished start Python on the bash terminal and enter import cv2
  6. If the above statement executes then CONGRATUALTIONS you have successfully installed OpenCV

Wednesday, 16 August 2017

Installing OpenCV on Windows



Before we get started with OpenCV, we need to choose a language. OpenCV supports C, C++, Python and Java.
Out of these, I would recommend Python as it is a very simple language and easy to understand.

So let's set up OpenCV with Python!

  1. Download Python 2.7.x from the official site
  2. Next we need to install some modules which we are going to use along with OpenCV. Instead of downloading them one by one, you can use anaconda to install all the SciPy packages.
  3. After installing everything open your python terminal. Enter import numpy and check that Numpy has been properly installed.
  4. Download OpenCV realease from here and run the executable.
  5.  Goto opencv/build/python/2.7 folder.
  6. Copy cv2.pyd to C:/Python27/lib/site-packages.
  7. Open Python terminal and enter import cv2 
  8. If the cv2 module is imported then you have installed OpenCV successfully. :) 
 

What is OpenCV?



OpenCV stands for Open Source Computer Vision, which is a library that contains functions which aid in real time computer vision tasks.

Currently OpenCV has C, C++, Python and Java interfaces.

It supports Windows, Linux, Mac OS, iOS and Android

The OpenCV library is written in C and C++, this allows it to take advantage of multi-core processing, thus making it efficient for computations in real time applications.

Terms:

- Computer Vision : Computer vision is analogous to human vision. It aims at giving computers a visual understanding of the world.

It enables computers to understand the real world in 3 dimensional form, the same way as humans do.

- Multi-core processing: Two or more CPUs working together on a same chip. So the entire task is divided into sub tasks called threads, these threads are then processed simultaneously by using multi-core processing.  

Installing OpenCV on Linux

To install OpenCV in Debain/Ubuntu systems: Go to the following link and save the bash script on your system: bash script Open your te...