OpenCV Installation

In this tutorial we’ll learn how to install OpenCV on your PC. As we are using windows in this project we’ll install OpenCV on windows. If you are using any other OS you can install it accordingly.

How to install OpenCV on windows

Before Installing OpenCV make sure you have already installed python. You can use the following command to check whether python is installed or not.

python --version

If python is already installed it will show the version of python as output.

Python 3.10.0

Now, we’ll install OpenCV on our PC using the Command Prompt or VS code terminal. Use the following command to install OpenCV.

pip install opencv-python

After using this command OpenCV will get installed on our PC. now, lets import and use OpenCV.

How to Import and use OpenCV

First create a python file in VS Code and use the following expression to import OpenCV.

import cv2