How to install OpenCV for Python in Windows and Linux
In this Blog Post, we studied “How to install OpenCV for Python in Windows and Linux”.
OpenCV is an open-source python library and it is used in machine learning, computer vision, and image processing.
Now it is very useful in real-time applications, So it is very important to learn nowadays.
It was developed in 1999 by intel companies and supported by Willow Garage.
If you want to install OpenCV then you need python and pip installed in your system.
It can support huge languages such as c++, python, java, etc. and it will support multiple platforms and operating system such as Windows, Linux, and macOS.
This is very easier to integrate with other libraries Which use NumPy. Ex: SciPy and Matplotlib
OpenCV library is a wrapper class for the c++ library used with python language.
- Read images and Write images
- Capture videos and save videos
- Processing images
- Analyze the video
- Feature detection
- It can detect an object such as faces, eyes, cars, etc.
History of OpenCV:
- The OpenCV version 1.0 was released in the year 2006 and it is the first major version.
- OpenCV version 2 released in October 2009.
- In the year August 2012 The OpenCV was taken by a non-profit organization that is OpenCV.org
If you want to check a version of python or to check python is installed or not on the system then type the following command into the terminal.
If the python does not install then install it firstly
And if you want to check pip is install or not then type the following command into a terminal.
OpenCV can be directly installed using a package manager called pip.
To install it open a terminal and type following command.
pip install opencv-python
To check if OpenCV is installed or not then type the following command into the terminal
//So, firstly import cv2 library
//after that print version of OpenCV and run
For Linux You have to follows the same step as follows in windows.