[[:OpenCV]]

#contents
*概要 [#pf86c53f]
-[[:OpenCV 3.3]]がリリースされたので、[[Jetson TK1]]でビルドしてみた
*前提準備 [#r4dd74c8]
-[[Jetson TK1]]を参照
*今回のターゲット [#y8576f9a]
-Jetson TK1
-OS:Ubuntu 14.04
-CPU:ARM Cortex-A15 Quad core
-CPU:Arm Cortex-A15 Quad core
-OpenCV 3.3.0
-cmake 2.8.12.2
-gcc 4.8.4
-CUDA 6.5
*OpenCV の取得 [#o396aaad]
-gitでcloneして
-3.3.0をチェックアウトする
-パスは適宜合わせて
 ~$ time git clone git@github.com:opencv/opencv.git opencv-fork
 ~$ cd opencv-fork/
 ~/opencv-fork$ time git checkout -b Branch_3_3_0 3.3.0
 Switched to a new branch 'Branch_3_3_0'
-詳細は割愛
*OpenCV3.3.0のビルド [#x20513ae]
-cmakeのfull logは[[こちら>https://gist.github.com/tomoaki0705/87598fa6d87495540c9742d6e7c8d3ca]]
-make allのfull logは[[こちら>https://gist.github.com/tomoaki0705/a5a1860378b307f65a0521e945ed8863]]
**cmake [#xf447492]
-[[ODROID-X2でOpenCV 3.1.0をビルド]]同様、out of source buildする 
 ~/opencv-fork$ mkdir build
 ~/opencv-fork$ cd build
 ~/opencv-fork/build$ time cmake ..
 (中略)
 
 real	0m48.648s
 user	0m35.441s
 sys 0m8.172s
**make all [#p8a74eef]
-4コアをフルに使ったビルドする
 ~/opencv-fork/build$ time make -j 4 all
 (中略)
 
 real	67m37.351s
 user	189m29.296s
 sys 9m6.415s
**make install [#df83919c]
-(割愛)
*OpenCVビルド時のコンフィグなど [#ed4890eb]
**cvconfig.h [#i4c83c65]
#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 " 32"

/* 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 " 32"

/* 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) API*/
/* #undef 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 */
/* #undef HAVE_EIGEN */

/* FFMpeg video library */
/* #undef HAVE_FFMPEG */

/* Geospatial Data Abstraction Library */
/* #undef HAVE_GDAL */

/* GStreamer multimedia framework */
/* #undef 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_ONLY */
/* #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_PTHREADS

/* 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 significant byte
   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
}}
**version_string.inc [#kdc46e56]
 General configuration for OpenCV 3.3.0-dev =====================================
   Version control:               3.3.0-1-g87c27a0
 
   Platform:
     Timestamp:                   2017-08-04T05:44:45Z
     Host:                        Linux 3.10.40-grinch-21.3.4 armv7l
     CMake:                       2.8.12.2
     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 -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 -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections  -mfpu=neon-fp16 -mfp16-format=ieee -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 -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections  -mfpu=neon-fp16 -mfp16-format=ieee -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 -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections  -mfpu=neon-fp16 -mfp16-format=ieee -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 -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections  -mfpu=neon-fp16 -mfp16-format=ieee -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
     Linker flags (Release):      
     Linker flags (Debug):        
     ccache:                      NO
     Precompiled headers:         YES
     Extra dependencies:          gtk-x11-2.0 gdk-x11-2.0 atk-1.0 gio-2.0 pangoft2-1.0 pangocairo-1.0 gdk_pixbuf-2.0 cairo pango-1.0 fontconfig gobject-2.0 glib-2.0 freetype gthread-2.0 /usr/lib/arm-linux-gnueabihf/libpng.so /usr/lib/arm-linux-gnueabihf/libz.so dl m pthread rt cudart nppc nppi npps cufft -L/usr/local/cuda/lib
     3rdparty dependencies:
 
   OpenCV modules:
     To be built:                 cudev core cudaarithm flann imgproc ml objdetect video cudabgsegm cudafilters cudaimgproc cudawarping dnn imgcodecs photo shape videoio cudacodec highgui ts features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo stitching superres videostab
     Disabled:                    world
     Disabled by dependency:      -
     Unavailable:                 java python2 python3 viz
 
   GUI: 
     QT:                          NO
     GTK+ 2.x:                    YES (ver 2.24.23)
     GThread :                    YES (ver 2.40.2)
     GtkGlExt:                    NO
     OpenGL support:              NO
     VTK support:                 NO
 
   Media I/O: 
     ZLib:                        /usr/lib/arm-linux-gnueabihf/libz.so (ver 1.2.8)
     JPEG:                        libjpeg (ver 90)
     WEBP:                        build (ver encoder: 0x020e)
     PNG:                         /usr/lib/arm-linux-gnueabihf/libpng.so (ver 1.2.50)
     TIFF:                        build (ver 42 - 4.0.2)
     JPEG 2000:                   build (ver 1.900.1)
     OpenEXR:                     build (ver 1.7.1)
     GDAL:                        NO
     GDCM:                        NO
 
   Video I/O:
     DC1394 1.x:                  NO
     DC1394 2.x:                  NO
     FFMPEG:                      NO
       avcodec:                   NO
       avformat:                  NO
       avutil:                    NO
       swscale:                   NO
       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
     Intel Media SDK:             NO
     gPhoto2:                     NO
 
   Parallel framework:            pthreads
 
   Trace:                         YES ()
 
   Other third-party libraries:
     Use Intel IPP:               NO
     Use Intel IPP IW:            NO
     Use VA:                      NO
     Use Intel VA-API/OpenCL:     NO
     Use Lapack:                  NO
     Use Eigen:                   NO
     Use Cuda:                    YES (ver 6.5)
     Use OpenCL:                  YES
     Use OpenVX:                  NO
     Use custom HAL:              YES (carotene (ver 0.0.1))
 
   NVIDIA CUDA
     Use CUFFT:                   YES
     Use CUBLAS:                  NO
     USE NVCUVID:                 NO
     NVIDIA GPU arch:             32
     NVIDIA PTX archs:
     Use fast math:               NO
 
   OpenCL:                        <Dynamic loading of OpenCL library>
     Include path:                /home/ubuntu/opencv-fork/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:                         NO
     JNI:                         NO
     Java wrappers:               NO
     Java tests:                  NO
 
   Matlab:                        Matlab not found or implicitly disabled
 
   Documentation:
     Doxygen:                     NO
 
   Tests and samples:
     Tests:                       YES
     Performance tests:           YES
     C/C++ Examples:              NO
 
   Install path:                  /usr/local
 
   cvconfig.h is in:              /home/ubuntu/opencv-fork/build
 -----------------------------------------------------------------
 
 Configuring done
 Generating done
 Build files have been written to: /home/ubuntu/opencv-fork/build
*ビルドされたライブラリや実行ファイル [#gca0ba4f]
割愛

*関連ページ [#w38605df]
-[[:OpenCV]]
-[[:OpenCV 3.3]]
-[[Jetson TK1]]

-[[Arm]]

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS