0

我已经尝试了太多次来构建 Opencv 3.2。在 VS 2017 上。Cmake 给了我 Conf 和生成是好的,但是当我在 VS 2017 上编译时,只构建了 12 个包。他们中的其他人给了我错误。

我的系统是windows 10。谢谢

Cmake结果;

tiny-dnn: Download: v1.0.0a3.tar.gz
Looking for tiny_dnn.h
Looking for tiny_dnn.h - found
Found tiny-dnn in: D:/OpenCv/VS/3rdparty/tinydnn/tiny-dnn-1.0.0a3
Performing Test COMPILER_SUPPORTS_CXX11
Performing Test COMPILER_SUPPORTS_CXX11 - Success
freetype2:   NO
harfbuzz:    NO
No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
Torch importer has been enabled. To run the tests you have to install Torch ('th' executable should be available) and generate testdata using opencv_extra/testdata/dnn/generate_torch_models.py script.
CMake Deprecation Warning at D:/OpenCv/opencv_contrib-master/modules/dnn_modern/CMakeLists.txt:9 (cmake_policy):
  The OLD behavior for policy CMP0028 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


Looking for tiny_dnn.h
Looking for tiny_dnn.h - found
Found tiny-dnn in: D:/OpenCv/VS/3rdparty/tinydnn/tiny-dnn-1.0.0a3
Tesseract:   NO
xfeatures2d/boostdesc: Download: boostdesc_bgm.i
xfeatures2d/boostdesc: Download: boostdesc_bgm_bi.i
xfeatures2d/boostdesc: Download: boostdesc_bgm_hd.i
xfeatures2d/boostdesc: Download: boostdesc_binboost_064.i
xfeatures2d/boostdesc: Download: boostdesc_binboost_128.i
xfeatures2d/boostdesc: Download: boostdesc_binboost_256.i
xfeatures2d/boostdesc: Download: boostdesc_lbgm.i
xfeatures2d/vgg: Download: vgg_generated_48.i
xfeatures2d/vgg: Download: vgg_generated_64.i
xfeatures2d/vgg: Download: vgg_generated_80.i
xfeatures2d/vgg: Download: vgg_generated_120.i

General configuration for OpenCV 3.2.0-dev =====================================
  Version control:               unknown

  Extra modules:
    Location (extra):            D:/OpenCv/opencv_contrib-master/modules
    Version control (extra):     unknown

  Platform:
    Timestamp:                   2017-07-02T10:10:18Z
    Host:                        Windows 10.0.15063 AMD64
    CMake:                       3.9.0-rc5
    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:                        1910

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 FP16 AVX AVX2
      requested:                 SSE4_1 AVX FP16 AVX2
      SSE4_1 (0 files):          + SSSE3 SSE4_1
      FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (1 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
      AVX2 (2 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.10.25017/bin/HostX86/x64/cl.exe  (ver 19.10.25019.0)
    C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR  /EHa  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi      /wd4251 /wd4324 /wd4275 /wd4589 /MP4  /MD /O2 /Ob2 /DNDEBUG  /Zi
    C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR  /EHa  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi      /wd4251 /wd4324 /wd4275 /wd4589 /MP4  /MDd /Zi /Ob0 /Od /RTC1 
    C Compiler:                  C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/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  /Zi
    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  /debug
    Linker flags (Debug):        /machine:x64  /debug /INCREMENTAL 
    ccache:                      NO
    Precompiled headers:         YES
    Extra dependencies:          comctl32 gdi32 ole32 setupapi ws2_32 vfw32 C:/Users/erolc/Anaconda3/Library/lib/libprotobuf.lib C:/Users/erolc/Anaconda3/Library/lib/hdf5.lib cudart nppc nppi npps cufft -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64
    3rdparty dependencies:

  OpenCV modules:
    To be built:                 cudev core cudaarithm flann hdf imgproc ml objdetect phase_unwrapping plot reg surface_matching video xphoto bgsegm cudabgsegm cudafilters cudaimgproc cudawarping dnn dnn_modern face fuzzy img_hash imgcodecs photo shape videoio xobjdetect cudacodec highgui ts bioinspired dpm features2d line_descriptor saliency text calib3d ccalib cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo datasets rgbd stereo structured_light superres tracking videostab xfeatures2d ximgproc aruco optflow stitching python3
    Disabled:                    world contrib_world
    Disabled by dependency:      -
    Unavailable:                 java python2 viz cnn_3dobj cvv freetype matlab sfm

  Windows RT support:            NO

  GUI: 
    QT:                          NO
    Win32 UI:                    YES
    OpenGL support:              NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        build (ver 1.2.8)
    JPEG:                        build (ver 90)
    WEBP:                        build (ver encoder: 0x020e)
    PNG:                         build (ver 1.6.24)
    TIFF:                        build (ver 42 - 4.0.2)
    JPEG 2000:                   build (ver 1.900.1)
    OpenEXR:                     build (ver 1.7.1)
    GDAL:                        NO
    GDCM:                        NO

  Video I/O:
    Video for Windows:           YES
    DC1394 1.x:                  NO
    DC1394 2.x:                  NO
    FFMPEG:                      YES (prebuilt binaries)
      avcodec:                   YES (ver )
      avformat:                  YES (ver )
      avutil:                    YES (ver )
      swscale:                   YES (ver )
      avresample:                YES (ver )
    GStreamer:                   NO
    OpenNI:                      NO
    OpenNI PrimeSensor Modules:  NO
    OpenNI2:                     NO
    PvAPI:                       NO
    GigEVisionSDK:               NO
    DirectShow:                  YES
    Media Foundation:            NO
    XIMEA:                       NO
    Intel PerC:                  NO

  Parallel framework:            Concurrency

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Use Intel IPP:               2017.0.2 [2017.0.2]
               at:               D:/OpenCv/VS/3rdparty/ippicv/ippicv_win
    Use Intel IPP IW:            prebuilt binaries (2017.0.2)
    Use Intel IPP Async:         NO
    Use Lapack:                  NO
    Use Eigen:                   NO
    Use Cuda:                    YES (ver 8.0)
    Use OpenCL:                  YES
    Use OpenVX:                  NO
    Use custom HAL:              NO

  NVIDIA CUDA
    Use CUFFT:                   YES
    Use CUBLAS:                  NO
    USE NVCUVID:                 NO
    NVIDIA GPU arch:             20 30 35 37 50 52 60 61
    NVIDIA PTX archs:
    Use fast math:               NO

  OpenCL:                        <Dynamic loading of OpenCL library>
    Include path:                D:/OpenCv/opencv-master/3rdparty/include/opencl/1.2
    Use AMDFFT:                  NO
    Use AMDBLAS:                 NO

  Python 2:
    Interpreter:                 NO

  Python 3:
    Interpreter:                 C:/Users/erolc/Anaconda3/python.exe (ver 3.6.1)
    Libraries:                   C:/Users/erolc/Anaconda3/libs/python36.lib (ver 3.6.1)
    numpy:                       C:/Users/erolc/Anaconda3/lib/site-packages/numpy/core/include (ver 1.12.1)
    packages path:               C:/Users/erolc/Anaconda3/Lib/site-packages

  Python (for build):            C:/Users/erolc/Anaconda3/python.exe

  Java:
    ant:                         NO
    JNI:                         NO
    Java wrappers:               NO
    Java tests:                  NO

  Matlab:                        Matlab not found or implicitly disabled

  Documentation:
    Doxygen:                     NO

  Tests and samples:
    Tests:                       YES
    Performance tests:           YES
    C/C++ Examples:              NO

  Install path:                  D:/OpenCv/VS/install

  cvconfig.h is in:              D:/OpenCv/VS
-----------------------------------------------------------------

Configuring done
Generating done
4

2 回答 2

0

我已经尝试过上述指南,但它再次没有很好的反应。在丢弃特定的 CUDA 包(WITH_CUDA、WITH_CUBLAS)后,它会被正确编译。因为我没有时间搜索,我无法很好地检查为什么 cuda 包给我错误。

于 2017-07-13T13:29:52.300 回答
0

再次尝试构建并安装 OpenCV

使用 Contrib,Visual Studio 2017 构建安装 Opencv

于 2017-07-13T11:14:34.557 回答