ubuntu18.04安装opencv3.4.4
时间: 2023-03-19 12:21:00 浏览: 114
安装OpenCV 3.4.4的步骤很简单:1.下载OpenCV 3.4.4源码:https://opencv.org/releases.html2.解压源码:tar -xvzf OpenCV-3.4.4.tar.gz3.安装所需的依赖:sudo apt-get install build-essential cmake git pkg-config libgtk-3-dev4.创建一个新的编译文件夹:mkdir opencv-3.4.4-build5.进入编译文件夹:cd opencv-3.4.4-build6.运行CMake:cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..7.编译OpenCV:make -j48.安装OpenCV:sudo make install
相关问题
在ubuntu18.04上安装opencv3.4.4
我建议你在Ubuntu 18.04上安装OpenCV 3.4.4,可以参考以下步骤:1. 使用终端安装OpenCV 3.4.4:sudo apt-get install libopencv-dev python-opencv。2. 安装CMake:sudo apt-get install cmake。3. 下载OpenCV 3.4.4源码:wget https://github.com/opencv/opencv/archive/3.4.4.zip。4. 解压缩源码:unzip 3.4.4.zip。5. 进入OpenCV 3.4.4目录:cd opencv-3.4.4。6. 运行CMake:cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..。7. 编译OpenCV:make -j4。8. 安装OpenCV:sudo make install。
ubuntu18.04安装OpenCV
好的,以下是在Ubuntu 18.04上安装OpenCV的步骤:
1. 打开终端,更新源列表
```
sudo apt-get update
```
2. 安装OpenCV依赖项
```
sudo apt-get install build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
```
3. 安装Python依赖项(如果需要Python支持)
```
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
```
4. 下载OpenCV
```
cd ~
git clone https://github.com/Itseez/opencv.git
cd opencv
git checkout 3.4.0
```
5. 编译和安装OpenCV
```
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j4
sudo make install
```
6. 验证OpenCV是否正确安装
```
pkg-config --modversion opencv
```
如果安装成功,会输出OpenCV的版本号。
希望这些步骤可以帮助你在Ubuntu 18.04上安装OpenCV。
阅读全文