ubuntu14.0 opencv3.0配置

1.安装Eigen3,使用简单命令安装

sudo apt-get install libeigen3-dev 

安装成功之后,在/usr/include/eigen3/Eigen/src/Core/util/Macros.h 文件里面可以看到安装的版本,安装成功后,头文件路径在 /usr/local/include/eigen3/

在这里插入图片描述
2.测试程序:
https://www.jianshu.com/p/41ff7b4502d5

3.安装opencv3.0.0:

  1. 系统更新:
    利用ubuntu自带的更新管理器或者
sudo apt-get update
sudo apt-get upgrade
  1. 安装必要的组件:
sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen3-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev default-jdk ant libvtk5-qt4-dev
  1. 下载opencv3.0 :
    http://opencv.org/downloads.html解压
    解压命令https://www.cnblogs.com/wujf-myblog/p/10042896.html

  2. 编译opecv3.0:
    进入解压后的opencv3.0目录

mkdir build
进入build目录
cd build
cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..

在这里出现问题,一个安装包下载不了,导致出了问题,安装包: ippicv_linux_20141027.tgz;

  • 该过程中会自动下载 ippicv_linux_20141027.tgz;
  • 将下载的包放到 opencv-3.0.0/3rdparty/ippicv/downloads/linux-8b449a536a2157bcad08a2b9f266828b/ 下的文件中,然后重新输入命令即可 ;
    不知道是不是网的原因,一直不能在终端在线下载
    链接 : https://pan.baidu.com/s/1o7JGPJ0 密码 : nfab

5.安装opencv3.0
在build目录

make
sudo make install

make命令错误:
https://blog.csdn.net/weixin_42896137/article/details/88660621
没有仓库问题:
https://blog.csdn.net/weixin_41931602/article/details/83211455
安装make:
https://blog.csdn.net/ever_peng/article/details/80161873
ubuntu报错E:未找到软件包xxx的换源解决办法:
https://blog.csdn.net/qq_33485434/article/details/80820163
ubuntu 14.04 安装cmake
https://blog.csdn.net/libo2017/article/details/90084742
ubuntu14.04下安装gcc-4.7
https://blog.csdn.net/ture_dream/article/details/52651746
make错误1:
在这里插入图片描述解决办法: If there is an accented character in the path name to the source files you may get this error. Move the source directory to a directory so that there is no accented characters in the path name. Then restart the compilation.

因为我放在了有中文的路径下,后来挪到没中文的路径下就不会报这个错误了;

ubuntu14.04安装opencv3.0.0
https://blog.csdn.net/linj_m/article/details/45048905?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param
graphcuts.cpp.o’ failed:

#define nppSafeCall(expr)
cv::cuda::checkNppError(expr, __FILE__,
__LINE__, CV_Func)
^
modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/build.make:3014: recipe
for target
'modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/graphcuts.cpp.o'
failed

make[2]: ***
[modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/graphcuts.cpp.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:9526: recipe for target
'modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/all' failed

make[1]: *** [modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/all] Error
2
make[1]: *** Waiting for unfinished jobs....
[ 72%] Linking CXX shared library ../../lib/libopencv_photo.so
[ 72%] Built target opencv_photo
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

解决方法:
https://blog.csdn.net/xunan003/article/details/79484566?utm_source=blogxgwz2

6.配置完成后跑一个sample:
cd 进入opencv包的sample文件夹进入

cd cpp
./cpp-example-facedetect boy.jpg

在这里插入图片描述
在这里插入图片描述完成。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值