在 Ubuntu 14.04 LTS 中安装 OpenCV 3.2.0 和 contrib 模块


以下命令

运行,但以"不完整的配置"而不是"已完成的配置"结束。

cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_VTK=ON .. -DCMAKE_BUILD_TYPE=RELEASE -DOPENCV_EXTRA_MODULES_PATH=/home/venkatesh/opencv/opencv_contrib-3.2.0/modules..

一些专家给出了答案(在这种情况下不起作用(,即,
1. 设置DOPENCV_EXTRA_MODULES_PATH.
路径2. 在 cmake 命令中将"INSTALL_C_EXAMPLES"值设置为"OFF"而不是"ON"。
3. 清理构建目录并再次创建并运行 cmake 命令。

在这种情况下,这三个也不起作用。

当我运行 cmake 命令时,我得到了以下东西。

-- Found VTK ver. 5.8.0 (usefile: /usr/lib/vtk-5.8/UseVTK.cmake)
CMake Error at CMakeLists.txt:706 (add_subdirectory):
  add_subdirectory given source "include" which is not an existing directory.

CMake Error at CMakeLists.txt:709 (add_subdirectory):
  add_subdirectory given source "modules" which is not an existing directory.

CMake Error at CMakeLists.txt:712 (add_subdirectory):
  add_subdirectory given source "doc" which is not an existing directory.

CMake Error at CMakeLists.txt:724 (add_subdirectory):
  add_subdirectory given source "samples" which is not an existing directory.

-- 
-- General configuration for OpenCV .. =====================================
--   Version control:               unknown
-- 
--   Extra modules:
--     Location (extra):            /home/venkatesh/opencv/opencv_contrib-3.2.0/modules
--     Version control (extra):     unknown
-- 
--   Platform:
--     Timestamp:                   2017-11-17T05:51:01Z
--     Host:                        Linux 4.4.0-100-generic x86_64
--     CMake:                       2.8.12.2
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 4.8.4)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -mno-avx -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     ccache:                      NO
--     Precompiled headers:         YES
--     Extra dependencies:
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 -
--     Disabled:                    -
--     Disabled by dependency:      -
--     Unavailable:                 -
-- 
--   GUI: 
--     QT 4.x:                      YES (ver 4.8.6 EDITION = OpenSource)
--     QT OpenGL support:           YES (/usr/lib/x86_64-linux-gnu/libQtOpenGL.so)
--     OpenGL support:              YES (/usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libSM.so /usr/lib/x86_64-linux-gnu/libICE.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXext.so)
--     VTK support:                 YES (ver 5.8.0)
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8)
--     JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )
--     WEBP:                        build (ver 0.3.1)
--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.50)
--     TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.3)
--     JPEG 2000:                   /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)
--     OpenEXR:                     /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 1.6.1)
--     GDAL:                        NO
--     GDCM:                        NO
-- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  YES (ver 2.2.1)
--     FFMPEG:                      YES
--       avcodec:                   YES (ver 54.35.1)
--       avformat:                  YES (ver 54.20.4)
--       avutil:                    YES (ver 52.3.0)
--       swscale:                   YES (ver 2.1.1)
--       avresample:                NO
--     GStreamer:                   NO
--     OpenNI:                      NO
--     OpenNI PrimeSensor Modules:  NO
--     OpenNI2:                     NO
--     PvAPI:                       NO
--     GigEVisionSDK:               NO
--     Aravis SDK:                  NO
--     UniCap:                      NO
--     UniCap ucil:                 NO
--     V4L/V4L2:                    NO/YES
--     XIMEA:                       NO
--     Xine:                        NO
--     gPhoto2:                     NO
-- 
--   Parallel framework:            TBB (ver 4.2 interface 7000)
-- 
--   Other third-party libraries:
--     Use IPP:                     9.0.1 [9.0.1]
--          at:                     /home/venkatesh/opencv/opencv-3.2.0/build/3rdparty/ippicv/ippicv_lnx
--     Use IPP Async:               NO
--     Use VA:                      NO
--     Use Intel VA-API/OpenCL:     NO
--     Use Lapack:                  NO
--     Use Eigen:                   YES (ver 3.2.0)
--     Use Cuda:                    NO
--     Use OpenCL:                  YES
--     Use OpenVX:                  NO
--     Use custom HAL:              NO
-- 
--   OpenCL:                        <Dynamic loading of OpenCL library>
--     Include path:                /home/venkatesh/opencv/opencv-3.2.0/3rdparty/include/opencl/1.2
--     Use AMDFFT:                  NO
--     Use AMDBLAS:                 NO
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.6)
-- 
--   Python 3:
--     Interpreter:                 /usr/bin/python3.4 (ver 3.4.3)
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:
--     ant:                         /usr/bin/ant (ver 1.9.3)
--     JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Matlab:                        Matlab not found or implicitly disabled
-- 
--   Documentation:
--     Doxygen:                     NO
-- 
--   Tests and samples:
--     Tests:                       NO
--     Performance tests:           NO
--     C/C++ Examples:              YES
-- 
--   Install path:                  /usr/local
-- 
--   cvconfig.h is in:              /home/venkatesh/opencv/opencv-3.2.0/build
-- -----------------------------------------------------------------
-- 
-- Configuring incomplete, errors occurred!
See also "/home/venkatesh/opencv/opencv-3.2.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/venkatesh/opencv/opencv-3.2.0/build/CMakeFiles/CMakeError.log".

如果有人可以发布这个问题的答案,我欠你很多。谢谢。

-DOPENCV_EXTRA_MODULES_PATH=/home/venkatesh/opencv/opencv_contrib-3.2.0/modules

-DOPENCV_之间有空间请改为检查:

-D OPENCV_EXTRA_MODULES_PATH=/home/venkatesh/opencv_contrib-3.2.0/modules /home/venkatesh/opencv/

最后一件事是,这只有在以下情况下才有效

    /
  1. home/venkatesh 是包含 openCV 和 opencv_contrib-3.2.0 文件的目录
  2. 您位于/home/venkatesh/opencv/ 的目录中

通常人们给出的目录名称是构建或发布。

我想发表评论,但不知何故无法恢复我的帐户。所以我没有足够的声誉来评论。

最新更新