Prerequisite: Python Language Introduction
OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, faces, or even the handwriting of a human. When it integrated with various libraries, such as Numpuy, python is capable of processing the OpenCV array structure for analysis. To Identify image patterns and its various features we use vector space and perform mathematical operations on these features.
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:
Open the Command line(search for cmd in the Run dialog( + R).
Now run the following command:
If Python is already installed, it will generate a message with the Python version available.
If Python is not present, go through How to install Python on Windows? and follow the instructions provided.
PIP is a package management system used to install and manage software packages/libraries written in Python. These files are stored in a large “on-line repository” termed as Python Package Index (PyPI).
To check if PIP is already installed on your system, just go to the command line and execute the following command:
If PIP is not present, go through How to install PIP on Windows? and follow the instructions provided.
Downloading and Installing OpenCV:
OpenCV can be directly downloaded and installed with the use of pip (package manager). To install OpenCV, just go to the command-line and type the following command:
pip install opencv-python
Beginning with the installation:
- Type the command in the Terminal and proceed:
- Collecting Information and downloading data:
- Installing Packages:
- Finished Installation:
To check if OpenCV is correctly installed, just run the following commands to perform a version check:
python >>>import cv2 >>>print(cv2.__version__)
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- How to download and install Python Latest Version on Windows
- How to install Python on Windows?
- How to install Python Pycharm on Windows?
- How to install requests in Python - For windows, linux, mac
- How to Install Python Pandas on Windows and Linux?
- How to Install Python Tensorflow in Windows?
- Convert Python Code to a Software to Install on Windows Using Inno Setup Compiler
- How to Install CMake for Windows in Python?
- Python - Install Paramiko on Windows and Linux
- How to install OpenCV for Python in Linux?
- How to install PIP on Windows ?
- How to install Anaconda on windows?
- How to install Jupyter Notebook in Windows?
- How to Install Oracle Database 11g on Windows?
- How to Install SQLObject package on Windows and Linux?
- Opening multiple color windows to capture using OpenCV in Python
- OpenCV - Facial Landmarks and Face Detection using dlib and OpenCV
- Transition from OpenCV 2 to OpenCV 3.x
- Download and Install Python 3 Latest Version
- How to download and install Python Latest Version on Android
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.