查看系统版本是:
Linux ****.ky10.aarch64
显然是yum 方式安装软件,但是国产yum源没有这个东西,甚至很多东西都没有,我们去
opencv官网下载 3.3.0 版本源码 (tar.gz包最好)或者
git clone https://gitee.com/flycocke/opencv.git
参考
http://c.biancheng.net/view/1104.html
一 。安装依赖:gcc-c++ cmake defvel 等
”“”有些包未必用,自己看情况安装下面的包“”“
sudo yum -y install ffmpeg ffmpeg-devel
sudo yum -y install git gcc gcc-c++ cmake3 cmake-gui
sudo yum -y install qt5-qtbase-devel
sudo yum install -y python36 python36-devel python36-pip python36-numpy
sudo yum -y install gtk2-devel
sudo yum -y install gstreamer*
sudo yum -y install vlc
sudo yum install -y libpng-devel
sudo yum install -y jasper-devel
sudo yum install -y openexr-devel
sudo yum install -y libwebp-devel
sudo yum -y install libjpeg-turbo-devel
sudo yum install -y freeglut-devel mesa-libGL mesa-libGL-devel
sudo yum -y install libtiff-devel
sudo yum -y install libdc1394-devel
sudo yum -y install tbb-devel eigen3-devel
sudo yum -y install boost boost-thread boost-devel
sudo yum -y install libv4l-devel
sudo yum -y install gstreamer-plugins-base-devel
sudo yum -y install autoconf automake mercurial pkgconfig zlib-devel libtool freetype-devel make
sudo yum install -y hdf5-devel
sudo yum install -y liblas-devel atlas-devel
sudo yum install -y gcc-gfortran
sudo yum install -y libevent-devel lua-devel openssl-devel flex mysql-devel
sudo yum install -y xz gettext-devel
sudo yum install -y tcl
sudo yum install -y openblas-devel
sudo yum install -y tesseract tesseract-devel tesseract-osd
sudo yum install -y java-1.7.0-openjdk-devel
sudo yum install -y pylint
sudo yum install -y python-flake8
sudo yum install -y vtk-devel vtk-python vtk-qt vtk
sudo yum install -y xz gettext-devel
sudo yum install -y tcl
sudo yum install -y openblas-devel
sudo yum install -y tesseract tesseract-devel tesseract-osd
sudo yum install -y java-1.7.0-openjdk-devel
sudo yum install -y pylint
sudo yum install -y python-flake8
sudo yum install -y vtk-devel vtk-python vtk-qt vtk
sudo yum install -y ccache
sudo yum install -y gflags gflags-devel
sudo yum install -y glog glog-devel
sudo yum install -y libpng libpng-devel
sudo yum install -y libXaw-devel freeimage freeimage-devel zziplib-devel cppunit-devel libXt-devel libX11-devel
sudo yum install -y re2c libgnomeui-devel
sudo yum install -y gcc gcc-c++ gtk2-devel gimp gimp-devel gimp-devel-tools gimp-help-browser libjpeg-devel gstreamer-devel libraw1394-devel jasper-devel jasper-utils swig python nasm
sudo yum install -y g++ cmake git gtk2 libdc1394 libv4l swig jasper libdc1394 jasper-devel jasper-utils libgphoto2 libavc1394-devel gtk+-devel yasm libpciaccess libva-freeworld libva-intel-driver phonon-backend-gstreamer
后面就很简单了
mkdir build && cd build
cmake3 -D CMAKE_BUILD_TYPE=RELEASE ..
cmake3 -D CMAKE_INSTALL_PREFIX=/usr/local ..
cmake3 -D INSTALL_C_EXAMPLES=ON ..
cmake3 -D INSTALL_PYTHON_EXAMPLES=ON ..
cmake3 -D WITH_TBB=ON -D WITH_EIGEN=ON ..
cmake3 -D WITH_V4L=ON ..
cmake3 -D OPENCV_SKIP_PYTHON_LOADER=ON ..
cmake3 -D OPENCV_GENERATE_PKGCONFIG=ON ..
cmake3 -D WITH_QT=ON ..
cmake3 -D WITH_OPENGL=ON ..
cmake3 -D PYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 ..
cmake3 -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..
cmake3 -D ENABLE_CXX11=ON ..
三 编译安装
make && make install
四 测试使用
网友评论