gpt4 book ai didi

python - 如何在 Windows 上安装 opencv_contrib?

转载 作者:太空宇宙 更新时间:2023-11-03 22:48:23 25 4
gpt4 key购买 nike

我想在 python 中使用 function createFisherFaceRecognizer(),但是当我写下 model = cv2.createFisherFaceRecognizer()cv2.face.createFisherFaceRecognizer ()会发生错误:

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'

引用了网上的方法,发现应该安装opencv_contrib,但是在配置opencv的时候卡住了 使用 CMake。错误:

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)

如何解决这个问题?谢谢您的回答!

最佳答案

嗯,各种方法都试过了,用CMAKE和VS2013都不行。但是我找到了一个包 opencv_contrib_python-3.2.0.7-cp27-none-win32.whl,只需 pip install 就可以了。这是一个下载链接:Download opencv_contrib_python.whl

关于python - 如何在 Windows 上安装 opencv_contrib?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43786365/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com