1.安装cmake
① sudo apt-get install cmake
② cmake -version 查看版本,检验是否已经安装成功
2. 下载安装包,解压
3.安装依赖项:
1) sudo apt-get install build-essential libgtk2.0-dev libvtk5-dev libjpeg.dev libtiff4-dev libjasper-dev libopenexr-dev libtbb-dev
安装依赖
2) sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
optional:
3) sudo apt-get install checkinstall yasm libtiff5-dev libjpeg-dev libjasper-dev libdc1394-22-dev libxine2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils libeigen3-dev
原文:https://blog.csdn.net/jhszh418762259/article/details/52957495
4安装编译
cd XX
mkdir build
cd build
cmake ..
make
sudo make install
5.查看版本
pkg-config --modversion opencv