我正在尝试将opencv_contrib包添加到我的OpenCV 3.1版本中。我目前正在使用Microsoft Visual Studio 15中的库。我已经安装了Cmake和GNU Make,克隆了opencv_contrib repo,并按照https://github.com/opencv/opencv_contrib上的说明构建了包。说明如下:
C:\Opencv310\build>cmake -DOPENCV_EXTRA_MODULES_PATH=C:\opencv_contrib\modules C:\Opencv310/sources
C:\Opencv310\build>make -j5
第一行运行良好,并以couts结束:
--Configuring done
--Generating done
--Build files have been written to: C:Opencv310\build
当我运行最后一行时,我收到错误:
make: *** No targets specified and no makefile found. Stop.
在添加opencv_contrib之前,有没有人遇到此错误?你看到我做了什么错误吗?任何帮助将不胜感激!
第一个电话的完整输出是:
C:\Opencv310\build>cmake -DOPENCV_EXTRA_MODULES_PATH=C:\opencv_contrib\modules C:\Opencv310\sources
-- found IPP (ICV version): 9.0.1 [9.0.1]
-- at: C:/Opencv310/sources/3rdparty/ippicv/unpack/ippicv_win
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR=<filepath> option to cmake
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named numpy.distutils
-- Could NOT find PythonInterp: Found unsuitable version "2.7.12", but required is at least "3.4" (found C:/Python27/python.exe)
-- Could NOT find PythonInterp: Found unsuitable version "2.7.12", but required is at least "3.2" (found C:/Python27/python.exe)
-- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
-- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Caffe: NO
-- Protobuf: NO
-- Glog: NO
-- Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
-- Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
-- Build libprotobuf from sources:
-- libprotobuf not found into system
-- The protocol buffer compiler not found
-- Tesseract: NO
-- Check contents of vgg_generated_48.i ...
-- Check contents of vgg_generated_64.i ...
-- Check contents of vgg_generated_80.i ...
-- Check contents of vgg_generated_120.i ...
-- Check contents of boostdesc_bgm.i ...
-- Check contents of boostdesc_bgm_bi.i ...
-- Check contents of boostdesc_bgm_hd.i ...
-- Check contents of boostdesc_binboost_064.i ...
-- Check contents of boostdesc_binboost_128.i ...
-- Check contents of boostdesc_binboost_256.i ...
-- Check contents of boostdesc_lbgm.i ...
--
-- General configuration for OpenCV 3.1.0 =====================================
-- Version control: unknown
--
-- Platform:
-- Host: Windows 10.0.14393 AMD64
-- CMake: 3.7.0-rc2
-- CMake generator: Visual Studio 14 2015
-- CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe
-- MSVC: 1900
--
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe (ver 19.0.24210.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 /arch:SSE2 /Oi /fp:fast /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 /arch:SSE2 /Oi /fp:fast /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
-- C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/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 /arch:SSE2 /Oi /fp:fast /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 /arch:SSE2 /Oi /fp:fast /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1
-- Linker flags (Release): /machine:X86 /INCREMENTAL:NO /debug
-- Linker flags (Debug): /machine:X86 /debug /INCREMENTAL
-- Precompiled headers: YES
-- Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 vfw32
-- 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf libprotobuf
--
-- OpenCV modules:
-- To be built: core flann imgproc ml photo reg surface_matching video dnn fuzzy imgcodecs shape videoio highgui objdetect plot superres ts xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow stitching
-- Disabled: world contrib_world
-- Disabled by dependency: -
-- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz cvv hdf 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 0.3.1)
-- PNG: build (ver 1.6.19)
-- TIFF: build (ver 42 - 4.0.2)
-- JPEG 2000: build (ver 1.900.1)
-- OpenEXR: build (ver 1.7.1)
-- GDAL: NO
--
-- Video I/O:
-- Video for Windows: YES
-- DC1394 1.x: NO
-- DC1394 2.x: NO
-- FFMPEG: YES (prebuilt binaries)
-- codec: YES (ver 56.41.100)
-- format: YES (ver 56.36.101)
-- util: YES (ver 54.27.100)
-- swscale: YES (ver 3.1.101)
-- resample: NO
-- gentoo-style: YES
-- 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
--
-- Other third-party libraries:
-- Use IPP: 9.0.1 [9.0.1]
-- at: C:/Opencv310/sources/3rdparty/ippicv/unpack/ippicv_win
-- Use IPP Async: NO
-- Use Eigen: NO
-- Use Cuda: NO
-- Use OpenCL: YES
-- Use custom HAL: NO
--
-- OpenCL:
-- Version: dynamic
-- Include path: C:/Opencv310/sources/3rdparty/include/opencl/1.2
-- Use AMDFFT: NO
-- Use AMDBLAS: NO
--
-- Python 2:
-- Interpreter: C:/Python27/python.exe (ver 2.7.12)
--
-- Python 3:
-- Interpreter: NO
--
-- Python (for build): C:/Python27/python.exe
--
-- Java:
-- ant: NO
-- JNI: NO
-- Java wrappers: NO
-- Java tests: NO
--
-- Matlab: Matlab not found or implicitly disabled
--
-- Documentation:
-- Doxygen: NO
-- PlantUML: NO
--
-- Tests and samples:
-- Tests: YES
-- Performance tests: YES
-- C/C++ Examples: NO
--
-- Install path: C:/Opencv310/build/install
--
-- cvconfig.h is in: C:/Opencv310/build
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Opencv310/build
答案 0 :(得分:0)
- CMake生成器:Visual Studio 14 2015
您已经生成了Visual Studio 2015解决方案。如果您不想使用VS,请使用cmake
或-G "NMake Makefiles"
运行"MinGW Makefiles"
。