cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=../build/ ..

来源:互联网 发布:淘宝新店盗图违规扣分 编辑:程序博客网 时间:2024/06/07 01:09

下面是我装了gtk2-devel.x86_64以后安装opencv3.0.0的时候,打印出来的log。
这个时候,DisplayImage程序是可以正常显示图片的了,重启也不会造成无法显示登录界面了。

//—–2015-12-29 17:19补充—–//
在后面要用到一些识别类的时候,才发现好像缺少了什么东西。那些之前的createEigenFaceRecognizer找不到了。
google了一把,找到相关的说明:
http://answers.opencv.org/question/56859/opencv-300-facerecognizer-and-python-bindings/
https://github.com/Itseez/opencv_contrib
原来3.0的时候,opencv_contrib要单独下载编译:

How to build OpenCV with extra modulesYou can build OpenCV, so it will include the modules from this repository. Here is the CMake command for you:$ cd <opencv_build_directory>$ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>$ make -j5

按说明下载,重新编译。

一个比较长的示例:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -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 USE_EIGEN=/usr/include/eigen3 -D OPENCV_EXTRA_MODULES_PATH=/home/d3athmast3r/dev/opencv_contrib/modules ..

待续。。。

//——————2015-12-29 17:19补充 结束————————//

[root@localhost release]# cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=../build/ ..
– Detected version of GNU GCC: 48 (408)
– Found ZLIB: /lib64/libz.so (found suitable version “1.2.7”, minimum required is “1.2.3”)
– Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
– Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)
– Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR)
– Found ZLIB: /lib64/libz.so (found version “1.2.7”)
– Found PNG: /lib64/libpng.so (found version “1.5.13”)
– Looking for /usr/include/libpng/png.h
– Looking for /usr/include/libpng/png.h - not found
– checking for module ‘gtk+-3.0’
– package ‘gtk+-3.0’ not found
– checking for module ‘gtk+-2.0’
– found gtk+-2.0, version 2.24.28
– checking for module ‘gthread-2.0’
– found gthread-2.0, version 2.42.2
– checking for module ‘gstreamer-base-1.0’
– package ‘gstreamer-base-1.0’ not found
– checking for module ‘gstreamer-video-1.0’
– package ‘gstreamer-video-1.0’ not found
– checking for module ‘gstreamer-app-1.0’
– package ‘gstreamer-app-1.0’ not found
– checking for module ‘gstreamer-riff-1.0’
– package ‘gstreamer-riff-1.0’ not found
– checking for module ‘gstreamer-pbutils-1.0’
– package ‘gstreamer-pbutils-1.0’ not found
– checking for module ‘gstreamer-base-0.10’
– package ‘gstreamer-base-0.10’ not found
– checking for module ‘gstreamer-video-0.10’
– package ‘gstreamer-video-0.10’ not found
– checking for module ‘gstreamer-app-0.10’
– package ‘gstreamer-app-0.10’ not found
– checking for module ‘gstreamer-riff-0.10’
– package ‘gstreamer-riff-0.10’ not found
– checking for module ‘gstreamer-pbutils-0.10’
– package ‘gstreamer-pbutils-0.10’ not found
– checking for module ‘libdc1394-2’
– package ‘libdc1394-2’ not found
– checking for module ‘libdc1394’
– package ‘libdc1394’ not found
– checking for module ‘libv4l1’
– package ‘libv4l1’ not found
– checking for module ‘libv4l2’
– package ‘libv4l2’ not 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 ‘libavcodec’
– package ‘libavcodec’ not found
– checking for module ‘libavformat’
– package ‘libavformat’ not found
– checking for module ‘libavutil’
– package ‘libavutil’ not found
– checking for module ‘libswscale’
– package ‘libswscale’ not found
– checking for module ‘libavresample’
– package ‘libavresample’ not found
– Looking for libavformat/avformat.h
– Looking for libavformat/avformat.h - not found
– Looking for ffmpeg/avformat.h
– Looking for ffmpeg/avformat.h - not found
– checking for module ‘libgphoto2’
– package ‘libgphoto2’ not found
– found IPP (ICV version): 8.2.1 [8.2.1]
– at: /home/gumh/software/opencv-3.0.0/3rdparty/ippicv/unpack/ippicv_lnx
– Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
– To enable PlantUML support, set PLANTUML_JAR environment variable or pass -DPLANTUML_JAR= option to cmake
– Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is exact version “2.7.5”)
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named numpy.distutils
– Could NOT find PythonInterp: Found unsuitable version “2.7.5”, but required is at least “3.4” (found /usr/bin/python)
– Could NOT find PythonInterp: Found unsuitable version “2.7.5”, but required is at least “3.2” (found /usr/bin/python)
– Could NOT find JNI (missing: 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

– videoio: Removing WinRT API headers by default

– General configuration for OpenCV 3.0.0 =====================================

– Version control: unknown

– Platform:
– Host: Linux 3.10.0-123.el7.x86_64 x86_64
– CMake: 2.8.11
– CMake generator: Unix Makefiles
– CMake build tool: /usr/bin/gmake

– Configuration: Release

– C/C++:
– Built as dynamic libs?: YES
– C++ Compiler: /usr/bin/c++ (ver 4.8.5)
– 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 -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 -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 -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 -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):
– Precompiled headers: YES
– Extra dependencies: dl m pthread rt

– 3rdparty dependencies: ippicv

– OpenCV modules:
– To be built: hal core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d stitching videostab
– Disabled: world
– Disabled by dependency: -

– Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz

– GUI:
– QT: NO
– GTK+ 2.x: YES (ver 2.24.28)
– GThread : YES (ver 2.42.2)
– GtkGlExt: NO
– OpenGL support: NO

– VTK support: NO

– Media I/O:
– ZLib: /lib64/libz.so (ver 1.2.7)
– JPEG: libjpeg (ver 90)
– WEBP: build (ver 0.3.1)
– PNG: /lib64/libpng.so (ver 1.5.13)
– 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:
– DC1394 1.x: NO
– DC1394 2.x: NO
– FFMPEG: NO
– codec: NO
– format: NO
– util: NO
– swscale: NO
– resample: NO
– gentoo-style: NO
– GStreamer: NO
– OpenNI: NO
– OpenNI PrimeSensor Modules: NO
– OpenNI2: NO
– PvAPI: NO
– GigEVisionSDK: NO
– UniCap: NO
– UniCap ucil: NO
– V4L/V4L2: NO/YES
– XIMEA: NO
– Xine: NO

– gPhoto2: NO

– Other third-party libraries:
– Use IPP: 8.2.1 [8.2.1]
– at: /home/gumh/software/opencv-3.0.0/3rdparty/ippicv/unpack/ippicv_lnx
– Use IPP Async: NO
– Use Eigen: NO
– Use TBB: NO
– Use OpenMP: NO
– Use GCD NO
– Use Concurrency NO
– Use C=: NO
– Use pthreads for parallel for:
– YES
– Use Cuda: NO

– Use OpenCL: YES

– OpenCL:
– Version: dynamic
– Include path: /home/gumh/software/opencv-3.0.0/3rdparty/include/opencl/1.2
– Use AMDFFT: NO

– Use AMDBLAS: NO

– Python 2:

– Interpreter: /usr/bin/python2.7 (ver 2.7.5)

– Python 3:

– Interpreter: NO

– Python (for build): /usr/bin/python2.7

– Java:
– ant: NO
– JNI: NO
– Java wrappers: NO

– Java tests: NO

– Matlab:

– mex: NO

– Documentation:
– Doxygen: NO

– PlantUML: NO

– Tests and samples:
– Tests: YES
– Performance tests: YES

– C/C++ Examples: NO

– Install path: /home/gumh/software/opencv-3.0.0/build

– cvconfig.h is in: /home/gumh/software/opencv-3.0.0/release

– —————————————————————–

– Configuring done
– Generating done
– Build files have been written to: /home/gumh/software/opencv-3.0.0/release
[root@localhost release]#

0 0