最近把系统更新到22.04了,所以什么库都得重装以下,这次顺便记一下安装细节。
1.安装依赖
sudo apt-get install build-essential python-numpy python3-numpy python-pandas python3-pandas cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff5-dev libdc1394-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev liblapacke-dev libxvidcore-dev libx264-dev libatlas-base-dev gfortran ffmpeg
2.下载
3.安装
cd opencv-*
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=[附加库的路径] ..
make -j12
sudo make install
sudo ln -s /usr/local/include/opencv4/opencv2/ /usr/local/include/
Comments NOTHING