失败了无数次了,每次都在CMAKE卡住了,然后找到了一篇文章,用另一种方法成功解决了该问题,下面是我的安装全过程。
1.按顺序安装
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install libatlas-base-dev gfortran
sudo apt-get install python3.6-dev
2.下载OPENCV,略
解压后
mkdir build
cd build
3.
我第一次使用的方法是:
cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D PYTHON3_EXECUTABLE=/usr/bin/python3
-D PYTHON_INCLUDE_DIR=/usr/include/python3.5
-D PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.5m.so
-