简体   繁体   English

Qt和OpenCV4Android

[英]Qt and opencv4android

This is y first post, I've been working with Qt and opencv and I'm new in opencv4android, I want to make a Qt application for android that uses opencv,but I don't know how to do this. 这是您的第一篇文章,我一直在使用Qt和opencv,并且是opencv4android的新手,我想为使用opencv的android开发Qt应用程序,但是我不知道该怎么做。

I saw this post: http://amin-ahmadi.com/2015/06/23/opencv-qt-android-adding-required-libraries-and-includes/ and tried to include the paths to the libs but when I compile I get errors like this because I'm using opencv2: 我看到了这篇文章: http : //amin-ahmadi.com/2015/06/23/opencv-qt-android-adding-required-libraries-and-includes/并尝试包含库的路径,但是当我编译时我收到这样的错误,因为我正在使用opencv2:

opencv2/highgui/highgui.hpp: No such file or directory #include opencv2 / highgui / highgui.hpp:没有这样的文件或目录#include

I don't know if the opencv4android functions are different than the normal opencv ones, what am I missing to get my project compiled? 我不知道opencv4android函数是否与正常的opencv函数不同,要编译项目我缺少什么?

You have to add OpenCV to your INCLUDEPATH in your *.pro file. 您必须将OpenCV添加到您的* .pro文件中的INCLUDEPATH中。

OPENCVSDKNATIVE = $$PWD/3rdparty/opencv-android-sdk/sdk/native # replace with your OpenCV SDK for Android location
INCLUDEPATH += $$OPENCVSDKNATIVE/jni/include

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM