如何知道为 Ubuntu 12.04 上构建的 OpenCV 2.3.1 设置了哪些标志? [英] How to know which flags have been set for OpenCV 2.3.1 built on Ubuntu 12.04?

查看:54
本文介绍了如何知道为 Ubuntu 12.04 上构建的 OpenCV 2.3.1 设置了哪些标志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在一台已经构建了 OpenCV 的计算机上工作,而不是我的.但是,我想知道在构建时设置了哪些标志,例如WITH_TBB= 、 WITH_CUDA= 等.有没有办法从某个文件中获取这些信息?

I need to work on a computer, not mine, where OpenCV is already built. However, I would like to know which flags have been set when it was built, e.g. WITH_TBB= , WITH_CUDA= , and so on. Is there a way to get this information from some file?

推荐答案

只需运行这个:

#include <opencv2/opencv.hpp>
#include <iostream>

int main()
{
    // Get build information
    std::cout << cv::getBuildInformation();
}

它产生如下输出:

General configuration for OpenCV 3.0.0 =====================================
Version control:               unknown

Platform:
Host:                        Darwin 15.0.0 x86_64
CMake:                       3.3.2
CMake generator:             Unix Makefiles
CMake build tool:            /usr/local/Library/ENV/4.3/gmake
Configuration:               Release

C/C++:
Built as dynamic libs?:      YES
C++ Compiler:                /usr/local/Library/ENV/4.3/clang++  (ver 7.0.0.7000176)
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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mavx -fvisibility=hidden -fvisibility-inlines-hidden   -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mavx -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
C Compiler:                  /usr/local/Library/ENV/4.3/clang
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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mavx -fvisibility=hidden -fvisibility-inlines-hidden   -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 -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -fno-omit-frame-pointer -msse -msse2 -mavx -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
Linker flags (Release):
Linker flags (Debug):
Precompiled headers:         NO
Extra dependencies:          -framework OpenCL -framework Cocoa /usr/local/opt/jpeg/lib/libjpeg.dylib /usr/local/lib/libwebp.dylib /usr/local/lib/libpng.dylib /usr/local/lib/libtiff.dylib /usr/local/lib/libImath.dylib /usr/local/lib/libIlmImf.dylib /usr/local/lib/libIex.dylib /usr/local/lib/libHalf.dylib /usr/local/lib/libIlmThread.dylib /usr/lib/libz.dylib -framework QTKit -framework QuartzCore -framework AppKit
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 python2
Disabled:                    world
Disabled by dependency:      -
Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python3 viz

GUI:
QT:                          NO
Cocoa:                       YES
OpenGL support:              NO
VTK support:                 NO

Media I/O:
ZLib:                        /usr/lib/libz.dylib (ver 1.2.5)
JPEG:                        /usr/local/opt/jpeg/lib/libjpeg.dylib (ver 80)
WEBP:                        /usr/local/lib/libwebp.dylib (ver encoder: 0x0202)
PNG:                         /usr/local/lib/libpng.dylib (ver 1.6.18)
TIFF:                        /usr/local/lib/libtiff.dylib (ver 42 - 4.0.6)
JPEG 2000:                   NO
OpenEXR:                     /usr/local/lib/libImath.dylib /usr/local/lib/libIlmImf.dylib /usr/local/lib/libIex.dylib /usr/local/lib/libHalf.dylib /usr/local/lib/libIlmThread.dylib (ver 2.2.0)
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
QuickTime:                   NO
QTKit:                       YES
V4L/V4L2:                    NO/NO
XIMEA:                       NO
gPhoto2:                     NO

Other third-party libraries:
Use IPP:                     8.2.1 [8.2.1]
at:                     /tmp/opencv320151102-4718-8kzykk/opencv-3.0.0/3rdparty/ippicv/unpack/ippicv_osx
Use IPP Async:               NO
Use Eigen:                   YES (ver 3.2.6)
Use TBB:                     NO
Use OpenMP:                  NO
Use GCD                      YES
Use Concurrency              NO
Use C=:                      NO
Use pthreads for parallel for:
NO
Use Cuda:                    NO
Use OpenCL:                  YES

OpenCL:
Version:                     static
libraries:                   -framework OpenCL
Use AMDFFT:                  NO
Use AMDBLAS:                 NO

Python 2:
Interpreter:                 /usr/bin/python (ver 2.7.10)
Libraries:                   /System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib (ver 2.7.10)
numpy:                       /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include (ver 1.8.0rc1)
packages path:               lib/python2.7/site-packages

Python 3:
Interpreter:                 NO

Python (for build):            /usr/bin/python

Java:
ant:                         NO
JNI:                         /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers /System/Library/Frameworks/JavaVM.framework/Headers
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:                  /usr/local/Cellar/opencv3/3.0.0

cvconfig.h is in:              /tmp/opencv320151102-4718-8kzykk/opencv-3.0.0/macbuild
-----------------------------------------------------------------

这篇关于如何知道为 Ubuntu 12.04 上构建的 OpenCV 2.3.1 设置了哪些标志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆