安装依赖
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
下载 OpenCV
在 OpenCV
的 Releases 页面下载 Source code
并解压。
使用 CMake 编译
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
make -j8
sudo make install
原文地址:https://www.cnblogs.com/StarUDream/p/9045517.html
时间: 2024-11-23 09:03:48