标签:print level erro make tesseract 新建文件夹 git ref exe
最近需要用用opencv。在阿里云服务器ubuntu16.04上安装部署了下。
没啥好说的,下载最新opencv-3.4.2
1.opencv-3.4.2.zip
2. opencv_contrib-3.4.2.zip
(我是放在/home/myname/download/下)然后
wget https:
//github
.com
/Itseez/opencv/archive/3
.4.2.zip
wget https://github.com/opencv/opencv_contrib/archive/3.4.2.zip
先安装以下依赖包
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
sudo apt-get install build-essential qt5-default ccache libv4l-dev libavresample-dev libgphoto2-dev libopenblas-base libopenblas-dev doxygen openjdk-8-jdk pylint libvtk6-dev
sudo apt-get install pkg-config
1.解压下载好的包:(我是放在/home/myname/download/下)然后
unzip opencv-3.4.2.zip
unzip opencv_contrib-3.4.2.zip
2.解压完后需要将opencv_contrib.zip提取到opencv目录下,同时在该目录下新建一个文件夹build:
cp -r opencv_contrib-3.3.1 opencv-3.3.1 #复制opencv_contrib到opencv目录下
cd opencv-3.4.21
mkdir build #新建文件夹build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.2/modules -D PYTHON_EXECUTABLE=/usr/bin/python3 -D BUILD_EXAMPLES=ON ..
make时出现错误:
opencv-3.4.2目录下面
CMakeLists.txt 参考上图,添加一行即可。从新CMake
然后 编译:
make
然后:
sudo make install
完事!
标签:print level erro make tesseract 新建文件夹 git ref exe
原文地址:https://www.cnblogs.com/blueridge/p/9510177.html