OpenCV 3.0.0-dev for Raspberry PI
OpenCV 3.0.0-dev for Raspberry Pi
ほとんど手を加えずに、新しいエントリ書くよ!(まて
git clone https://github.com/Itseez/opencv.git
でソースコードを落とす、位しか書くことないんだよなあ…
-- General configuration for OpenCV 3.0.0-dev =====================================
-- Version control: 2.4.8-3271-g3542da7
--
-- Platform:
-- Host: Linux 3.10.30+ armv6l
-- CMake: 2.8.9
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: Release
で、おやーっと思ったのが何点か。
WebP対応
Media I/OにWEBPも追加されてる。
-- Media I/O:
-- ZLib: /usr/lib/arm-linux-gnueabihf/libz.so (ver 1.2.7)
-- JPEG: /usr/lib/arm-linux-gnueabihf/libjpeg.so (ver 80)
-- WEBP: /usr/lib/arm-linux-gnueabihf/libwebp.so (ver encoder: 0x0002)
-- PNG: /usr/lib/arm-linux-gnueabihf/libpng.so (ver 1.2.49)
-- TIFF: /usr/lib/arm-linux-gnueabihf/libtiff.so (ver 42 - 4.0.2)
-- JPEG 2000: /usr/lib/arm-linux-gnueabihf/libjasper.so (ver 1.900.1)
-- OpenEXR: /usr/lib/libImath.so /usr/lib/libIlmImf.so /usr/lib/libIex.so /usr/lib/libHalf.so /usr/lib/libIlmThread.so (ver 1.6.1)
見たこと無いモジュールがいっぱい
ぱっと見、cudaarithm cudawarping cudafilters cudaimgproc cudabgsegm cudacodec cudafeature2d cudaoptflow cudastereo (cudalegacy, cudav)といった、CUDA系と、optim softcascade shape matlab visあたりのが追加されてますね。
-- OpenCV modules:
-- To be built: core flann imgproc highgui features2d calib3d cudaarithm ml nonfree objdetect video contrib cudawarping cuda cudafilters cudaimgproc legacy cudabgsegm cudacodec cudafeatures2d cudaoptflow cudastereo optim photo softcascade python shape stitching superres ts videostab
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: androidcamera cudalegacy cudev java matlab viz
ということで、buildしてみましょー
ダメでした(WebP関係)
おや?I/Fが違うのかコンパイル通らない。
/home/pi/opt/opencv/modules/highgui/src/grfmt_webp.cpp: In member function ‘virtual bool cv::WebPEncoder::write(const cv::Mat&, const std::vector<int>&)’:
/home/pi/opt/opencv/modules/highgui/src/grfmt_webp.cpp:258:92: error: ‘WebPEncodeLosslessBGR’ was not declared in this scope
/home/pi/opt/opencv/modules/highgui/src/grfmt_webp.cpp:262:93: error: ‘WebPEncodeLosslessBGRA’ was not declared in this scope
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/grfmt_webp.cpp.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2
ということで、libwebp2関係を外してリトライ…… まだまだ先は長そうだ。
途中で一回エラーをしたので、+100分して、378分...6時間かかったのか(涙)
Scanning dependencies of target opencv_sft
[100%] Building CXX object apps/sft/CMakeFiles/opencv_sft.dir/dataset.cpp.o
[100%] Building CXX object apps/sft/CMakeFiles/opencv_sft.dir/config.cpp.o
[100%] Building CXX object apps/sft/CMakeFiles/opencv_sft.dir/sft.cpp.o
Linking CXX executable ../../bin/opencv_trainsoftcascade
[100%] Built target opencv_sft
real 278m58.468s
user 253m39.000s
sys 6m37.680s