Learn Python – How to install OpenCV in Python- Basic and advance

OpenCV is an open-source Python library, which used to apprehend the content of the digital image. The CV is the abbreviation structure of laptop vision. It extracts the description from the real-time photo or digital image, which may additionally be an object, a text description, and so on.

We can function many tasks the usage of the OpenCV library such as face detection, face recognition, blob detection, edge-detection, photo filter, template matching, and etc. To work with the OpenCV, we want to set up it in our Python environment.

Installation of OpenCV

Here, we installation the OpenCV the use of the following ways.

Using pip command

Using Anaconda

Using pip command

Open a command on the spot and type the following command.

pip install opencv-contrib-python --upgrade  

Or, we can deploy it barring extra module by the following command.

pip install opencv-python  

Now, we will confirm the suited installation of OpenCV. Import the cv2 module and print its version.

If it has top installed, then it will exhibit its version.

Using Anaconda

Anaconda is a software package of Python. Anaconda with Jupyter is a the satisfactory way to work with the OpenCV. First, we want to installation the Anaconda snap shots installer from its reliable site.

Now, choose a suitable bit installer.

Once down load is completed. Open the Anaconda instantaneous and type the following command.

conda install -c conda-forge opencv    

Then, hit the enter button and it will down load all rated OpenCV configuration.

Now, we are prepared to work with the OpenCV. You can examine complete OpenCV thru our OpenCV tutorial (https://www.javatpoint.com/opencv).