Python | Introduction and Installation of OpenCv


In this tutorial, we are learning about what is OpenCv and how OpenCV is installed in windows/linux system.


Have you ever seen Facebook’s auto-tag feature? Whenever you add an image on Facebook, it consequently labels those who are there within the image. Ever considered how that occurred. It happens all as a result of Computer Vision. OpenCv is a library which is utilized to recognize faces and distinguish them. Facebook’s auto-tag feature is one of the many examples where face recognition algorithm is used. Another instance is face unlock characteristic in our mobile phones. This feature uses Computer Vision to pick out and confirm humans by analyzing the unique features of their face.

Computer Vision

Computer Vision is a field that includes a technique for procuring, preparing, analyzing, and understanding images and finding concealed data in the picture. It copies the capacities of human vision by electronically perceiving and understanding an image
In the simplest terms, computer vision is the discipline of “teaching machines how to see.”

It is a field of artificial intelligence that trains computers to decipher and comprehend the visual world. Utilizing pictures from cameras and recordings and deep learning models, machines can precisely recognize and characterize objects — and afterwards, respond to what they “see.”

How computer vision works ?
Computer vision works in three basic steps:

1) Acquiring an image

Pictures, even huge sets, can be procured progressively through video, photographs or 3D technology for analysis.

2) Processing the image

Deep learning models automate lots of this process, however, the models are frequently trained by first being fed hundreds of categorized or pre-recognized pictures.

3) Understanding the image

The final step is the interpretative step, in which an object is identified or classified.


1) Sports – Hawk Eye

Hawk-Eye is a computer machine used in several sports together with cricket, tennis, etc., to visually observe the trajectory of the ball and display a profile of its statistically most likely direction as a shifting image.

2) Smart cars

Computer Vision in independent vehicles can prompt the planning and improvement of cutting edge and next-gen vehicles that could conquer riding limitations while guarding travellers. Such automobiles can delivery passengers to their destination wiping out human mediation.


OpenCV is the enormous open-source library for the computer vision, AI, and image processing and now it plays a main position in real-time operation which is very essential in today’s systems. By the usage of it, you’ll be able to process images and motion pictures to perceive objects, faces, or even handwriting of a human. When it included with various libraries, together with Numpy, python is capable of processing the OpenCV array structure for analysis. To Identify image pattern and its various features we use vector space and perform mathematical operations on these features.

The first OpenCV version was 1.0. OpenCV is launched beneath a BSD license and subsequently, it’s free for both educational and industrial use. It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. When OpenCV was designed the primary focus was real-time applications for computational efficiency. Everything is written in optimized C/C++ to take advantage of multi-core processing.

To install OpenCV, one must have Python and PIP, preinstalled on their system. To check if your system already contains Python, go through the following instructions:

Insall openCV on windows and linux

If you are using Windows then open the Command line(search for cmd in the Run dialogue (Windows Symbol + R). Or else open terminal in Ubuntu with Open the Ctrl+Alt+T
Now run the following command:

If Python is already installed, it will show a message with the Python version available.

PIP is the standard package manager for Python. We can use pip to install extra packages that are not available in the Python standard library.
PIP comes pre-installed on the Python versions 3.4 or older. To check if PIP is already installed on your system, just go to the command line and execute the following command:

Downloading and Installing OpenCV:

To install OpenCV, just go to the command-line and type the following command:

To check if OpenCV is correctly installed, just run the following commands to perform a version check:

If you are using Anaconda in that case:
Open the anaconda command prompt and type in below command.

That’s all about introduction and installation of opencv in Python.


Add Comment