1.准备依赖库
[编译] 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
2.下载源码并解压
https://opencv.org/releases.html
3.Cmake构建并编译安装
cd opencv-3.4.3 mkdir build cd build cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local .. sudo make -j8 (8指8核) sudo make install
安装完成
原文地址:https://www.cnblogs.com/haijian/p/9734538.html
时间: 2024-11-23 09:03:47