How to Install OpenCV in Ubuntu 20.04

OpenCV (Open Source Computer Vision Library) is an open-source computer vision library that supports all major operating systems and has bindings for C++, Python, and Java. It has multi-core processing capabilities and GPU acceleration for real-time operation.

OpenCV is used for a wide range of applications, including medical image analysis, stitching street view images, surveillance video, detecting and recognizing faces, tracking moving objects, extracting 3D models, and much more.

This tutorial will show you how to set install OpenCV on Ubuntu 20.04.

Step 1. Open the Terminal of your Ubuntu.

Step 2. Run sudo apt install libopencv-dev python3-opencv. That command will install all packages necessary to run OpenCV.

Step 3. Verify the installation by importing the cv2 module and printing the OpenCV version:

python3 -c “import cv2; print(cv2.version)”

Note :

The output must be 4.2.0.


Leave a Comment

Your email address will not be published. Required fields are marked *