Jawaban:
Tadi malam saya baru saja membangun versi 3.0.0-beta pada versi B. Itu harus sama dalam B +.
Di bawah ini adalah langkah-langkah yang telah saya lakukan untuk membangunnya dari sumber (diadaptasi dari: http://robertcastle.com/2014/02/installing-opencv-on-a-raspberry-pi/ ). Semoga ini bisa membantu.
Pastikan sistem Anda mutakhir. Lari:
sudo apt-get pembaruan sudo apt-get upgrade sudo rpi-perbarui
Selanjutnya instal dependensi yang diperlukan:
sudo apt-get install build-essential cmake cmake-curses-gui \ pkg-config libpng12-0 libpng12-dev libpng ++ - dev \ libpng3 libpnglite-dev zlib1g-dbg zlib1g zlib1g-dev \ pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools libeigen3-dev sudo apt-get install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs \ ffmpeg libavcodec-dev libavcodec53 libavformat53 \ libavformat-dev libxine1-ffmpeg libxine-dev libxine1-bin \ libunicap2 libunicap2-dev swig libv4l-0 libv4l-dev \ python-numpy libpython2.6 python-dev python2.6-dev libgtk2.0-dev
Sekarang bagian yang menarik, ubah ke direktori untuk meletakkan sumber dan kompilasi OpenCV.
cd / home / pi / builds / git clone https://github.com/Itseez/opencv.git cd opencv / git tag checkout / 3.0.0-beta rilis mkdir rilis cd / ccmake ../
Tekan c untuk memulai proses konfigurasi. Anda dapat beralih beberapa opsi jika Anda suka, opsi terakhir saya di bawah. Jika Anda mengubah opsi apa saja tekan c lagi untuk mengonfigurasi. Sekarang tekan g untuk menghasilkan Makefile. Sekarang lanjutkan proses build, perhatikan bahwa perintah make akan memakan waktu beberapa jam (butuh 7 jam pada model raspberry pi B saya).
membuat sudo lakukan instal sudo ldconfig
Berikut adalah pengaturan opsi yang digunakan pada langkah konfigurasi:
ANT_EXECUTABLE ANT_EXECUTABLE-NOTFOUND OFF BUILD_CUDA_STUBS BUILD_DOCS AKTIF MATI BUILD_EXAMPLES OFF BUILD_JASPER OFF BUILD_JPEG BUILD_OPENEXR OFF BUILD_PACKAGE AKTIF BUILD_PERF_TESTS AKTIF OFF BUILD_PNG BUILD_SHARED_LIBS AKTIF OFF BUILD_TBB BUILD_TESTS AKTIF BUILD_TIFF OFF BUILD_WITH_DEBUG_INFO AKTIF MATI BUILD_ZLIB BUILD_opencv_apps AKTIF BUILD_opencv_calib3d ON BUILD_opencv_core AKTIF BUILD_opencv_features2d ON BUILD_opencv_flann AKTIF BUILD_opencv_highgui ON BUILD_opencv_imgcodec ON BUILD_opencv_imgproc ON BUILD_opencv_ml ON BUILD_opencv_objdetect ON BUILD_opencv_photo ON BUILD_opencv_shape AKTIF BUILD_opencv_stitching ON BUILD_opencv_superres ON BUILD_opencv_ts AKTIF BUILD_opencv_video AKTIF BUILD_opencv_videoio ON BUILD_opencv_videostab ON OFF BUILD_opencv_world BZIP2_LIBRaries /usr/lib/arm-linux-gnueabihf/libbz2.so CLAMDBLAS_INCLUDE_DIR CLAMDBLAS_INCLUDE_DIR-NOTFOUND CLAMDBLAS_ROOT_DIR CLAMDBLAS_ROOT_DIR-NOTFOUND CLAMDFFT_INCLUDE_DIR CLAMDFFT_INCLUDE_DIR-NOTFOUND CLAMDFFT_ROOT_DIR CLAMDFFT_ROOT_DIR-NOTFOUND CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES Debug; Rilis CMAKE_INSTALL_PREFIX / usr / local OFF CUDA_BUILD_CUBIN OFF CUDA_BUILD_EMULATION CUDA_HOST_COMPILER / usr / bin / gcc CUDA_SDK_ROOT_DIR CUDA_SDK_ROOT_DIR-NOTFOUND OFF CUDA_SEPARABLE_COMPILATION CUDA_TOOLKIT_ROOT_DIR CUDA_TOOLKIT_ROOT_DIR-NOTFOUND OFF CUDA_VERBOSE_BUILD DOXYGEN_BUILD DOXYGEN_BUILD-NOTFOUND EIGEN_INCLUDE_PATH / usr / include / eigen3 OFF ENABLE_COVERAGE OFF ENABLE_IMPL_COLLECTION OFF ENABLE_NEON OFF ENABLE_NOISY_WARNINGS ENABLE_OMIT_FRAME_POINTER ON ENABLE_PRECOMPILED_HEADERS AKTIF OFF ENABLE_PROFILING OFF ENABLE_SOLUTION_FOLDERS OFF ENABLE_VFPV3 EXECUTABLE_OUTPUT_PATH / home / pi / builds / opencv / release / bin GIGEAPI_INCLUDE_PATH GIGEAPI_INCLUDE_PATH-NOTFOUND GIGEAPI_LIBRARY GIGEAPI_LIBRARY-NOTFOUND INSTALL_CREATE_DISTRIB OFF INSTALL_C_EXAMPLES OFF INSTALL_PYTHON_EXAMPLES OFF INSTALL_TESTS OFF INSTALL_TO_MANGLED_PATHS OFF OPENCV_CONFIG_FILE_INCLUDE_DIR / home / pi / builds / opencv / release OPENCV_EXTRA_MODULES_PATH OPENCV_WARNINGS_ARE_ERRORS OFF OPENEXR_INCLUDE_PATH / usr / include / OpenEXR PLANTUML PLANTUML-NOTFOUND PVAPI_INCLUDE_PATH PVAPI_INCLUDE_PATH-NOTFOUND PYTHON2_EXECUTABLE /usr/bin/python2.7 PYTHON2_INCLUDE_DIR PYTHON2_INCLUDE_DIR2 PYTHON2_LIBRARY PYTHON2_LIBRARY_DEBUG PYTHON2_NUMPY_INCLUDE_DIRS /usr/lib/pymodules/python2.7/numpy/core/include PYTHON2_PACKAGES_PATH lib / python2.7 / dist-paket PYTHON3_EXECUTABLE / usr / bin / python3 PYTHON3_INCLUDE_DIR PYTHON3_INCLUDE_DIR2 PYTHON3_LIBRARY PYTHON3_LIBRARY_DEBUG PYTHON3_NUMPY_INCLUDE_DIRS / usr / lib / python3 / dist-paket / numpy / core / termasuk PYTHON3_PACKAGES_PATH lib / python3.2 / dist-paket SPHINX_BUILD SPHINX_BUILD-NOTFOUND VTK_DIR VTK_DIR-NOTFOUND WEBP_INCLUDE_DIR WEBP_INCLUDE_DIR-NOTFOUND DENGAN_1394 AKTIF OFF OFF OFF OFF OFF WITH_CUBLAS WITH_CUDA AKTIF WITH_CUFFT AKTIF WITH_EIGEN AKTIF DENGAN_FFMPEG AKTIF OFF OFF WITH_GDAL WITH_GIGEAPI AKTIF WITH_GSTREAMER AKTIF OFF WITH_GSTREAMER_0_10 DENGAN_GTK AKTIF OFF WITH_GTK_2_X WITH_JASPER AKTIF WITH_JPEG AKTIF WITH_LIBV4L AKTIF OFF WITH_NVCUVID WITH_OPENCL ON WITH_OPENCLAMDBLAS AKTIF WITH_OPENCLAMDFFT AKTIF WITH_OPENEXR AKTIF WITH_OPENGL AKTIF OFF OFF OFF OFF OFF OFF OFF OFF OFF WITH_OPENNI2 DENGAN_PNG AKTIF WITH_PVAPI AKTIF OFF OFF OFF OFF OFF OFF WITH_TIFF AKTIF OFF OFF WITH_UNICAP WITH_V4L AKTIF WITH_VTK AKTIF WITH_WEBP AKTIF OFF OFF OFF WITH_XIMEA WITH_XINE OFF
Ketika menyusun sesuai dengan jawaban Miguel, lakukan dengan a
>> make -j4
Pada model raspberry pi 2-B / B-2 ini dapat mempercepat kompilasi secara signifikan karena penggunaan semua core dilakukan.
CATATAN: Jika Anda mendapatkan kesalahan saat kompilasi dengan opsi ini, gunakan saja
make
untuk memperbaikinya.