Ubuntu安装OpenCV3.4.6
时间: 2023-12-28 11:43:28 浏览: 85
要在Ubuntu上安装OpenCV3.4.6,首先需要下载OpenCV3.4.6的压缩包。可以通过官网或者GitHub下载。在终端中执行以下命令进行下载:
git clone -b 3.4.6 https://github.com/opencv/opencv
接下来,将下载好的OpenCV_contrib-3.4.6的压缩包解压到home目录下创建的opencv文件夹中。在终端中执行以下命令:
cd opencv
unzip opencv_contrib-3.4.6.zip
然后,在build文件夹中执行以下命令来进行编译和安装:
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local/opencv346 -D PYTHON_DEFAULT_EXECUTABLE=$(which python3) -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib-3.4.6/modules -D WITH_TBB=ON -D WITH_EIGEN=ON ..
make
sudo make install
完成后,OpenCV3.4.6就会被安装在/usr/local/opencv346目录下。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [Ubuntu18.04安装OpenCV3.4.6和OpenCV_contrib-3.4.6的教程与常见问题解决](https://blog.csdn.net/gj295983859/article/details/95182810)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文