ubuntu20.04+opencv4.5.1

我的环境可以进行科学上网,编译的时候就不会出现各种下载错误~

1.安装依赖

sudo apt-get install -y libjpeg-dev libpng-dev libtiff5-dev libjasper-dev libdc1394-22-dev libeigen3-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev sphinx-common libtbb-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libopenexr-dev libgstreamer-plugins-base1.0-dev libavutil-dev libavfilter-dev libavresample-dev
sudo apt-get install -y build-essential cmake git libgtk2.0-dev libgtk-3-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

如果提示找不到libfaac-dev软件包

sudo apt-add-repository "deb http://us.archive.ubuntu.com/ubuntu trusty main multiverse"
sudo apt update
sudo apt install libjasper1 libjasper-dev

如果提示找不到libjasper-dev软件包

sudo apt-add-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt update
sudo apt install libjasper1 libjasper-dev

2. 下载源码

cd ~/<my_working_directory> #my_working_directory是你保存opencv和opencv_contrib的文件夹
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
mv  opencv_contrib/  opencv/	#将opencv_contrib移动到opencv目录里

3.编译

cd opencv
mkdir
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值