且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Amazon Linux 上安装 OpenCV?

更新时间:2023-02-22 20:02:25

Amazon AMI 的默认 yum repo 似乎不包含 OpenCV强> 包.

It seems that default yum repo for Amazon AMI doesn't contain OpenCV packages.

您可以通过以下简单步骤自行从源代码编译:

You can compile it from sources by yourself with the following simple steps:

  • 安装必要的软件包:

sudo yum install git cmake gcc-c++

  • 从存储库克隆 OpenCV:

git clone https://github.com/Itseez/opencv.git

  • (可选)选择所需的版本:

git checkout

  • 编译和安装 - 创建要在其中构建的文件夹,在那里输入并键入:

cmake 制作须藤制作安装

这是基本步骤 - 在此之后,您将拥有带有一些默认模块的 OpenCV.您可以在实际构建之前阅读 cmake 输出并调整您的安装.可能您应该根据需要安装其他软件包(例如 libpnglibjpgpython 等).

It's basic steps - after this you will have OpenCV with some default modules. You can read cmake output and adjust your installation before actual build. Possibly you should install additional packages for your needs (like libpng, libjpg, python etc.).