Ubuntu安装opencv3.2.0
时间: 2023-04-03 21:05:15 浏览: 152
linux-ubuntu安装opencv3.2.0
3星 · 编辑精心推荐
你可以参考以下步骤来安装OpenCV 3.2.0:
1. 安装依赖项:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
2. 下载OpenCV 3.2.0:
git clone https://github.com/opencv/opencv.git
cd opencv
git checkout 3.2.0
3. 编译和安装OpenCV:
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j4
sudo make install
4. 配置OpenCV:
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
5. 验证OpenCV是否安装成功:
pkg-config --modversion opencv
如果输出3.2.0,则表示OpenCV已经成功安装。
阅读全文