https://blog.csdn.net/xd_cauthy/article/details/90899259
https://blog.csdn.net/biaobro/article/details/79141868
https://blog.csdn.net/mrxjh/article/details/82982950
opencv4入门学习
https://blog.csdn.net/zhangfuliang123/article/details/98667754
看了上面一些博客,
向来直接使用编译好的库来用,结果发现opencv_contrib只有源码,只好找opencv的最新4.3.0版自己编译了。
1、我发现我的vs版本是2017的,并且安装目录不好。。。configure的时候要选 vs 15 2017版本,选错则会报错。
(想要重新进行configure报错:需要先在cmake中的 file选项-->delete cache来删除缓存。)
2、在下载玩opencv-4.3.0.zip opencv_contrib-4.3.0.zip 之后,解压均出现提示:不可预料的文件结尾。
不知道是不是好压的毛病
3、在configure时,cmake报错如下:
貌似是因为 无法运行该命令:
D:/Microsoft's dog/VisualStudio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe
来获取VCTargetPath的值,应该是路径的错。。。。还是再装上2019吧,vs2017被依赖了,早年的文件夹果然带来了麻烦
相关可看一下 https://blog.csdn.net/xd_cauthy/article/details/90899259
在条件“Exists('D:\Microsoft's dog\VisualStudio\2017\Community\MSBuild\$(MSBuildToolsVersion)\Microsoft.Common.props')”中的字符位置 22 处发现意外标记“s”。
第22个字符刚好就是 ' 后的 s 字符,出现报错
Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
CMake Error at CMakeLists.txt:106 (enable_language):
Failed to run MSBuild command:
D:/Microsoft's dog/VisualStudio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe
to get the value of VCTargetsPath:
用于 .NET Framework 的 Microsoft (R) 生成引擎版本 15.9.21+g9802d43bc3
版权所有(C) Microsoft Corporation。保留所有权利。
生成启动时间为 2020/5/16 17:55:18。
节点 1 上的项目“D:\software\opencv\opencv_430\opencvbuild-430\CMakeFiles\3.17.1\VCTargetsPath.vcxproj”(默认目标)。
D:\Microsoft's dog\VisualStudio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Default.props(15,92): error MSB4092: 在条件“Exists('D:\Microsoft's dog\VisualStudio\2017\Community\MSBuild\$(MSBuildToolsVersion)\Microsoft.Common.props')”中的字符位置 22 处发现意外标记“s”。 [D:\software\opencv\opencv_430\opencvbuild-430\CMakeFiles\3.17.1\VCTargetsPath.vcxproj]
已完成生成项目“D:\software\opencv\opencv_430\opencvbuild-430\CMakeFiles\3.17.1\VCTargetsPath.vcxproj”(默认目标)的操作 - 失败。
生成失败。
“D:\software\opencv\opencv_430\opencvbuild-430\CMakeFiles\3.17.1\VCTargetsPath.vcxproj”(默认目标) (1) ->
D:\Microsoft's dog\VisualStudio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Default.props(15,92): error MSB4092: 在条件“Exists('D:\Microsoft's dog\VisualStudio\2017\Community\MSBuild\$(MSBuildToolsVersion)\Microsoft.Common.props')”中的字符位置 22 处发现意外标记“s”。 [D:\software\opencv\opencv_430\opencvbuild-430\CMakeFiles\3.17.1\VCTargetsPath.vcxproj]
0 个警告
1 个错误
已用时间 00:00:00.06
Exit code: 1
Configuring incomplete, errors occurred!
See also "D:/software/opencv/opencv_430/opencvbuild-430/CMakeFiles/CMakeOutput.log".
/发下需要下载几个dll文件、cmake文件,需要上外网下载,
或者用有的博主给的346版本的文件先用着。。
VS2017+openCV3.4.6+openCV3.4.6 contrib扩展模块安装
https://blog.csdn.net/KayChanGEEK/article/details/79919417
Performing Test HAVE_C_STD_C99
Performing Test HAVE_C_STD_C99 - Failed
Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1)
IPPICV: Download: ippicv_2020_win_intel64_20191018_general.zip
Try 1 failed
=======================================================================
Couldn't download files from the Internet.
Please check the Internet access on this host.
=======================================================================
CMake Warning at cmake/OpenCVDownload.cmake:202 (message):
IPPICV: Download failed: 6;"Couldn't resolve host name"
For details please refer to the download log file:
D:/software/opencv/opencv_430/opencvbuild-430/CMakeDownloadLog.txt
Call Stack (most recent call first):
3rdparty/ippicv/ippicv.cmake:37 (ocv_download)
cmake/OpenCVFindIPP.cmake:244 (download_ippicv)
cmake/OpenCVFindLibsPerf.cmake:12 (include)
CMakeLists.txt:687 (include)
Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Looking for sgemm_
Looking for sgemm_ - not found
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE
Could NOT find BLAS (missing: BLAS_LIBRARIES)
LAPACK requires BLAS
A library with LAPACK API not found. Please specify library location.
Found JNI: D:/JDK/javase1.8/lib/jawt.lib
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
ADE: Download: v0.1.1f.zip
OpenCV Python: during development append to PYTHONPATH: D:/software/opencv/opencv_430/opencvbuild-430/python_loader
FFMPEG: Download: opencv_videoio_ffmpeg.dll
Try 1 failed
=======================================================================
Couldn't download files from the Internet.
Please check the Internet access on this host.
=======================================================================
CMake Warning at cmake/OpenCVDownload.cmake:202 (message):
FFMPEG: Download failed: 6;"Couldn't resolve host name"
For details please refer to the download log file:
D:/software/opencv/opencv_430/opencvbuild-430/CMakeDownloadLog.txt
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:20 (ocv_download)
modules/videoio/cmake/detect_ffmpeg.cmake:14 (download_win_ffmpeg)
modules/videoio/cmake/init.cmake:3 (include)
modules/videoio/cmake/init.cmake:22 (add_backend)
cmake/OpenCVModule.cmake:312 (include)
cmake/OpenCVModule.cmake:375 (_add_modules_1)
modules/CMakeLists.txt:7 (ocv_glob_modules)
FFMPEG: Download: opencv_videoio_ffmpeg_64.dll
Try 1 failed
=======================================================================
Couldn't download files from the Internet.
Please check the Internet access on this host.
=======================================================================
CMake Warning at cmake/OpenCVDownload.cmake:202 (message):
FFMPEG: Download failed: 6;"Couldn't resolve host name"
For details please refer to the download log file:
D:/software/opencv/opencv_430/opencvbuild-430/CMakeDownloadLog.txt
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:20 (ocv_download)
modules/videoio/cmake/detect_ffmpeg.cmake:14 (download_win_ffmpeg)
modules/videoio/cmake/init.cmake:3 (include)
modules/videoio/cmake/init.cmake:22 (add_backend)
cmake/OpenCVModule.cmake:312 (include)
cmake/OpenCVModule.cmake:375 (_add_modules_1)
modules/CMakeLists.txt:7 (ocv_glob_modules)
FFMPEG: Download: ffmpeg_version.cmake
Try 1 failed
=======================================================================
Couldn't download files from the Internet.
Please check the Internet access on this host.
=======================================================================
CMake Warning at cmake/OpenCVDownload.cmake:202 (message):
FFMPEG: Download failed: 6;"Couldn't resolve host name"
For details please refer to the download log file:
D:/software/opencv/opencv_430/opencvbuild-430/CMakeDownloadLog.txt
Call Stack (most recent call first):
3rdparty/ffmpeg/ffmpeg.cmake:20 (ocv_download)
modules/videoio/cmake/detect_ffmpeg.cmake:14 (download_win_ffmpeg)
modules/videoio/cmake/init.cmake:3 (include)
modules/videoio/cmake/init.cmake:22 (add_backend)
cmake/OpenCVModule.cmake:312 (include)
cmake/OpenCVModule.cmake:375 (_add_modules_1)
modules/CMakeLists.txt:7 (ocv_glob_modules)
Looking for mfapi.h
Looking for mfapi.h - found
Looking for d3d11_4.h
Looking for d3d11_4.h - found
Allocator metrics storage type: 'long long'
Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': D:/software/opencv/opencv_430/opencv/sources/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
opencv_dnn: filter out cuda4dnn source code
General configuration for OpenCV 4.3.0 =====================================
Version control: unknown