I have a python function with opencv 3. it works without virtual environment.Also I installed opencv on venv from:pyimagesearch. i am trying to run that python function on v
For windows users using python 3, you can get the opencv_contrib from here. My system is 64 bit so opencv_python‑3.3.0+contrib‑cp36‑cp36m‑win_amd64.whl is what I used. If you are 32 bit then choose the 32 bit version.
Open command prompt and navigate to the download folder and use the command
pip install opencv_python-3.3.0+contrib-cp36-cp36m-win_amd64.whl
Note: Use a command similar to the file you just downloaded and make sure to uninstall an older version before installing the new one with the contrib. I had to run:
pip uninstall opencv_python-3.3.0-cp36-cp36m-win_amd64.whl
before making the new installation.
Then make sure it's successful
>>>import cv2
>>>cv2.face
Instead of createLBPHFaceRecognizer(), you must use LBPHFaceRecognizer_create()