Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The difference between opencv-python and opencv-contrib-python

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.

like image 584
Awesome Bill Avatar asked Nov 18 '20 23:11

Awesome Bill


People also ask

What is OpenCV contrib Python?

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.

What is the difference between OpenCV and OpenCV-Python?

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.

Is OpenCV-Python and cv2 same?

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.

What is the difference between OpenCV and cv2?

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.)


Video Answer


1 Answers

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

like image 52
Rajendra Avatar answered Oct 16 '22 20:10

Rajendra