Ubuntu 交叉编译 opencv contrib 4.1.0

这篇博客介绍了如何在Ubuntu系统下,通过更换国内源加速下载,安装cmake和相关依赖,然后进行opencv 4.1.0及其contribute模块的交叉编译。详细步骤包括配置编译选项,解决缺少依赖的问题,并最终完成make install。此外,还指导了如何设置环境变量以支持pkg-config。
摘要由CSDN通过智能技术生成

 

1.下载opencv4.0.1及contribute模块

https://github.com/opencv/opencv/releases/tag/4.0.1

https://github.com/opencv/opencv_contrib/releases/tag/4.0.1

 

2.更换国内源  //不更换也可以

使用 ubuntu 原生源下载速度,可替换为国内源,提升下载速度

 

备份 ubuntu 原生源

sudo cp /etc/apt/sources.list   /etc/apt/sources.list.backup

 

使用gedit编辑sources.list文件

sudo gedit /etc/apt/sources.list

 

将sources.list文件中的内容替换为以下内容,更换为阿里源

deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-u
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值