ODROID-X2でOpenCV 3.4.0をビルド
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[:OpenCV]]
#contents
*概要 [#l5d4f1f3]
-[[:OpenCV 3.4]]がリリースされたので、[[ODROID-X2]]でビル...
*前提準備 [#k2689af8]
-[[ODROID-X2]]を参照
*今回のターゲット [#f12a4b81]
-ODROID-X2
-OS:Ubuntu 14.04
-CPU:Arm Cortex-A9 Quad core 1.7GHz
-OpenCV 3.4.0
-cmake 3.5.1
-gcc 4.8.4
*OpenCV の取得 [#m8cb6760]
-gitでcloneして
-3.4.0をチェックアウトする
-パスは適宜合わせて
~$ time git clone git@github.com:opencv/opencv.git openc...
~$ cd opencv-fork/
~/opencv-fork$ time git checkout -b Branch_3_4_0 3.4.0
Switched to a new branch 'Branch_3_4_0'
-詳細は割愛
*OpenCV3.4.0のビルド [#k9831629]
-cmakeのfull logは[[こちら>https://gist.github.com/tomoak...
-make allのfull logは[[こちら>https://gist.github.com/tom...
**cmake [#rff5f754]
-[[ODROID-X2でOpenCV 3.1.0をビルド]]同様、out of source b...
~/opencv-fork$ mkdir build
~/opencv-fork$ cd build
~/opencv-fork/build$ time cmake -DCPU_BASELINE=FP16 -DNE...
(中略)
real 1m13.501s
user 0m48.070s
sys 0m11.890s
**make all [#ieff8882]
-4コアをフルに使ったビルドする
~/opencv-fork/build$ time make -j 4 all
(中略)
real 4m16.451s
user 4m40.760s
sys 1m15.095s
-ccacheを入れたので、ビルド時間は短くなった
**make install [#c7aa58b8]
-割愛
*OpenCVビルド時のコンフィグなど [#v4703732]
**cvconfig.h [#d38378f2]
#geshi(c++){{
#ifndef OPENCV_CVCONFIG_H_INCLUDED
#define OPENCV_CVCONFIG_H_INCLUDED
/* OpenCV compiled as static or dynamic libs */
#define BUILD_SHARED_LIBS
/* OpenCV intrinsics optimized code */
#define CV_ENABLE_INTRINSICS
/* OpenCV additional optimized code */
/* #undef CV_DISABLE_OPTIMIZATION */
/* Compile for 'real' NVIDIA GPU architectures */
#define CUDA_ARCH_BIN ""
/* Create PTX or BIN for 1.0 compute capability */
/* #undef CUDA_ARCH_BIN_OR_PTX_10 */
/* NVIDIA GPU features are used */
#define CUDA_ARCH_FEATURES ""
/* Compile for 'virtual' NVIDIA PTX architectures */
#define CUDA_ARCH_PTX ""
/* AVFoundation video libraries */
/* #undef HAVE_AVFOUNDATION */
/* V4L capturing support */
/* #undef HAVE_CAMV4L */
/* V4L2 capturing support */
#define HAVE_CAMV4L2
/* Carbon windowing environment */
/* #undef HAVE_CARBON */
/* AMD's Basic Linear Algebra Subprograms Library*/
/* #undef HAVE_CLAMDBLAS */
/* AMD's OpenCL Fast Fourier Transform Library*/
/* #undef HAVE_CLAMDFFT */
/* Clp support */
/* #undef HAVE_CLP */
/* Cocoa API */
/* #undef HAVE_COCOA */
/* C= */
/* #undef HAVE_CSTRIPES */
/* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) AP...
/* #undef HAVE_CUBLAS */
/* NVidia Cuda Runtime API*/
/* #undef HAVE_CUDA */
/* NVidia Cuda Fast Fourier Transform (FFT) API*/
/* #undef HAVE_CUFFT */
/* IEEE1394 capturing support */
/* #undef HAVE_DC1394 */
/* IEEE1394 capturing support - libdc1394 v2.x */
#define HAVE_DC1394_2
/* DirectX */
/* #undef HAVE_DIRECTX */
/* #undef HAVE_DIRECTX_NV12 */
/* #undef HAVE_D3D11 */
/* #undef HAVE_D3D10 */
/* #undef HAVE_D3D9 */
/* DirectShow Video Capture library */
/* #undef HAVE_DSHOW */
/* Eigen Matrix & Linear Algebra Library */
/* #undef HAVE_EIGEN */
/* FFMpeg video library */
#define HAVE_FFMPEG
/* Geospatial Data Abstraction Library */
/* #undef HAVE_GDAL */
/* GStreamer multimedia framework */
#define HAVE_GSTREAMER
/* GTK+ 2.0 Thread support */
#define HAVE_GTHREAD
/* GTK+ 2.x toolkit */
#define HAVE_GTK
/* Halide support */
/* #undef HAVE_HALIDE */
/* Define to 1 if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* Intel Perceptual Computing SDK library */
/* #undef HAVE_INTELPERC */
/* Intel Integrated Performance Primitives */
/* #undef HAVE_IPP */
/* #undef HAVE_IPP_ICV */
/* #undef HAVE_IPP_IW */
/* Intel IPP Async */
/* #undef HAVE_IPP_A */
/* JPEG-2000 codec */
#define HAVE_JASPER
/* IJG JPEG codec */
#define HAVE_JPEG
/* libpng/png.h needs to be included */
#define HAVE_LIBPNG_PNG_H
/* GDCM DICOM codec */
/* #undef HAVE_GDCM */
/* V4L/V4L2 capturing support via libv4l */
/* #undef HAVE_LIBV4L */
/* Microsoft Media Foundation Capture library */
/* #undef HAVE_MSMF */
/* NVidia Video Decoding API*/
/* #undef HAVE_NVCUVID */
/* NVidia Video Encoding API*/
/* #undef HAVE_NVCUVENC */
/* OpenCL Support */
#define HAVE_OPENCL
/* #undef HAVE_OPENCL_STATIC */
/* #undef HAVE_OPENCL_SVM */
/* OpenEXR codec */
#define HAVE_OPENEXR
/* OpenGL support*/
/* #undef HAVE_OPENGL */
/* OpenNI library */
/* #undef HAVE_OPENNI */
/* OpenNI library */
/* #undef HAVE_OPENNI2 */
/* PNG codec */
#define HAVE_PNG
/* Posix threads (pthreads) */
#define HAVE_PTHREAD
/* parallel_for with pthreads */
#define HAVE_PTHREADS_PF
/* Qt support */
/* #undef HAVE_QT */
/* Qt OpenGL support */
/* #undef HAVE_QT_OPENGL */
/* QuickTime video libraries */
/* #undef HAVE_QUICKTIME */
/* QTKit video libraries */
/* #undef HAVE_QTKIT */
/* Intel Threading Building Blocks */
/* #undef HAVE_TBB */
/* TIFF codec */
#define HAVE_TIFF
/* Unicap video capture library */
/* #undef HAVE_UNICAP */
/* Video for Windows support */
/* #undef HAVE_VFW */
/* V4L2 capturing support in videoio.h */
/* #undef HAVE_VIDEOIO */
/* Win32 UI */
/* #undef HAVE_WIN32UI */
/* XIMEA camera support */
/* #undef HAVE_XIMEA */
/* Xine video library */
/* #undef HAVE_XINE */
/* Define if your processor stores words with the most si...
first (like Motorola and SPARC, unlike Intel and VAX)....
/* #undef WORDS_BIGENDIAN */
/* gPhoto2 library */
/* #undef HAVE_GPHOTO2 */
/* VA library (libva) */
/* #undef HAVE_VA */
/* Intel VA-API/OpenCL */
/* #undef HAVE_VA_INTEL */
/* Intel Media SDK */
/* #undef HAVE_MFX */
/* Lapack */
/* #undef HAVE_LAPACK */
/* Library was compiled with functions instrumentation */
/* #undef ENABLE_INSTRUMENTATION */
/* OpenVX */
/* #undef HAVE_OPENVX */
#if defined(HAVE_XINE) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_QTKIT) || \
defined(HAVE_AVFOUNDATION) || \
/*defined(HAVE_OPENNI) || too specialized */ \
defined(HAVE_FFMPEG) || \
defined(HAVE_MSMF)
#define HAVE_VIDEO_INPUT
#endif
#if /*defined(HAVE_XINE) || */\
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_QTKIT) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_FFMPEG) || \
defined(HAVE_MSMF)
#define HAVE_VIDEO_OUTPUT
#endif
/* OpenCV trace utilities */
#define OPENCV_TRACE
#endif // OPENCV_CVCONFIG_H_INCLUDED
}}
**opencv_version -v [#t1d12fbc]
General configuration for OpenCV 3.4.0 =================...
Version control: 3.4.0
Platform:
Timestamp: 2018-02-05T03:50:21Z
Host: Linux 3.8.13.23 armv7l
CMake: 3.5.1
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: Release
CPU/HW features:
Baseline: NEON FP16
requested: FP16
required: NEON
disabled: VFPV3
C/C++:
Built as dynamic libs?: YES
C++ Compiler: /usr/bin/c++ (ver 4.8.4)
C++ flags (Release): -fsigned-char -W -Wall ...
C++ flags (Debug): -fsigned-char -W -Wall ...
C Compiler: /usr/bin/cc
C flags (Release): -fsigned-char -W -Wall ...
C flags (Debug): -fsigned-char -W -Wall ...
Linker flags (Release):
Linker flags (Debug):
ccache: YES
Precompiled headers: NO
Extra dependencies: dl m pthread rt
3rdparty dependencies:
OpenCV modules:
To be built: calib3d core dnn featur...
Disabled: js world
Disabled by dependency: -
Unavailable: cudaarithm cudabgsegm c...
Applications: tests perf_tests exampl...
Documentation: NO
Non-free algorithms: NO
GUI:
GTK+: YES (ver 3.10.8)
GThread : YES (ver 2.40.2)
GtkGlExt: NO
VTK support: NO
Media I/O:
ZLib: /usr/lib/arm-linux-gnue...
JPEG: /usr/lib/arm-linux-gnue...
WEBP: /usr/lib/arm-linux-gnue...
PNG: /usr/lib/arm-linux-gnue...
TIFF: /usr/lib/arm-linux-gnue...
JPEG 2000: /usr/lib/arm-linux-gnue...
OpenEXR: /usr/lib/arm-linux-gnue...
Video I/O:
DC1394: 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:
base: YES (ver 1.3.1.1)
video: YES (ver 1.3.1.1)
app: YES (ver 1.3.1.1)
riff: YES (ver 1.3.1.1)
pbutils: YES (ver 1.3.1.1)
libv4l/libv4l2: NO
v4l/v4l2: linux/videodev2.h
gPhoto2: NO
Parallel framework: pthreads
Trace: YES (built-in)
Other third-party libraries:
Lapack: NO
Eigen: NO
Custom HAL: YES (carotene (ver 0.0....
NVIDIA CUDA: NO
OpenCL: YES (no extra features)
Include path: /home/odroid/opencv-for...
Link libraries: Dynamic load
Python (for build): /usr/bin/python2.7
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Matlab: NO
Install to: /usr/local
--------------------------------------------------------...
*ビルドされたライブラリや実行ファイル [#x6687423]
-割愛
*関連ページ [#l52b3f38]
-[[:OpenCV]]
-[[:OpenCV 3.4]]
-[[ODROID-X2]]
-[[Arm]]
終了行:
[[:OpenCV]]
#contents
*概要 [#l5d4f1f3]
-[[:OpenCV 3.4]]がリリースされたので、[[ODROID-X2]]でビル...
*前提準備 [#k2689af8]
-[[ODROID-X2]]を参照
*今回のターゲット [#f12a4b81]
-ODROID-X2
-OS:Ubuntu 14.04
-CPU:Arm Cortex-A9 Quad core 1.7GHz
-OpenCV 3.4.0
-cmake 3.5.1
-gcc 4.8.4
*OpenCV の取得 [#m8cb6760]
-gitでcloneして
-3.4.0をチェックアウトする
-パスは適宜合わせて
~$ time git clone git@github.com:opencv/opencv.git openc...
~$ cd opencv-fork/
~/opencv-fork$ time git checkout -b Branch_3_4_0 3.4.0
Switched to a new branch 'Branch_3_4_0'
-詳細は割愛
*OpenCV3.4.0のビルド [#k9831629]
-cmakeのfull logは[[こちら>https://gist.github.com/tomoak...
-make allのfull logは[[こちら>https://gist.github.com/tom...
**cmake [#rff5f754]
-[[ODROID-X2でOpenCV 3.1.0をビルド]]同様、out of source b...
~/opencv-fork$ mkdir build
~/opencv-fork$ cd build
~/opencv-fork/build$ time cmake -DCPU_BASELINE=FP16 -DNE...
(中略)
real 1m13.501s
user 0m48.070s
sys 0m11.890s
**make all [#ieff8882]
-4コアをフルに使ったビルドする
~/opencv-fork/build$ time make -j 4 all
(中略)
real 4m16.451s
user 4m40.760s
sys 1m15.095s
-ccacheを入れたので、ビルド時間は短くなった
**make install [#c7aa58b8]
-割愛
*OpenCVビルド時のコンフィグなど [#v4703732]
**cvconfig.h [#d38378f2]
#geshi(c++){{
#ifndef OPENCV_CVCONFIG_H_INCLUDED
#define OPENCV_CVCONFIG_H_INCLUDED
/* OpenCV compiled as static or dynamic libs */
#define BUILD_SHARED_LIBS
/* OpenCV intrinsics optimized code */
#define CV_ENABLE_INTRINSICS
/* OpenCV additional optimized code */
/* #undef CV_DISABLE_OPTIMIZATION */
/* Compile for 'real' NVIDIA GPU architectures */
#define CUDA_ARCH_BIN ""
/* Create PTX or BIN for 1.0 compute capability */
/* #undef CUDA_ARCH_BIN_OR_PTX_10 */
/* NVIDIA GPU features are used */
#define CUDA_ARCH_FEATURES ""
/* Compile for 'virtual' NVIDIA PTX architectures */
#define CUDA_ARCH_PTX ""
/* AVFoundation video libraries */
/* #undef HAVE_AVFOUNDATION */
/* V4L capturing support */
/* #undef HAVE_CAMV4L */
/* V4L2 capturing support */
#define HAVE_CAMV4L2
/* Carbon windowing environment */
/* #undef HAVE_CARBON */
/* AMD's Basic Linear Algebra Subprograms Library*/
/* #undef HAVE_CLAMDBLAS */
/* AMD's OpenCL Fast Fourier Transform Library*/
/* #undef HAVE_CLAMDFFT */
/* Clp support */
/* #undef HAVE_CLP */
/* Cocoa API */
/* #undef HAVE_COCOA */
/* C= */
/* #undef HAVE_CSTRIPES */
/* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) AP...
/* #undef HAVE_CUBLAS */
/* NVidia Cuda Runtime API*/
/* #undef HAVE_CUDA */
/* NVidia Cuda Fast Fourier Transform (FFT) API*/
/* #undef HAVE_CUFFT */
/* IEEE1394 capturing support */
/* #undef HAVE_DC1394 */
/* IEEE1394 capturing support - libdc1394 v2.x */
#define HAVE_DC1394_2
/* DirectX */
/* #undef HAVE_DIRECTX */
/* #undef HAVE_DIRECTX_NV12 */
/* #undef HAVE_D3D11 */
/* #undef HAVE_D3D10 */
/* #undef HAVE_D3D9 */
/* DirectShow Video Capture library */
/* #undef HAVE_DSHOW */
/* Eigen Matrix & Linear Algebra Library */
/* #undef HAVE_EIGEN */
/* FFMpeg video library */
#define HAVE_FFMPEG
/* Geospatial Data Abstraction Library */
/* #undef HAVE_GDAL */
/* GStreamer multimedia framework */
#define HAVE_GSTREAMER
/* GTK+ 2.0 Thread support */
#define HAVE_GTHREAD
/* GTK+ 2.x toolkit */
#define HAVE_GTK
/* Halide support */
/* #undef HAVE_HALIDE */
/* Define to 1 if you have the <inttypes.h> header file. */
/* #undef HAVE_INTTYPES_H */
/* Intel Perceptual Computing SDK library */
/* #undef HAVE_INTELPERC */
/* Intel Integrated Performance Primitives */
/* #undef HAVE_IPP */
/* #undef HAVE_IPP_ICV */
/* #undef HAVE_IPP_IW */
/* Intel IPP Async */
/* #undef HAVE_IPP_A */
/* JPEG-2000 codec */
#define HAVE_JASPER
/* IJG JPEG codec */
#define HAVE_JPEG
/* libpng/png.h needs to be included */
#define HAVE_LIBPNG_PNG_H
/* GDCM DICOM codec */
/* #undef HAVE_GDCM */
/* V4L/V4L2 capturing support via libv4l */
/* #undef HAVE_LIBV4L */
/* Microsoft Media Foundation Capture library */
/* #undef HAVE_MSMF */
/* NVidia Video Decoding API*/
/* #undef HAVE_NVCUVID */
/* NVidia Video Encoding API*/
/* #undef HAVE_NVCUVENC */
/* OpenCL Support */
#define HAVE_OPENCL
/* #undef HAVE_OPENCL_STATIC */
/* #undef HAVE_OPENCL_SVM */
/* OpenEXR codec */
#define HAVE_OPENEXR
/* OpenGL support*/
/* #undef HAVE_OPENGL */
/* OpenNI library */
/* #undef HAVE_OPENNI */
/* OpenNI library */
/* #undef HAVE_OPENNI2 */
/* PNG codec */
#define HAVE_PNG
/* Posix threads (pthreads) */
#define HAVE_PTHREAD
/* parallel_for with pthreads */
#define HAVE_PTHREADS_PF
/* Qt support */
/* #undef HAVE_QT */
/* Qt OpenGL support */
/* #undef HAVE_QT_OPENGL */
/* QuickTime video libraries */
/* #undef HAVE_QUICKTIME */
/* QTKit video libraries */
/* #undef HAVE_QTKIT */
/* Intel Threading Building Blocks */
/* #undef HAVE_TBB */
/* TIFF codec */
#define HAVE_TIFF
/* Unicap video capture library */
/* #undef HAVE_UNICAP */
/* Video for Windows support */
/* #undef HAVE_VFW */
/* V4L2 capturing support in videoio.h */
/* #undef HAVE_VIDEOIO */
/* Win32 UI */
/* #undef HAVE_WIN32UI */
/* XIMEA camera support */
/* #undef HAVE_XIMEA */
/* Xine video library */
/* #undef HAVE_XINE */
/* Define if your processor stores words with the most si...
first (like Motorola and SPARC, unlike Intel and VAX)....
/* #undef WORDS_BIGENDIAN */
/* gPhoto2 library */
/* #undef HAVE_GPHOTO2 */
/* VA library (libva) */
/* #undef HAVE_VA */
/* Intel VA-API/OpenCL */
/* #undef HAVE_VA_INTEL */
/* Intel Media SDK */
/* #undef HAVE_MFX */
/* Lapack */
/* #undef HAVE_LAPACK */
/* Library was compiled with functions instrumentation */
/* #undef ENABLE_INSTRUMENTATION */
/* OpenVX */
/* #undef HAVE_OPENVX */
#if defined(HAVE_XINE) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_QTKIT) || \
defined(HAVE_AVFOUNDATION) || \
/*defined(HAVE_OPENNI) || too specialized */ \
defined(HAVE_FFMPEG) || \
defined(HAVE_MSMF)
#define HAVE_VIDEO_INPUT
#endif
#if /*defined(HAVE_XINE) || */\
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_QTKIT) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_FFMPEG) || \
defined(HAVE_MSMF)
#define HAVE_VIDEO_OUTPUT
#endif
/* OpenCV trace utilities */
#define OPENCV_TRACE
#endif // OPENCV_CVCONFIG_H_INCLUDED
}}
**opencv_version -v [#t1d12fbc]
General configuration for OpenCV 3.4.0 =================...
Version control: 3.4.0
Platform:
Timestamp: 2018-02-05T03:50:21Z
Host: Linux 3.8.13.23 armv7l
CMake: 3.5.1
CMake generator: Unix Makefiles
CMake build tool: /usr/bin/make
Configuration: Release
CPU/HW features:
Baseline: NEON FP16
requested: FP16
required: NEON
disabled: VFPV3
C/C++:
Built as dynamic libs?: YES
C++ Compiler: /usr/bin/c++ (ver 4.8.4)
C++ flags (Release): -fsigned-char -W -Wall ...
C++ flags (Debug): -fsigned-char -W -Wall ...
C Compiler: /usr/bin/cc
C flags (Release): -fsigned-char -W -Wall ...
C flags (Debug): -fsigned-char -W -Wall ...
Linker flags (Release):
Linker flags (Debug):
ccache: YES
Precompiled headers: NO
Extra dependencies: dl m pthread rt
3rdparty dependencies:
OpenCV modules:
To be built: calib3d core dnn featur...
Disabled: js world
Disabled by dependency: -
Unavailable: cudaarithm cudabgsegm c...
Applications: tests perf_tests exampl...
Documentation: NO
Non-free algorithms: NO
GUI:
GTK+: YES (ver 3.10.8)
GThread : YES (ver 2.40.2)
GtkGlExt: NO
VTK support: NO
Media I/O:
ZLib: /usr/lib/arm-linux-gnue...
JPEG: /usr/lib/arm-linux-gnue...
WEBP: /usr/lib/arm-linux-gnue...
PNG: /usr/lib/arm-linux-gnue...
TIFF: /usr/lib/arm-linux-gnue...
JPEG 2000: /usr/lib/arm-linux-gnue...
OpenEXR: /usr/lib/arm-linux-gnue...
Video I/O:
DC1394: 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:
base: YES (ver 1.3.1.1)
video: YES (ver 1.3.1.1)
app: YES (ver 1.3.1.1)
riff: YES (ver 1.3.1.1)
pbutils: YES (ver 1.3.1.1)
libv4l/libv4l2: NO
v4l/v4l2: linux/videodev2.h
gPhoto2: NO
Parallel framework: pthreads
Trace: YES (built-in)
Other third-party libraries:
Lapack: NO
Eigen: NO
Custom HAL: YES (carotene (ver 0.0....
NVIDIA CUDA: NO
OpenCL: YES (no extra features)
Include path: /home/odroid/opencv-for...
Link libraries: Dynamic load
Python (for build): /usr/bin/python2.7
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Matlab: NO
Install to: /usr/local
--------------------------------------------------------...
*ビルドされたライブラリや実行ファイル [#x6687423]
-割愛
*関連ページ [#l52b3f38]
-[[:OpenCV]]
-[[:OpenCV 3.4]]
-[[ODROID-X2]]
-[[Arm]]
ページ名: