【arm】ubuntu mate下配置qt与opencv最快捷的方法

前端之家收集整理的这篇文章主要介绍了【arm】ubuntu mate下配置qt与opencv最快捷的方法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

黑色的句子可忽略,红色的为必须

因为在板子上编译opencv的时候遇到FFMPEG模块编译报错的情况,具体问题是:https://stackoverflow.com/questions/28319376/installing-opencv-in-ubuntu-14-10,所以直接下载编译好的opencv来用


核心板全志V40,底板BV3,系统ubuntu mate 15.04

qt的安装直接用

apt-get install qtcreator


安装后输入qtcreator打开,选择Tools——Options——Build&Run——Compilers——Add——GCC

在Compiler path选择路径为:/usr/bin/gcc,点Apply应用设置


选择Kits,此时可以看到Complier已经选择好了GCC



直接下载已经编译好的opencv库

sudo apt-get install libopencv-dev


查看安装到的路径
dpkg -L libopencv-dev

可以找到opencv的库目录在
/usr/lib/arm-linux-gnueabihf

包含目录在

/usr/include
/usr/include/opencv
/usr/include/opencv2

打开qt新建工程,调用opencv库进行测试

修改.pro文件添加

INCLUDEPATH += /usr/include          \    
               /usr/include/opencv   \    
               /usr/include/opencv2    
    
LIBS += /usr/lib/arm-linux-gnueabihf/libopencv_calib3d.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_core.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_features2d.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_flann.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_highgui.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_imgproc.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_ml.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_objdetect.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_photo.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_stitching.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_superres.so \   
	/usr/lib/arm-linux-gnueabihf/libopencv_video.so \  
	/usr/lib/arm-linux-gnueabihf/libopencv_videostab.so 


原文链接:https://www.f2er.com/ubuntu/350430.html

猜你在找的Ubuntu相关文章