Ask Your Question
0

opencv-contrib-python 3.4.4.19 did not install data folder on Raspberry Pi

asked 2019-05-24 23:15:32 -0600

alanmcdonley gravatar image

For some reason my cv2.data.haarcascades variable points to '/usr/local/lib/python3.5/dist-packages/cv2/data/', but that location only has __init__.py and __pycache__ folder (which only has __init__.cpython-35.pyc in it).

This is how I installed OpenCV on my RaspberryPi Raspbian(forRobots) Stretch version:

sudo apt-get install libhdf5-dev libhdf5-serial-dev libhdf5-100
sudo apt-get install libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
sudo pip install opencv-contrib-python

Q: I managed to get the data, but I would like to know what I could have done to have it installed where it thinks it is.

ps. this is what I did to get the data folder:

cd ~/Carl/Examples/OpenCV/
wget https://github.com/opencv/opencv/archive/3.4.4.zip
unzip *.zip

Data is in ~/Carl/Examples/OpenCV/opencv-3.4.4/data

edit retag flag offensive close merge delete

Comments

opencv does not maintain any python distributions, if you run into trouble with PIP, you should ping the maintainer of that package

then, it's a miracle, that they even install a "data" folder (a lot of persons won't ever miss it) it may not even be relevant, since you can download anything you need from github

berak gravatar imageberak ( 2019-05-25 02:05:54 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-05-25 07:27:10 -0600

supra56 gravatar image

updated 2019-05-25 07:32:32 -0600

The answer is NO. If you do this wget https://github.com/opencv/opencv/archive/3.4.4.zip. Then you cannot do this sudo pip install opencv-contrib-python. The pip doesn't install from github. You simply download from same github... cd ~/Carl/Examples/OpenCV/ wget https://github.com/opencv/opencv_contrib/archive/3.4.4.zip Keep in mind, it is better to use OpenCV 4.1.0.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-05-24 23:15:32 -0600

Seen: 755 times

Last updated: May 25 '19