First, the SDK for the BuildRoot to hit the following patch
Diff--git A/package/opencv/config.in B/package/opencv/config.Inindex C046baa.. 6cb6183 100644---a/package/opencv/config.inch+ + + B/package/opencv/config.in@@-119,7 +119,12@@ config Br2_package_opencv_lib_photo help Include opencv_photo module into the OPENCV build.-comment"Opencv_python module requires numpy which is not yet available." +config Br2_package_opencv_lib_python+ bool "Python" + Depends onBr2_package_python+ Help+ Include Opencv_python module into the OpenCV build.+ No python example is installed.Config br2_package_opencv_lib_stitching bool"Stitching"diff--git a/package/opencv/opencv.mk B/package/opencv/opencv.MkoldMode100644NewMode100755Index 947589b..b00f293---A/package/opencv/opencv.Mk+ + + B/PACKAGE/OPENCV/OPENCV.mk@@-58,7 +58,6 @@ opencv_conf_opts + = \-dbuild_opencv_objdetect=$(if$ (Br2_package_opencv_lib_objdetect), on,OFF) \-DBUILD_OPENCV_OCL=OFF\-dbuild_opencv_photo=$(if$ (Br2_package_opencv_lib_photo), on,OFF) \--dbuild_opencv_python=OFF\-dbuild_opencv_stitching=$(if$ (br2_package_opencv_lib_stitching), on,OFF) \-dbuild_opencv_superres=$(if$ (br2_package_opencv_lib_superres), on,OFF) \-dbuild_opencv_ts=$(if$ (BR2_PACKAGE_OPENCV_LIB_TS), on,OFF) \@@ -138,7 +137,6 @@ opencv_conf_opts + = \opencv_conf_opts+= \-dbuild_jasper=OFF\-dbuild_jpeg=OFF\--dbuild_new_python_support=OFF\-DBUILD_OPENEXR=OFF\-dbuild_png=OFF\-dbuild_tiff=OFF\@@ -235,6 +233,22 @@Elseopencv_conf_opts+ =-dwith_v4l=OFF-dwith_libv4l=OFFendif+ifeq ($ (Br2_package_opencv_lib_python), y) +opencv_conf_opts + = +-dbuild_opencv_python= on+-dbuild_new_python_support= on+-dpython_executable=$ (host_dir)/usr/bin/python2 +-dpython_include_dir=$ (staging_dir )/usr/include/python$ (python_version_major) +-dpython_library=$ (staging_dir)/usr/lib/libpython$ (PYTHON_VERSION_ MAJOR). So +-dpython_numpy_include_dir=$ (staging_dir)/usr/lib/python$ (python_version_major)/site-packages/numpy/ Core/include +-dpython_numpy_version=$ (python_numpy_version) +opencv_dependencies + =python python-numpy+Else+opencv_conf_opts + = +-dbuild_opencv_python= on+-dbuild_new_python_support=OFF+endif+ #installation Hooks:define Opencv_clean_install_doc$ (RM)-fr $ (target_dir)/usr/share/opencv/doc
Second, the configuration BuildRoot
Execute cout && make menuconfig into the BuildRoot interface to:
Select OpenCV in the following order
Target Packages ---> Libraries ---> Graphics ---> opencv-2.4 --->
Select Python in the following order
Target Packages ---> Interpreter languages and scripting ---> python
OpenCV and Python's sub-packages are selected according to the actual situation.
Third, compile, generate firmware
Execute Croot && zmake all
S3 Zeta uses Python and OpenCV