简体   繁体   English

如何在 Ubuntu 上为 C/C++ 安装 OpenCV

[英]How to install OpenCV for C/C++ on Ubuntu

I want to install the C/C++ interfaces for OpenCV.我想为 OpenCV 安装 C/C++ 接口。 I have already installed it for Python, which was a very straightforward process, I just had to issue the command pip3 install opencv-python and it got installed.我已经为 Python 安装了它,这是一个非常简单的过程,我只需发出命令pip3 install opencv-python并安装它。

I have followed many sites on how to install OpenCV for C/C++, but they teach of installing it from the source.我关注了许多关于如何为 C/C++ 安装 OpenCV 的站点,但他们教导从源代码安装它。 Due to my limited bandwidth, I have problems downloading the sources, which are quite large.由于我的带宽有限,我在下载非常大的源时遇到了问题。 Is there any other straightforward process?还有其他直接的过程吗?

One simple way is to use anaconda一种简单的方法是使用 anaconda

conda install opencv

It will install opencv for python along with c++ headers/libraries and cmake files.它将为 python 安装 opencv 以及 c++ 头文件/库和 Z272CEADB8458515B2AE4B5630A602 文件。

One option is to use the package manger apt一种选择是使用 package manger apt

sudo apt-get install -y libopencv-dev

and then link your source to the libraries.然后将您的源链接到库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM