1 前言
- opencv4只支持qt4版本且包太大,不安装
- opencv4-gtk为gtk图形界面,本人不需要且包太大,不安装
- opencv4-python 本人不需要,不安装
- opencv4-lapack安装过程出现的错误,错误信息,这可能是vcpkg的一个bug.截止发稿前未找到解决方案,因此也不安装
呈现lapack错误
vcpkg install lapack-reference --triplet=x64-windows --debug
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:158 (message):
Command failed: E:/vcpkg/downloads/tools/cmake-3.22.2-windows/cmake-3.22.2-windows-i386/bin/cmake.exe --build . --config Debug --target install -- -v -j17
Working Directory: E:/vcpkg/buildtrees/lapack-reference/x64-windows-dbg
See logs for more information:
E:\vcpkg\buildtrees\lapack-reference\install-x64-windows-dbg-out.log
Call Stack (most recent call first):
installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:112 (vcpkg_execute_build_process)
installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:41 (vcpkg_cmake_build)
ports/lapack-reference/portfile.cmake:72 (vcpkg_cmake_install)
scripts/ports.cmake:146 (include)
error: building lapack-reference:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+lapack-reference
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[lapack-reference]+Build+error
Include '[lapack-reference] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
vcpkg-tool version: 2022-05-05-67e17c1782801cf481be9ac0b3765dff3e4bdeb8
vcpkg-scripts version: 0cf5b4305 2022-05-13 (6 hours ago)
2 vcpkg完整安装opencv4
2.1 安装cuda
cuda,下载Latest Release版本,可能需要注册后才能下载。
2.2 安装Intel® Integrated Performance Primitives(IPP)
英特尔集成性能基元可用于提高OpenCV库的颜色转换、Haar训练和DFT函数的性能。请注意这不是一项免费服务。
在名称[Name (Click to initiate download)]后带号的表示在线安装包,不带的表示离线安装包,请下载离线安装包。
下载后的文件直接解压,然后再安装
2.3 其它
- Intel Threading Building Blocks (TBB) vcpkg会自动安装
2.4 安装opencv4
#opencv4[qt] opencv4[gtk] opencv4[python] opencv4[lapack]
vcpkg install opencv4 opencv4[ade] opencv4[contrib] opencv4[cuda] opencv4[cudnn] opencv4[default-features] opencv4[dnn] opencv4[eigen] opencv4[ffmpeg] opencv4[freetype] opencv4[gdcm] opencv4[gstreamer] opencv4[halide] opencv4[ipp] opencv4[jasper] opencv4[jpeg] opencv4[nonfree] opencv4[openexr] opencv4[opengl] opencv4[openmp] opencv4[ovis] opencv4[png] opencv4[quirc] opencv4[sfm] opencv4[tbb] opencv4[tiff] opencv4[vtk] opencv4[webp] opencv4[world] --triplet=x64-windows --recurse