I was looking at the Python Package Index (PyPi) and noticed 2 very similar packages: opencv-contrib-python and opencv-python and wondering what the difference was. I looked at them and they had the exact same description and version numbers.
OpenCV contrib is a specialized module present in the Python programming language, which is exclusively needed for the system to run SURF feature descriptions alongside the OpenCV module present in the open-source library.
So libopencv is a metapackage which simply references one or more related packages which are loosely grouped together. It is dedicated for installing OpenCV in Ubuntu and Debian OS. opencv-python is the OpenCV library available as a wrapper with bindings for python.
A: It's easier for users to understand opencv-python than cv2 and it makes it easier to find the package with search engines. cv2 (old interface in old OpenCV versions was named as cv ) is the name that OpenCV developers chose when they created the binding generators.
Earlier, there was only cv . Later, OpenCV came with both cv and cv2 . Now, there in the latest releases, there is only the cv2 module, and cv is a subclass inside cv2 . You need to call import cv2.cv as cv to access it.)
As per PyPi documentation:
There are four different packages (see options 1, 2, 3 and 4 below):
Packages for standard desktop environments:
Option 1 - Main modules package:
pip install opencv-python
Option 2 - Full package (contains both main modules and contrib/extra modules):
pip install opencv-contrib-python
(check contrib/extra modules listing from OpenCV documentation)
Packages for server (headless) environments:
Option 3 - Headless main modules package:
pip install opencv-python-headless
Option 4 - Headless full package (contains both main modules and contrib/extra modules):
pip install opencv-contrib-python-headless
Do not install multiple different packages in the same environment
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With