Я пытаюсь собрать исходные коды OpenCV с использованием CMake для использования CUDA.Для этого я следую инструкциям по ссылке: OpenCV Build
Сначала я выбираю "Visual Studio 15 2017 Win64"
в качестве генератора для этого проекта.В ссылке он говорит, что после нажатия кнопки "configure"
я должен увидеть следующие строки:
NVDIA CUDA
Use CUFFT: Yes
Use CUBLAS: No
...
К сожалению, я не вижу этих строк в своем выводе журнала после настройки в CMake.
Когда я продолжаю шаги в видео, игнорируя эту ситуацию, я не могу создавать файлы OpenCV, как ожидалось.
У меня нет опыта работы с CMake, но ясно, что CMake не может найти CUDA.Как я могу решить эту проблему?
Я использую следующее:
1) Windows 10 64-битная
2) OpenCV 3.4.3
3) Существует набор инструментов CUDA 9.0 и 10.0 в моем компьютере
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:32_Central_Daylight_Time_2017
Cuda compilation tools, release 9.0, V9.0.176
4) Microsoft Visual Studio Community 2017 Версия 15.9.3
5) Quadro P600 с версией драйвера 385.54
Мой вывод после нажатия кнопки конфигурации выглядит следующим образом:
The CXX compiler identification is MSVC 19.16.27024.1
The C compiler identification is MSVC 19.16.27024.1
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Performing Test HAVE_CXX11 (check file: cmake/checks/cxx11.cpp)
Performing Test HAVE_CXX11 - Success
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.2")
Performing Test HAVE_CPU_SSE3_SUPPORT (check file: cmake/checks/cpu_sse3.cpp)
Performing Test HAVE_CPU_SSE3_SUPPORT - Success
Performing Test HAVE_CPU_SSSE3_SUPPORT (check file: cmake/checks/cpu_ssse3.cpp)
Performing Test HAVE_CPU_SSSE3_SUPPORT - Success
Performing Test HAVE_CPU_SSE4_1_SUPPORT (check file: cmake/checks/cpu_sse41.cpp)
Performing Test HAVE_CPU_SSE4_1_SUPPORT - Success
Performing Test HAVE_CPU_POPCNT_SUPPORT (check file: cmake/checks/cpu_popcnt.cpp)
Performing Test HAVE_CPU_POPCNT_SUPPORT - Success
Performing Test HAVE_CPU_SSE4_2_SUPPORT (check file: cmake/checks/cpu_sse42.cpp)
Performing Test HAVE_CPU_SSE4_2_SUPPORT - Success
Performing Test HAVE_CXX_ARCH:AVX (check file: cmake/checks/cpu_fp16.cpp)
Performing Test HAVE_CXX_ARCH:AVX - Success
Performing Test HAVE_CXX_ARCH:AVX2 (check file: cmake/checks/cpu_avx2.cpp)
Performing Test HAVE_CXX_ARCH:AVX2 - Success
Performing Test HAVE_CPU_AVX_512F_SUPPORT (check file: cmake/checks/cpu_avx512.cpp)
Performing Test HAVE_CPU_AVX_512F_SUPPORT - Failed
AVX_512F is not supported by C++ compiler
Performing Test HAVE_CPU_AVX512_SKX_SUPPORT (check file: cmake/checks/cpu_avx512skx.cpp)
Performing Test HAVE_CPU_AVX512_SKX_SUPPORT - Failed
AVX512_SKX is not supported by C++ compiler
Dispatch optimization AVX512_SKX is not available, skipped
Performing Test HAVE_CPU_BASELINE_FLAGS
Performing Test HAVE_CPU_BASELINE_FLAGS - Success
Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1
Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_1 - Success
Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2
Performing Test HAVE_CPU_DISPATCH_FLAGS_SSE4_2 - Success
Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16
Performing Test HAVE_CPU_DISPATCH_FLAGS_FP16 - Success
Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX
Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX - Success
Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2
Performing Test HAVE_CPU_DISPATCH_FLAGS_AVX2 - Success
Check if the system is big endian
Searching 16 bit integer
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of unsigned short
Check size of unsigned short - done
Using unsigned short
Check if the system is big endian - little endian
Looking for fseeko
Looking for fseeko - not found
Check size of off64_t
Check size of off64_t - failed
libjpeg-turbo: VERSION = 1.5.3, BUILD = opencv-4.0.0-dev-libjpeg-turbo
Check size of size_t
Check size of size_t - done
Looking for assert.h
Looking for assert.h - found
Looking for fcntl.h
Looking for fcntl.h - found
Looking for inttypes.h
Looking for inttypes.h - found
Looking for io.h
Looking for io.h - found
Looking for limits.h
Looking for limits.h - found
Looking for malloc.h
Looking for malloc.h - found
Looking for memory.h
Looking for memory.h - found
Looking for search.h
Looking for search.h - found
Looking for string.h
Looking for string.h - found
Performing Test C_HAS_inline
Performing Test C_HAS_inline - Success
Check size of signed short
Check size of signed short - done
Check size of unsigned short
Check size of unsigned short - done
Check size of signed int
Check size of signed int - done
Check size of unsigned int
Check size of unsigned int - done
Check size of signed long
Check size of signed long - done
Check size of unsigned long
Check size of unsigned long - done
Check size of signed long long
Check size of signed long long - done
Check size of unsigned long long
Check size of unsigned long long - done
Check size of unsigned char *
Check size of unsigned char * - done
Check size of ptrdiff_t
Check size of ptrdiff_t - done
Looking for memmove
Looking for memmove - not found
Looking for setmode
Looking for setmode - found
Looking for strcasecmp
Looking for strcasecmp - not found
Looking for strchr
Looking for strchr - found
Looking for strrchr
Looking for strrchr - found
Looking for strstr
Looking for strstr - found
Looking for strtol
Looking for strtol - found
Looking for strtol
Looking for strtol - found
Looking for strtoull
Looking for strtoull - found
Looking for lfind
Looking for lfind - found
Performing Test HAVE_SNPRINTF
Performing Test HAVE_SNPRINTF - Success
Check if the system is big endian
Searching 16 bit integer
Using unsigned short
Check if the system is big endian - little endian
FFMPEG: Download: opencv_ffmpeg.dll
FFMPEG: Download: opencv_ffmpeg_64.dll
FFMPEG: Download: ffmpeg_version.cmake
Looking for Mfapi.h
Looking for Mfapi.h - found
Looking for D3D11.h
Looking for D3D11.h - found
Looking for D3d11_4.h
Looking for D3d11_4.h - found
IPPICV: Download: ippicv_2019_win_intel64_20180723_general.zip
found Intel IPP (ICV version): 2019.0.0 [2019.0.0 Gold]
at: C:/openCv_lib/build3/3rdparty/ippicv/ippicv_win/icv
found Intel IPP Integration Wrappers sources: 2019.0.0
at: C:/openCv_lib/build3/3rdparty/ippicv/ippicv_win/iw
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.
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
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.1d.zip
OpenCV Python: during development append to PYTHONPATH: C:/openCv_lib/build3/python_loader
Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
General configuration for OpenCV 4.0.0-dev =====================================
Version control: unknown
Platform:
Timestamp: 2018-12-07T20:01:35Z
Host: Windows 10.0.17134 AMD64
CMake: 3.13.1
CMake generator: Visual Studio 15 2017 Win64
CMake build tool: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe
MSVC: 1916
CPU/HW features:
Baseline: SSE SSE2 SSE3
requested: SSE3
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
SSE4_1 (7 files): + SSSE3 SSE4_1
SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (13 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
C/C++:
Built as dynamic libs?: YES
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe (ver 19.16.27024.1)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP4 /MD /O2 /Ob2 /DNDEBUG
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP4 /MDd /Zi /Ob0 /Od /RTC1
C Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP4 /MD /O2 /Ob2 /DNDEBUG
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP4 /MDd /Zi /Ob0 /Od /RTC1
Linker flags (Release): /machine:x64 /INCREMENTAL:NO
Linker flags (Debug): /machine:x64 /debug /INCREMENTAL
ccache: NO
Precompiled headers: YES
Extra dependencies:
3rdparty dependencies:
OpenCV modules:
To be built: calib3d core dnn features2d flann gapi highgui imgcodecs imgproc java_bindings_generator ml objdetect photo python_bindings_generator stitching ts video videoio
Disabled: world
Disabled by dependency: -
Unavailable: java js python2 python3
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: NO
Windows RT support: NO
GUI:
Win32 UI: YES
VTK support: NO
Media I/O:
ZLib: build (ver 1.2.11)
JPEG: build-libjpeg-turbo (ver 1.5.3-62)
WEBP: build (ver encoder: 0x020e)
PNG: build (ver 1.6.35)
TIFF: build (ver 42 - 4.0.9)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES
Video I/O:
DC1394: NO
FFMPEG: YES (prebuilt binaries)
avcodec: YES (ver 58.35.100)
avformat: YES (ver 58.20.100)
avutil: YES (ver 56.22.100)
swscale: YES (ver 5.3.100)
avresample: YES (ver 4.0.0)
GStreamer: NO
DirectShow: YES
Media Foundation: YES
Parallel framework: Concurrency
Trace: YES (with Intel ITT)
Other third-party libraries:
Intel IPP: 2019.0.0 Gold [2019.0.0]
at: C:/openCv_lib/build3/3rdparty/ippicv/ippicv_win/icv
Intel IPP IW: sources (2019.0.0)
at: C:/openCv_lib/build3/3rdparty/ippicv/ippicv_win/iw
Lapack: NO
Eigen: NO
Custom HAL: NO
Protobuf: build (3.5.1)
OpenCL: YES (no extra features)
Include path: C:/openCv_lib/source/opencv-master/opencv-master/3rdparty/include/opencl/1.2
Link libraries: Dynamic load
Python (for build): NO
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Install to: C:/openCv_lib/build3/install
-----------------------------------------------------------------
Configuring done