码迷,mamicode.com
首页 > 系统相关 > 详细

opencv3.0.0 ubuntu16.04

时间:2020-01-28 19:13:01      阅读:80      评论:0      收藏:0      [点我收藏+]

标签:编译   dev   proc   失败   安装   unzip   依赖   opencv3   orm   

1.搭建编译环境

sudo apt-get install build-essential
2.安装依赖库
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
3.下载opencv3.0
mkdir ~/opencv #创建opencv文件夹,用于存放opencv文件
cd ~/opencv
wget https://github.com/Itseez/opencv/archive/3.0.0-alpha.zip -O opencv-3.0.0-alpha.zip
unzip opencv-3.0.0-alpha.zip
4.安装opencv
cd ~/opencv/opencv-3.0.0-alpha
cmake .
sudo make #编译比较慢
sudo make install
sudo /bin/bash -c ‘echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf‘ #给opencv添加动态链接库目录
sudo ldconfig
5.编译samples例程

cd samples
sudo cmake .
sudo make -j $(nproc)
6.测试
cd cpp/
./cpp-example-facedetect lena.jpg

===================================

cmake出现ippicv下载失败或者hash不匹配,加上选项-D WITH_IPP=OFF

opencv3.0.0 ubuntu16.04

标签:编译   dev   proc   失败   安装   unzip   依赖   opencv3   orm   

原文地址:https://www.cnblogs.com/Xerlan/p/12238460.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!