Ask Your Question

Revision history [back]

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

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