How to install OpenCV Contrib Python
Last Updated :
29 Apr, 2024
OpenCV (Open Source Computer Vision Library) is a powerful open-source computer vision and machine learning software library. It provides various tools and algorithms for image and video processing, object detection, feature extraction, and more. OpenCV Contrib is an extension module that includes additional functionalities and algorithms contributed by the community. In this article, we will see how we can install OpenCV Contrib Python.
What is OpenCV Contrib Library in Python?
OpenCV Contrib is an extension of the OpenCV (Open Source Computer Vision) library in Python. It extends the capabilities of the OpenCV library in Python by offering additional features and modules. These extras aren't in the main OpenCV library for reasons like being experimental, serving niche needs, or relying on third-party tools. With these added modules, you can do a lot more in computer vision, like detecting features, tweaking images, tracking objects, diving into machine learning, and much more.
Installing OpenCV Contrib Python
Below are the step-by-step procedure by which we can install OpenCV contrib in Python:
Step 1: Install OpenCV
Before installing OpenCV Contrib, you need to install OpenCV itself. You can do this using pip, Python's package manager, with the following command:
pip install opencv-python
This command will install the main OpenCV package, which includes essential modules for image and video processing.
Output:

Step 2: Install OpenCV Contrib
Alternating, we use pre-built binaries that include OpenCV Contrib modules. These binaries are available for different platforms and Python versions. You can install them using pip:
pip install opencv-contrib-python
This command will install both OpenCV and OpenCV Contrib as pre-built binaries, saving you the hassle of building from source.
Output:

Similar Reads
How to Install OpenCV for Python in Linux? Prerequisite: Python Language Introduction OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in todayâs systems. By using it, one can process images and videos to identify ob
2 min read
How to Install OpenCV Python Headless? OpenCV (Open Source Computer Vision Library) is a powerful open-source computer vision and machine learning software library. It enables developers to access a wide range of algorithms for various computer vision tasks. In this article, we will see how to install OpenCV Python Headless. What is Open
2 min read
How to Install OpenCV for Python on Windows? Prerequisite: Python Language Introduction  OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in todayâs systems. By using it, one can process images and videos to identify
4 min read
How to Install Python on Linux This guide explains how to install Python on Linux machines. Python has become an essential programming language for developers, data scientists, and system administrators. It's used for various applications, including web development, data science, automation, and machine learning.This comprehensiv
15+ min read
How to install OpenCV for Visual Studio Code and Python? OpenCV is a powerful computer vision library widely used for image and video processing tasks. Integrating OpenCV with Visual Studio Code (VS Code) allows developers to leverage their capabilities within a familiar development environment. In this article, we will see how we can install OpenCV for V
1 min read
How to Install OpenCV in Ubuntu? OpenCV is a powerful and versatile library widely used for real-time computer vision tasks. It's commonly used in applications like image and video processing, object detection, facial recognition, and more. Recent versions of Ubuntu come with pre-built OpenCV packages available through the apt pack
4 min read