What's the deal with `pip install opencv-python` is full opencv?

I thought the fastest way to get opencv running in my environment would be just as simple.

sudo pip install opencv-python

      

It seemed to work correctly, I could import

import cv2
img = cv2.imread("a.jpg", 0)

      

but any other functions like "cv2.SURF" or even "cv2.imshow" are not loaded. So installing pip only gives you basic opencv?

+3


source to share


3 answers


This issue has been resolved here Opencv-python is not official. I tried to install it on a macbook running Ubuntu, and since you, I could import cv2, but some functions didn't work.

From the opencv-python site:



MacOS and Linux wheels have some limitations:

video related functionality is not supported (not compiled with FFmpeg), e.g. cv.imshow () will not work (not compiled with GTK + 2.x or Carbon)

Now you may have problems installing the official opencv. You must completely uninstall opencv-python before attempting to install opencv.

+2


source


The OpenCV docs states that this sudo pip install opencv-python

is an unofficial package for python. Quote: This package contains only OpenCV kernel modules without additional Contrib modules.

It is only for OpenCV Python bindings. Also, some features still don't work for macOS and Linux ( cv2.imshow

as you mentioned).



If you would like to perform a full installation, follow the steps here .

0


source


Suggest installing Anaconda and using its package manager conda

to install OpenCV 3.2.0

for linux-64

, including OSX

. Installation command conda install -c menpo opencv3=3.2.0

.

Checked for OpenCV 3.2.0 package in Anaconda repository. It includes features2d.so

, which is an add-on module opencv_contrib

to support SIRF.

See this SO answer for more information.

0


source







All Articles