2017-04-14 127 views
1

我試圖建立的OpenCV和opencv_contrib模塊,但我得到以下,同時通過CMake-GUI構建:不能建立OpenCV的3.2.0與3.2.0 opencv_contrib

Detected version of GNU GCC: 54 (504) 
Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") 
Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
Checking for module 'gtk+-3.0' 
No package 'gtk+-3.0' found 
Checking for module 'gstreamer-base-1.0' 
    No package 'gstreamer-base-1.0' found 
Checking for module 'gstreamer-video-1.0' 
    No package 'gstreamer-video-1.0' found 
Checking for module 'gstreamer-app-1.0' 
    No package 'gstreamer-app-1.0' found 
Checking for module 'gstreamer-riff-1.0' 
    No package 'gstreamer-riff-1.0' found 
Checking for module 'gstreamer-pbutils-1.0' 
    No package 'gstreamer-pbutils-1.0' found 
Checking for module 'gstreamer-base-0.10' 
    No package 'gstreamer-base-0.10' found 
Checking for module 'gstreamer-video-0.10' 
    No package 'gstreamer-video-0.10' found 
Checking for module 'gstreamer-app-0.10' 
    No package 'gstreamer-app-0.10' found 
Checking for module 'gstreamer-riff-0.10' 
    No package 'gstreamer-riff-0.10' found 
Checking for module 'gstreamer-pbutils-0.10' 
    No package 'gstreamer-pbutils-0.10' found 
Looking for linux/videodev.h 
Looking for linux/videodev.h - not found 
Looking for linux/videodev2.h 
Looking for linux/videodev2.h - found 
Looking for sys/videoio.h 
Looking for sys/videoio.h - not found 
Checking for module 'libavresample' 
    No package 'libavresample' found 
Checking for module 'libgphoto2' 
    No package 'libgphoto2' found 
found IPP (ICV version): 9.0.1 [9.0.1] 
at: /opencv-master/build/3rdparty/ippicv/ippicv_lnx 
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off 
Could NOT find Atlas (missing: Atlas_CLAPACK_INCLUDE_DIR) 
A library with BLAS API found. 
A library with LAPACK API found. 
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
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 
The protocol buffer compiler is found (/usr/bin/protoc) 
CMake Error at /opencv_contrib-master/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake:17 (PROTOBUF_GENERATE_CPP): 
    Unknown CMake command "PROTOBUF_GENERATE_CPP". 
Call Stack (most recent call first): 
    /opencv_contrib-master/modules/dnn/CMakeLists.txt:5 (include) 


Configuring incomplete, errors occurred! 
See also "/opencv-master/build/CMakeFiles/CMakeOutput.log". 
See also "/opencv-master/build/CMakeFiles/CMakeError.log". 

錯誤框:配置過程出錯,項目文件可能無效

請仔細檢查一下。

+0

你的平臺是什麼? – Tes3awy

+0

我正在使用Linuxmint 18.1,當我在cmake-gui中取消選中protobuf和opencv_dnn,然後再次配置它時,它工作正常。 –

回答

1

您必須擁有opencv_contrib和opencv本身的匹配版本。

另一位同事遇到了同樣的問題。你可以看到我的答案堆棧溢出HERE

相關問題