face_landmark_model.dat 下载地址

https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat

OpenCV编译出错:

CMake Error at D:/opencv-3.1.0/cmake/OpenCVUtils.cmake:895 (file):
file DOWNLOAD HASH mismatch

for file: [D:/opencv-3.1.0/build//cv/face//downloads/7505c44ca4eb54b4ab1e4777cb96ac05/face_landmark_model.dat]
expected hash: [7505c44ca4eb54b4ab1e4777cb96ac05]
actual hash: [d41d8cd98f00b204e9800998ecf8427e]
status: [7;"Couldn't connect to server"]

Call Stack (most recent call first):
D:/opencv_contrib-master/modules/face/CMakeLists.txt:13 (ocv_download)


CMake Error at D:/opencv-3.1.0/cmake/OpenCVUtils.cmake:899 (message):
Failed to download face_landmark_model.dat. Status=7;"Couldn't connect to
server"
Call Stack (most recent call first):
D:/opencv_contrib-master/modules/face/CMakeLists.txt:13 (ocv_download)

下载好了face_landmark_model.dat ,

放入[D:/opencv-3.1.0/build//cv/face//downloads/7505c44ca4eb54b4ab1e4777cb96ac05/face_landmark_model.dat]

替换掉0KB的下载失败文件。再次Generate。

问题:

CMake Error at /home/ubuntu/opencv3.1.0/opencv-3.1.0/cmake/OpenCVUtils.cmake:895 (file):
  file DOWNLOAD cannot open file for write.
Call Stack (most recent call first):
  /home/ubuntu/opencv3.1.0/opencv_contrib/modules/dnn_modern/CMakeLists.txt:20 (ocv_download)
 
 
CMake Error at /home/ubuntu/opencv3.1.0/opencv-3.1.0/cmake/OpenCVUtils.cmake:899 (message):
  Failed to download .  Status=
Call Stack (most recent call first):
  /home/ubuntu/opencv3.1.0/opencv_contrib/modules/dnn_modern/CMakeLists.txt:20 (ocv_download)
 
 
-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/opencv3.1.0/opencv-3.1.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/ubuntu/opencv3.1.0/opencv-3.1.0/build/CMakeFiles/CMakeError.log".

解决:

找到(ocv_download)前面的txt,把报错的行数:

opencv_contrib/modules/dnn_modern/CMakeLists.txt

中的FILENAME替换为PACKAGE,继续Generate。

同理出现其他类似(ocv_download)的问题,找到(ocv_download)前面的文本,继续如此替换即可!

你可能感兴趣的:(OpenCV)