Raspberry Pi3 でOpenCV 2.4.13.1をビルドし、自作のOpenCVベンチマークプログラムを実行させてみた。
HaarLike実行中に、CPUの負荷を見ていると25%になっており、計算時間も予想より長くなっていた。
並列化が行われていないようなので、tbb周りを見てみるが、ビルド環境は従来通りで、おかしいところはないと思わる。
何度もビルドしてみたが、ビルド時のcmakeの情報を見てみるとtbbは有効になっている。
そこで、ベンチマーク実行時にconfigrationを出力させてみるので見てみた。
なぜかOpenCV 2.4.9.1 となっている。自分では、2.4.9.1などインストールしていないので、最初から含まれている可能性がある。
以下にconfigurationを示す。
tbbがoffになっている。General configuration for OpenCV 2.4.9.1 =====================================
Version control: unknown
Platform:
Host: Linux 3.19.0-trunk-armmp armv7l
CMake: 3.0.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.9.2)
C++ flags (Release): -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fsigned-char -W -Wall -Werror=return-type -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 -ffunction-sections -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG
C++ flags (Debug): -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fsigned-char -W -Wall -Werror=return-type -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 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
C Compiler: /usr/bin/cc
C flags (Release): -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fsigned-char -W -Wall -Werror=return-type -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 -ffunction-sections -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG
C flags (Debug): -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fsigned-char -W -Wall -Werror=return-type -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 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
Linker flags (Release): -Wl,-z,relro -Wl,-z,now -Wl,-z,relro -Wl,-z,now
Linker flags (Debug): -Wl,-z,relro -Wl,-z,now
Precompiled headers: YES
OpenCV modules:
To be built: core flann imgproc highgui features2d calib3d ml objdetect video contrib legacy photo gpu java ocl python stitching superres ts videostab
Disabled: world
Disabled by dependency: -
Unavailable: androidcamera dynamicuda viz
GUI:
QT: NO
GTK+ 2.x: YES (ver 2.24.25)
GThread : YES (ver 2.42.1)
GtkGlExt: YES (ver 1.2.0)
OpenGL support: YES (/usr/lib/arm-linux-gnueabihf/libGLU.so /usr/lib/arm-linux-gnueabihf/libGL.so /usr/lib/arm-linux-gnueabihf/libSM.so /usr/lib/arm-linux-gnueabihf/libICE.so /usr/lib/arm-linux-gnueabihf/libX11.so /usr/lib/arm-linux-gnueabihf/libXext.so)
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 )
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)
Video I/O:
DC1394 1.x: NO
DC1394 2.x: YES (ver 2.2.3)
FFMPEG: YES
codec: YES (ver 56.1.0)
format: YES (ver 56.1.0)
util: YES (ver 54.3.0)
swscale: YES (ver 3.0.0)
gentoo-style: YES
GStreamer: NO
OpenNI: NO
OpenNI PrimeSensor Modules: NO
PvAPI: NO
GigEVisionSDK: NO
UniCap: NO
UniCap ucil: NO
V4L/V4L2: Using libv4l (ver 1.6.0)
XIMEA: NO
Xine: NO
Other third-party libraries:
Use IPP: NO
Use Eigen: YES (ver 3.2.2)
Use TBB: NO
Use OpenMP: NO
Use GCD NO
Use Concurrency NO
Use C=: NO
Use Cuda: NO
Use OpenCL: YES
OpenCL:
Version: dynamic
Use AMD FFT: NO
Use AMD BLAS: NO
Python:
Interpreter: /usr/bin/python2 (ver 2.7.9)
Libraries: /usr/lib/arm-linux-gnueabihf/libpython2.7.so (ver 2.7.9)
numpy: /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.8.2)
packages path: lib/python2.7/dist-packages
Java:
ant: /usr/bin/ant (ver 1.9.4)
JNI: /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include
Java tests: NO
Documentation:
Build Documentation: YES
Sphinx: /usr/bin/sphinx-build (ver 1.2.3)
PdfLaTeX compiler: /usr/bin/pdflatex
Tests and samples:
Tests: NO
Performance tests: YES
C/C++ Examples: YES
Install path: /usr