Jetson TX2でOpenCV4.0.0をビルド
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[:OpenCV]]
#contents
*概要 [#k08c540a]
-[[:OpenCV 4.0]] が2018-11-18にリリースされたので、[[Jets...
*前提準備 [#g43eb7f6]
-[[Jetson TX2]]を参照
*今回のターゲット [#qb1230e6]
-Jetson TX2
-OS:Ubuntu 16.04
-CPU:Arm Cortex-A57 Quad core + Denver Dual core
-OpenCV 4.0.0
-cmake 3.5.1
-gcc 5.4.0
-CUDA 8.0
-opencv_contribつき
*OpenCV の取得 [#c0561442]
-gitでcloneして
-4.0.0をチェックアウトする
-パスは適宜合わせて
~$ time git clone git@github.com:opencv/opencv.git openc...
~$ cd opencv-fork/
~/opencv-fork$ time git checkout -b Branch_4_0_0 4.0.0
Switched to a new branch 'Branch_4_0_0'
-opencv_contirbもcloneし、4.0.0をチェックアウトする
~$ time git clone git@github.com:opencv/opencv_contrib.g...
~$ cd opencv_contrib
~/opencv_contrib$ time git checkout -b Branch_4_0_0 4.0.0
Switched to a new branch 'Branch_4_0_0'
-詳細は割愛
*OpenCV4.0.0のビルド [#q8a3f253]
-cmakeのfull logは[[こちら>https://gist.github.com/tomoak...
-make allのfull logは[[こちら>https://gist.github.com/tom...
**cmake [#yf50aa65]
-[[ODROID-X2でOpenCV 3.1.0をビルド]]同様、out of source b...
~/opencv-fork$ mkdir build
~/opencv-fork$ cd build
~/opencv-fork/build$ time cmake -DOPENCV_ENABLE_NONFREE...
(中略)
real 1m29.425s
user 1m3.848s
sys 0m19.152s
**make all [#wf65a271]
-5コアを使ったビルドする
~/opencv-fork/build$ time make -j 5 all
(中略)
real 124m31.314s
user 540m42.756s
sys 20m49.564s
-ccacheがほとんど効かなくて、2時間以上かかった
**make install [#v267ac90]
-割愛
*OpenCVビルド時のコンフィグなど [#xb1ecca7]
**cvconfig.h [#o14c61c9]
#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 " 62"
/* 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 " 62"
/* Compile for 'virtual' NVIDIA PTX architectures */
#define CUDA_ARCH_PTX ""
/* AVFoundation video libraries */
/* #undef HAVE_AVFOUNDATION */
/* V4L2 capturing support */
#define HAVE_CAMV4L2
/* 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 */
/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) AP...
#define HAVE_CUBLAS
/* NVIDIA CUDA Runtime API*/
#define HAVE_CUDA
/* NVIDIA CUDA Fast Fourier Transform (FFT) API*/
#define HAVE_CUFFT
/* IEEE1394 capturing support */
/* #undef HAVE_DC1394 */
/* IEEE1394 capturing support - libdc1394 v2.x */
/* #undef 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 */
#define HAVE_EIGEN
/* FFMpeg video library */
/* #undef 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 */
/* #undef HAVE_GTK */
/* Halide support */
/* #undef HAVE_HALIDE */
/* Vulkan support */
/* #undef HAVE_VULKAN */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Intel Perceptual Computing SDK library */
/* #undef HAVE_INTELPERC */
/* Intel Integrated Performance Primitives */
/* #undef HAVE_IPP */
/* #undef HAVE_IPP_ICV */
/* #undef HAVE_IPP_IW */
/* #undef HAVE_IPP_IW_LL */
/* 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 */
/* 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 */
/* librealsense library */
/* #undef HAVE_LIBREALSENSE */
/* 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 */
/* Intel Threading Building Blocks */
/* #undef HAVE_TBB */
/* Ste||ar Group High Performance ParallelX */
/* #undef HAVE_HPX */
/* TIFF codec */
#define HAVE_TIFF
/* 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_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_AVFOUNDATION) || \
defined(HAVE_FFMPEG) || \
defined(HAVE_MSMF)
#define HAVE_VIDEO_OUTPUT
#endif
/* OpenCV trace utilities */
#define OPENCV_TRACE
/* Library QR-code decoding */
#define HAVE_QUIRC
#endif // OPENCV_CVCONFIG_H_INCLUDED
}}
**opencv_version -v [#xb291a5f]
General configuration for OpenCV 4.0.0 =================...
Version control: 4.0.0
Extra modules:
Location (extra): /home/nvidia/opencv_con...
Version control (extra): 4.0.0
Platform:
Timestamp: 2018-11-19T01:16:56Z
Host: Linux 4.4.15-tegra aarc...
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 5.4.0)
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 cudart ...
3rdparty dependencies:
OpenCV modules:
To be built: aruco bgsegm bioinspire...
Disabled: world
Disabled by dependency: -
Unavailable: cnn_3dobj cvv freetype ...
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: YES
GUI:
GTK+: NO
VTK support: NO
Media I/O:
ZLib: /usr/lib/aarch64-linux-...
JPEG: libjpeg-turbo (ver 1.5....
WEBP: build (ver encoder: 0x0...
PNG: /usr/lib/aarch64-linux-...
TIFF: build (ver 42 - 4.0.9)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES
Video I/O:
DC1394: NO
FFMPEG: NO
avcodec: NO
avformat: NO
avutil: NO
swscale: NO
avresample: NO
GStreamer:
base: YES (ver 1.8.3)
video: YES (ver 1.8.3)
app: YES (ver 1.8.3)
riff: YES (ver 1.8.3)
pbutils: YES (ver 1.8.3)
v4l/v4l2: linux/videodev2.h
Parallel framework: pthreads
Trace: YES (built-in)
Other third-party libraries:
Lapack: NO
Eigen: YES (ver 3.2.92)
Custom HAL: YES (carotene (ver 0.0....
Protobuf: build (3.5.1)
NVIDIA CUDA: YES (ver 8.0, CUFFT CUB...
NVIDIA GPU arch: 62
NVIDIA PTX archs:
OpenCL: YES (no extra features)
Include path: /home/nvidia/opencv-for...
Link libraries: Dynamic load
Python (for build): /usr/bin/python2.7
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Install to: /usr/local
--------------------------------------------------------...
*ビルドされたライブラリや実行ファイル [#c77db297]
-割愛
*関連ページ [#a2b77e01]
-[[:OpenCV]]
-[[:OpenCV 4.0]]
-[[Jetson TX2]]
-[[Arm]]
終了行:
[[:OpenCV]]
#contents
*概要 [#k08c540a]
-[[:OpenCV 4.0]] が2018-11-18にリリースされたので、[[Jets...
*前提準備 [#g43eb7f6]
-[[Jetson TX2]]を参照
*今回のターゲット [#qb1230e6]
-Jetson TX2
-OS:Ubuntu 16.04
-CPU:Arm Cortex-A57 Quad core + Denver Dual core
-OpenCV 4.0.0
-cmake 3.5.1
-gcc 5.4.0
-CUDA 8.0
-opencv_contribつき
*OpenCV の取得 [#c0561442]
-gitでcloneして
-4.0.0をチェックアウトする
-パスは適宜合わせて
~$ time git clone git@github.com:opencv/opencv.git openc...
~$ cd opencv-fork/
~/opencv-fork$ time git checkout -b Branch_4_0_0 4.0.0
Switched to a new branch 'Branch_4_0_0'
-opencv_contirbもcloneし、4.0.0をチェックアウトする
~$ time git clone git@github.com:opencv/opencv_contrib.g...
~$ cd opencv_contrib
~/opencv_contrib$ time git checkout -b Branch_4_0_0 4.0.0
Switched to a new branch 'Branch_4_0_0'
-詳細は割愛
*OpenCV4.0.0のビルド [#q8a3f253]
-cmakeのfull logは[[こちら>https://gist.github.com/tomoak...
-make allのfull logは[[こちら>https://gist.github.com/tom...
**cmake [#yf50aa65]
-[[ODROID-X2でOpenCV 3.1.0をビルド]]同様、out of source b...
~/opencv-fork$ mkdir build
~/opencv-fork$ cd build
~/opencv-fork/build$ time cmake -DOPENCV_ENABLE_NONFREE...
(中略)
real 1m29.425s
user 1m3.848s
sys 0m19.152s
**make all [#wf65a271]
-5コアを使ったビルドする
~/opencv-fork/build$ time make -j 5 all
(中略)
real 124m31.314s
user 540m42.756s
sys 20m49.564s
-ccacheがほとんど効かなくて、2時間以上かかった
**make install [#v267ac90]
-割愛
*OpenCVビルド時のコンフィグなど [#xb1ecca7]
**cvconfig.h [#o14c61c9]
#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 " 62"
/* 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 " 62"
/* Compile for 'virtual' NVIDIA PTX architectures */
#define CUDA_ARCH_PTX ""
/* AVFoundation video libraries */
/* #undef HAVE_AVFOUNDATION */
/* V4L2 capturing support */
#define HAVE_CAMV4L2
/* 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 */
/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) AP...
#define HAVE_CUBLAS
/* NVIDIA CUDA Runtime API*/
#define HAVE_CUDA
/* NVIDIA CUDA Fast Fourier Transform (FFT) API*/
#define HAVE_CUFFT
/* IEEE1394 capturing support */
/* #undef HAVE_DC1394 */
/* IEEE1394 capturing support - libdc1394 v2.x */
/* #undef 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 */
#define HAVE_EIGEN
/* FFMpeg video library */
/* #undef 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 */
/* #undef HAVE_GTK */
/* Halide support */
/* #undef HAVE_HALIDE */
/* Vulkan support */
/* #undef HAVE_VULKAN */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Intel Perceptual Computing SDK library */
/* #undef HAVE_INTELPERC */
/* Intel Integrated Performance Primitives */
/* #undef HAVE_IPP */
/* #undef HAVE_IPP_ICV */
/* #undef HAVE_IPP_IW */
/* #undef HAVE_IPP_IW_LL */
/* 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 */
/* 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 */
/* librealsense library */
/* #undef HAVE_LIBREALSENSE */
/* 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 */
/* Intel Threading Building Blocks */
/* #undef HAVE_TBB */
/* Ste||ar Group High Performance ParallelX */
/* #undef HAVE_HPX */
/* TIFF codec */
#define HAVE_TIFF
/* 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_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_AVFOUNDATION) || \
defined(HAVE_FFMPEG) || \
defined(HAVE_MSMF)
#define HAVE_VIDEO_OUTPUT
#endif
/* OpenCV trace utilities */
#define OPENCV_TRACE
/* Library QR-code decoding */
#define HAVE_QUIRC
#endif // OPENCV_CVCONFIG_H_INCLUDED
}}
**opencv_version -v [#xb291a5f]
General configuration for OpenCV 4.0.0 =================...
Version control: 4.0.0
Extra modules:
Location (extra): /home/nvidia/opencv_con...
Version control (extra): 4.0.0
Platform:
Timestamp: 2018-11-19T01:16:56Z
Host: Linux 4.4.15-tegra aarc...
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 5.4.0)
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 cudart ...
3rdparty dependencies:
OpenCV modules:
To be built: aruco bgsegm bioinspire...
Disabled: world
Disabled by dependency: -
Unavailable: cnn_3dobj cvv freetype ...
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: YES
GUI:
GTK+: NO
VTK support: NO
Media I/O:
ZLib: /usr/lib/aarch64-linux-...
JPEG: libjpeg-turbo (ver 1.5....
WEBP: build (ver encoder: 0x0...
PNG: /usr/lib/aarch64-linux-...
TIFF: build (ver 42 - 4.0.9)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES
Video I/O:
DC1394: NO
FFMPEG: NO
avcodec: NO
avformat: NO
avutil: NO
swscale: NO
avresample: NO
GStreamer:
base: YES (ver 1.8.3)
video: YES (ver 1.8.3)
app: YES (ver 1.8.3)
riff: YES (ver 1.8.3)
pbutils: YES (ver 1.8.3)
v4l/v4l2: linux/videodev2.h
Parallel framework: pthreads
Trace: YES (built-in)
Other third-party libraries:
Lapack: NO
Eigen: YES (ver 3.2.92)
Custom HAL: YES (carotene (ver 0.0....
Protobuf: build (3.5.1)
NVIDIA CUDA: YES (ver 8.0, CUFFT CUB...
NVIDIA GPU arch: 62
NVIDIA PTX archs:
OpenCL: YES (no extra features)
Include path: /home/nvidia/opencv-for...
Link libraries: Dynamic load
Python (for build): /usr/bin/python2.7
Java:
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO
Install to: /usr/local
--------------------------------------------------------...
*ビルドされたライブラリや実行ファイル [#c77db297]
-割愛
*関連ページ [#a2b77e01]
-[[:OpenCV]]
-[[:OpenCV 4.0]]
-[[Jetson TX2]]
-[[Arm]]
ページ名: