What is OpenCV?
OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library. It has more than 2500 customized algorithms, which includes a comprehensive set of both classic and state-of-the-art computer vision and machine learning algorithms. These algorithms can be used to detect and recognize faces, identify objects, classify human actions in videos, track camera movements, track moving objects, stitch images together to produce a high-resolution image of an entire scene, find similar images.
So how to install Python & OpenCV so as they are compatible with each other is next big question. The latest version of python (at the time I am writing this article) is Python 3.7.0 and OpenCV 3.4.2.
What is Python?
Python is an object-oriented, interpreted, high-level programming language with dynamic semantics. It is simple, easy to learn and has readable coding feature. Python supports modules and packages, which encourages code reuse.
You can download it via the Internet browser in any Operating System by the links given below –
Python – https://www.python.org/ftp/python/3.7.0/python-3.7.0.exe
OpenCV – https://opencv.org/releases.html
Steps To Install Python –
Step 1) To download and install Python visit the official website of Python http://www.python.org/downloads/ and choose your version. We have chosen Python version 3.6.3
Step 2) Once the download is complete, run the exe for install Python. Now click on Install Now.
Step 3) You can see Python installing at this point.
Step 4) When it finishes, you can see a screen that says the Setup was successful. Now click on “Close”.
After the Installation is Complete just verify by typing Python in Windows Command Prompt as Python, if it shows enters into Python then setup was successful.
Now for OpenCV –
- Download OpenCV wheel from Python Extension Packages for Windows according to your platform (cp refers to your python version)
2. rename the whl to zip and extract the contents
3. Goto opencv_python-3.2.0.data\data\Lib\site-packages\ © all the files to the
5. Open Python Shell and type import cv2
Everything is installed without errors