How to install OpenCV in Python?

OpenCVPythonServer Side ProgrammingProgramming

OpenCV is a Python library that is used to solve computer vision problems. Computer vision include understanding and analyzing digital images by the computer and process the images or provide relevant data after analyzing the image.

OpenCV is an open-source library used in machine learning and image processing.It performs tasks such as recognizing handwritten digits, human faces and objects.

To use OpenCV, we need to install it.

Step 1 − Make sure Python and pip is preinstalled on your system

Type the following commands in command prompt to check is python and pip is installed on your system.

To check Python

python --version

If python is successfully installed, the version of python installed on your system will be displayed.

To check pip

pip -V

The version of pip will be displayed, if it is successfully installed on your system.

Step 2 − Install OpenCV

OpenCV can be installed using pip. The following command is run in the command prompt to install OpenCV.

pip install opencv-python

This command will start downloading and installing packages related to the OpenCV library. Once done, the message of successful installation will be displayed.

raja
Published on 11-Mar-2021 09:36:14
Advertisements