概要

  • OpenCV3.0.0がリリースされたので、ODROID-X2でビルドしてみた

前提準備

OpenCVの3.0を取得する

  • まずはgitでcloneする
  • 3.0.0-betaの時にgit clone してあったので、git fetch で最新版にする
  • そして、3.0.0をチェックアウトする
    $ git fetch
    remote: Counting objects: 15301, done.
    remote: Compressing objects: 100% (36/36), done.
    remote: Total 15301 (delta 4056), reused 4048 (delta 4044), pack-reused 11220
    Receiving objects: 100% (15301/15301), 9.15 MiB | 2.35 MiB/s, done.
    Resolving deltas: 100% (9875/9875), completed with 1321 local objects.
    From https://github.com/Itseez/opencv
       047b1ca..707d10f  2.4        -> origin/2.4
       67635c6..00d9f69  2.4.10.x-prep -> origin/2.4.10.x-prep
       ba9bc2d..ff90f27  master     -> origin/master
     * [new tag]         2.4.10.2   -> 2.4.10.2
     * [new tag]         2.4.11     -> 2.4.11
     * [new tag]         3.0.0      -> 3.0.0
     * [new tag]         3.0.0-rc1  -> 3.0.0-rc1
    $ git checkout 3.0.0
    Previous HEAD position was ae4cb57... Set status to beta
    HEAD is now at c12243c... Version for 3.0.0 release

OpenCV3.0のビルド

  • cmake してビルドする
    cd opencv
    cmake -DBUILD_EXAMPLES:BOOL=ON -DBUILD_TEST:BOOL=ON -DENABLE_NEON:BOOL=on
    time make all
    #======
    #real	83m52.574s
    #user	78m11.325s
    #sys	2m59.930s
  • Arm Cortex-A9(1.7GHz)でざっくり83minぐらいかかった

OpenCVビルド時のコンフィグなど

cvconfig.h

/* OpenCV compiled as static or dynamic libs */
#define BUILD_SHARED_LIBS

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

/* ffmpeg's libswscale */
#define HAVE_FFMPEG_SWSCALE

/* ffmpeg in Gentoo */
#define HAVE_GENTOO_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

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

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

/* V4L/V4L2 capturing support via libv4l */
#define HAVE_LIBV4L

/* Microsoft Media Foundation Capture library */
/* #undef HAVE_MSMF */

/* NVidia Video Decoding API*/
/* #undef HAVE_NVCUVID */

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

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

version_string.inc

  videoio: Removing WinRT API headers by default

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

  Platform:
    Host:                        Linux 3.8.13.23 armv7l
    CMake:                       2.8.12.2
    CMake generator:             Unix Makefiles
    CMake build tool:            /usr/bin/make
    Configuration:               Release

  C/C++:
    Built as dynamic libs?:      YES
    C++ Compiler:                /usr/bin/c++  (ver 4.8.2)
    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 -pthread -fomit-frame-pointer -mfpu=neon -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 -pthread -fomit-frame-pointer -mfpu=neon -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 -pthread -fomit-frame-pointer -mfpu=neon -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 -pthread -fomit-frame-pointer -mfpu=neon -ffunction-sections -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):      
    Linker flags (Debug):        
    Precompiled headers:         YES
    Extra dependencies:          /usr/lib/arm-linux-gnueabihf/libwebp.so /usr/lib/arm-linux-gnueabihf/libpng.so /usr/lib/arm-linux-gnueabihf/libz.so /usr/lib/arm-linux-gnueabihf/libtiff.so /usr/lib/arm-linux-gnueabihf/libjasper.so /usr/lib/arm-linux-gnueabihf/libjpeg.so /usr/lib/arm-linux-gnueabihf/libImath.so /usr/lib/arm-linux-gnueabihf/libIlmImf.so /usr/lib/arm-linux-gnueabihf/libIex.so /usr/lib/arm-linux-gnueabihf/libHalf.so /usr/lib/arm-linux-gnueabihf/libIlmThread.so gtk-3 gdk-3 atk-1.0 gio-2.0 pangocairo-1.0 gdk_pixbuf-2.0 cairo-gobject pango-1.0 cairo gthread-2.0 gstvideo-1.0 gstapp-1.0 gstbase-1.0 gstriff-1.0 gstpbutils-1.0 gstreamer-1.0 gobject-2.0 glib-2.0 dc1394 v4l1 v4l2 avcodec avformat avutil swscale /usr/lib/arm-linux-gnueabihf/libbz2.so dl m pthread rt
    3rdparty dependencies:

  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+ 3.x:                    YES (ver 3.10.8)
    GThread :                    YES (ver 2.40.0)
    GtkGlExt:                    NO
    OpenGL support:              NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        /usr/lib/arm-linux-gnueabihf/libz.so (ver 1.2.8)
    JPEG:                        /usr/lib/arm-linux-gnueabihf/libjpeg.so (ver )
    WEBP:                        /usr/lib/arm-linux-gnueabihf/libwebp.so (ver encoder: 0x0202)
    PNG:                         /usr/lib/arm-linux-gnueabihf/libpng.so (ver 1.2.50)
    TIFF:                        /usr/lib/arm-linux-gnueabihf/libtiff.so (ver 42 - 4.0.3)
    JPEG 2000:                   /usr/lib/arm-linux-gnueabihf/libjasper.so (ver 1.900.1)
    OpenEXR:                     /usr/lib/arm-linux-gnueabihf/libImath.so /usr/lib/arm-linux-gnueabihf/libIlmImf.so /usr/lib/arm-linux-gnueabihf/libIex.so /usr/lib/arm-linux-gnueabihf/libHalf.so /usr/lib/arm-linux-gnueabihf/libIlmThread.so (ver 1.6.1)
    GDAL:                        NO

  Video I/O:
    DC1394 1.x:                  NO
    DC1394 2.x:                  YES (ver 2.2.1)
    FFMPEG:                      YES
      codec:                     YES (ver 54.35.0)
      format:                    YES (ver 54.20.4)
      util:                      YES (ver 52.3.0)
      swscale:                   YES (ver 2.1.1)
      resample:                  NO
      gentoo-style:              YES
    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)
    OpenNI:                      NO
    OpenNI PrimeSensor Modules:  NO
    OpenNI2:                     NO
    PvAPI:                       NO
    GigEVisionSDK:               NO
    UniCap:                      NO
    UniCap ucil:                 NO
    V4L/V4L2:                    Using libv4l1 (ver 1.0.1) / libv4l2 (ver 1.0.1)
    XIMEA:                       NO
    Xine:                        NO
    gPhoto2:                     NO

  Other third-party libraries:
    Use IPP:                     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/odroid/work/opencv/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)

  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:              YES

  Install path:                  /usr/local

  cvconfig.h is in:              /home/odroid/work/opencv
-----------------------------------------------------------------

ビルドされたライブラリや実行ファイル

   1408 Jul 10 13:46 libopencv_hal_pch_dephelp.a
  35572 Jul 10 13:46 libopencv_hal.a
   1414 Jul 10 13:46 libopencv_core_pch_dephelp.a
2175833 Jul 10 13:52 libopencv_core.so.3.0.0
   3368 Jul 10 13:52 libopencv_ts_pch_dephelp.a
   1416 Jul 10 13:52 libopencv_imgproc_pch_dephelp.a
2511670 Jul 10 13:58 libopencv_imgproc.so.3.0.0
   1422 Jul 10 13:58 libopencv_imgcodecs_pch_dephelp.a
 205077 Jul 10 13:58 libopencv_imgcodecs.so.3.0.0
   1416 Jul 10 13:58 libopencv_highgui_pch_dephelp.a
   1416 Jul 10 13:59 libopencv_videoio_pch_dephelp.a
 184710 Jul 10 13:59 libopencv_videoio.so.3.0.0
  53307 Jul 10 13:59 libopencv_highgui.so.3.0.0
1354470 Jul 10 14:01 libopencv_ts.a
   3382 Jul 10 14:01 libopencv_perf_core_pch_dephelp.a
   3382 Jul 10 14:05 libopencv_test_core_pch_dephelp.a
 127022 Jul 10 14:11 libopencv_flann_pch_dephelp.a
 344365 Jul 10 14:12 libopencv_flann.so.3.0.0
 127996 Jul 10 14:12 libopencv_test_flann_pch_dephelp.a
   3386 Jul 10 14:12 libopencv_perf_imgproc_pch_dephelp.a
   3386 Jul 10 14:18 libopencv_test_imgproc_pch_dephelp.a
   2388 Jul 10 14:23 libopencv_ml_pch_dephelp.a
 548828 Jul 10 14:25 libopencv_ml.so.3.0.0
   3376 Jul 10 14:25 libopencv_test_ml_pch_dephelp.a
   1414 Jul 10 14:26 libopencv_photo_pch_dephelp.a
 658921 Jul 10 14:28 libopencv_photo.so.3.0.0
   3384 Jul 10 14:28 libopencv_perf_photo_pch_dephelp.a
   3384 Jul 10 14:29 libopencv_test_photo_pch_dephelp.a
   1414 Jul 10 14:30 libopencv_video_pch_dephelp.a
 312249 Jul 10 14:31 libopencv_video.so.3.0.0
   3384 Jul 10 14:31 libopencv_perf_video_pch_dephelp.a
   3384 Jul 10 14:32 libopencv_test_video_pch_dephelp.a
   3392 Jul 10 14:33 libopencv_perf_imgcodecs_pch_dephelp.a
   3392 Jul 10 14:33 libopencv_test_imgcodecs_pch_dephelp.a
   2390 Jul 10 14:34 libopencv_shape_pch_dephelp.a
 187170 Jul 10 14:35 libopencv_shape.so.3.0.0
   3384 Jul 10 14:35 libopencv_test_shape_pch_dephelp.a
   3386 Jul 10 14:35 libopencv_perf_videoio_pch_dephelp.a
   3386 Jul 10 14:36 libopencv_test_videoio_pch_dephelp.a
   3386 Jul 10 14:36 libopencv_test_highgui_pch_dephelp.a
   2398 Jul 10 14:36 libopencv_objdetect_pch_dephelp.a
 337195 Jul 10 14:37 libopencv_objdetect.so.3.0.0
   3392 Jul 10 14:37 libopencv_perf_objdetect_pch_dephelp.a
   3392 Jul 10 14:38 libopencv_test_objdetect_pch_dephelp.a
   1422 Jul 10 14:39 libopencv_superres_pch_dephelp.a
 148348 Jul 10 14:39 libopencv_superres.so.3.0.0
   3390 Jul 10 14:39 libopencv_perf_superres_pch_dephelp.a
   3390 Jul 10 14:39 libopencv_test_superres_pch_dephelp.a
   1424 Jul 10 14:40 libopencv_features2d_pch_dephelp.a
 671568 Jul 10 14:42 libopencv_features2d.so.3.0.0
   3392 Jul 10 14:42 libopencv_perf_features2d_pch_dephelp.a
   3392 Jul 10 14:43 libopencv_test_features2d_pch_dephelp.a
   1416 Jul 10 14:44 libopencv_calib3d_pch_dephelp.a
1000699 Jul 10 14:49 libopencv_calib3d.so.3.0.0
   3386 Jul 10 14:49 libopencv_perf_calib3d_pch_dephelp.a
   3386 Jul 10 14:50 libopencv_test_calib3d_pch_dephelp.a
   3392 Jul 10 14:53 libopencv_perf_stitching_pch_dephelp.a
   2398 Jul 10 14:53 libopencv_stitching_pch_dephelp.a
 409726 Jul 10 14:54 libopencv_stitching.so.3.0.0
   3392 Jul 10 14:55 libopencv_test_stitching_pch_dephelp.a
   2398 Jul 10 14:56 libopencv_videostab_pch_dephelp.a
 289524 Jul 10 14:56 libopencv_videostab.so.3.0.0

ビルドに要した時間Top20

binaryの名前所要時間(sec)
libopencv_flann_pch_dephelp.a350
libopencv_test_imgproc_pch_dephelp.a336
libopencv_ml_pch_dephelp.a332
libopencv_core.so.3.0.0315
libopencv_calib3d.so.3.0.0272
libopencv_test_core_pch_dephelp.a271
libopencv_imgproc.so.3.0.0262
libopencv_perf_stitching_pch_dephelp.a183
libopencv_features2d.so.3.0.0140
libopencv_photo.so.3.0.0134
libopencv_ml.so.3.0.0103
libopencv_ts.a101
libopencv_stitching.so.3.0.095
libopencv_perf_imgcodecs_pch_dephelp.a74
libopencv_test_features2d_pch_dephelp.a70
libopencv_test_video_pch_dephelp.a68
libopencv_video_pch_dephelp.a65
libopencv_video.so.3.0.062
libopencv_calib3d_pch_dephelp.a62
libopencv_objdetect.so.3.0.061

performance

  • TBW

その他


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-08-24 (木) 09:56:46 (93d)