Attempting Face Recognition using OpenCV 3.4.4, python3 and cascade classifier:
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.
Edit: I submitted issue with PiWheels: opencv-contrib-python 3.4.4 did not install opencv/data/ - (e.g. cascade detectors)
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