Reputation: 21
I want to use the function createFisherFaceRecognizer()
in python,but when I wrote down model = cv2.createFisherFaceRecognizer()
or cv2.face.createFisherFaceRecognizer()
Error will occurs:
Traceback (most recent call last): File "C:\Users\Administrator\Desktop\My projects\test\RecognizeMe.py", line 5, in model = cv2.face.createFisherFaceRecognizer() AttributeError: 'module' object has no attribute 'face'
I referenced the methods online and found that I should install opencv_contrib.But I was stucked when I was configureing the opencv using CMake. Error:
CMake Error at cmake/OpenCVUtils.cmake:895 (file): file DOWNLOAD HASH mismatch
for file: [E:/opencv-3.1.0/sources/opencv-3.1.0/3rdparty/ffmpeg/downloads/35fe6ccdda6d7a04e9056b0d73b98e76/opencv_ffmpeg_64.dll] expected hash: [35fe6ccdda6d7a04e9056b0d73b98e76] actual hash: [5171a37169c5e695c556c85dc3103d13] status: [28;"Timeout was reached"]
Call Stack (most recent call first): 3rdparty/ffmpeg/ffmpeg.cmake:15 (ocv_download) cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)CMake Error at cmake/OpenCVUtils.cmake:899 (message): Failed to download opencv_ffmpeg_64.dll. Status=28;"Timeout was reached" Call Stack (most recent call first): 3rdparty/ffmpeg/ffmpeg.cmake:15 (ocv_download) cmake/OpenCVFindLibsVideo.cmake:206 (include)
CMakeLists.txt:536 (include)
How to solve this problem?Thank you for your answer!
Upvotes: 1
Views: 1929
Reputation: 21
Well,After trying all kinds of methods,using CMAKE and VS2013 doesn't work.
But I found a package opencv_contrib_python-3.2.0.7-cp27-none-win32.whl,just pip install
it then it worked.
Here is a download Link:Download opencv_contrib_python.whl
Upvotes: 1