如何在 Qt 5.6 上使用 ARTOOLKIT LIBRARY ON ANDROID?

How to use ARTOOLKIT LIBRARY ON ANDROID on Qt 5.6 ?

我想使用 artoolkit 库获取 videocapture,以便在 android 上进行图像处理。我是在 Qt5.6 上做的。所以我会使用 native (c++) 部分进行处理,使用 java 部分来获取视频捕捉(获取帧)。
他们在官方网站上说:

Android does not currently permit camera access from native code. Instead, only Java code can open the camera and capture frames. Additionally, a live camera preview must be included in the current Activity’s view for frames to be captured. This means that ARToolKit itself cannot initiate video capture, but must instead wait on the Java application to pass video information and frames using JNI.

我什至在官方网站上也没有找到关于它的文档。

我准备接受任何建议或链接。 谢谢大家,

我已经成功地在qt上集成了库(artoolkit)并在projet中添加了libNative(/android/libs/arm-v7a)。 这是我在 Qt 上的专业文件。

#-------------------------------------------------
#
# Project created by QtCreator 2016-06-28T11:45:46
#   Ismaila Diallo ARTOOLKIT LIBRARY FOR ANDROID
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = ArtoolkitCamera
TEMPLATE = app


SOURCES += main.cpp\
      ARNative.cpp

HEADERS  += ARNative.h

FORMS    += mainwindow.ui

 CONFIG += mobility
 MOBILITY = 

INCLUDEPATH += "/home/diallo/ArTool/include"
  android {
   LIBS += \
    -L"/home/diallo/ArTool/android/obj/local/armeabi-v7a"\
    -lar\
    -lar2\
    -largsub_es\
    -largsub_es2\
    -laricp\
    -larmulti\
    -larosg\
    -larvideo\
    -lcpufeatures\
    -leden\
    -lft2\
    -lgif\
    -ljpeg\
    -lkpm\
    -lOpenThreads\
    -losg\
    -losgAnimation\
    -losgDB\
    -losgdb_3dc\
    -losgdb_ac\
    -losgdb_bmp\
    -losgdb_bsp\
    -losgdb_bvh\
    -losgdb_cfg\
    -losgdb_curl\
    -losgdb_dds\
    -losgdb_deprecated_osg\
    -losgdb_deprecated_osganimation\
    -losgdb_deprecated_osgfx\
    -losgdb_deprecated_osgparticle\
    -losgdb_deprecated_osgshadow\
    -losgdb_deprecated_osgsim\
    -losgdb_deprecated_osgterrain\
    -losgdb_deprecated_osgtext\
    -losgdb_deprecated_osgviewer\
    -losgdb_deprecated_osgvolume\
    -losgdb_deprecated_osgwidget\
    -losgdb_dot\
    -losgdb_dw\
    -losgdb_dxf\
    -losgdb_freetype\
    -losgdb_gif\
    -losgdb_glsl\
    -losgdb_hdr\
    -losgdb_ive\
    -losgdb_jpeg\
    -losgdb_ktx\
    -losgdb_logo\
    -losgdb_lwo\
    -losgdb_lws\
    -losgdb_md2\
    -losgdb_mdl\
    -losgdb_normals\
    -losgdb_obj\
    -losgdb_openflight\
    -losgdb_osc\
    -losgdb_osg\
    -losgdb_osga\
    -losgdb_osgshadow\
    -losgdb_osgterrain\
    -losgdb_osgtgz\
    -losgdb_osgviewer\
    -losgdb_p3d\
    -losgdb_pic\
    -losgdb_ply\
    -losgdb_png\
    -losgdb_pnm\
    -losgdb_pov\
    -losgdb_pvr\
    -losgdb_revisions\
    -losgdb_rgb\
    -losgdb_rot\
    -losgdb_scale\
    -losgdb_serializers_osg\
    -losgdb_serializers_osganimation\
    -losgdb_serializers_osgfx\
    -losgdb_serializers_osgga\
    -losgdb_serializers_osgmanipulator\
    -losgdb_serializers_osgparticle\
    -losgdb_serializers_osgshadow\
    -losgdb_serializers_osgsim\
    -losgdb_serializers_osgterrain\
    -losgdb_serializers_osgtext\
    -losgdb_serializers_osgviewer\
    -losgdb_serializers_osgvolume\
    -losgdb_shp\
    -losgdb_stl\
    -losgdb_tga\
    -losgdb_tgz\
    -losgdb_tiff\
    -losgdb_trans\
    -losgdb_trk\
    -losgdb_txf\
    -losgdb_txp\
    -losgdb_vtf\
    -losgdb_x\
    -losgFX\
    -losgGA\
    -losgManipulator\
    -losgParticle\
    -losgPresentation\
    -losgShadow\
    -losgSim\
    -losgTerrain\
    -losgText\
    -losgUtil\
    -losgViewer\
    -losgVolume\
    -losgWidget\
    -lpng\
    -ltiff\
    -lutil

       }

DISTFILES += \
android/AndroidManifest.xml \
android/gradle/wrapper/gradle-wrapper.jar \
android/gradlew \
android/res/values/s.xml \
android/build.gradle \
android/gradle/wrapper/gradle-wrapper.properties \
android/gradlew.bat \

android/libs/libARNative.so

ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android

我已经有 Java 个视频捕获文件(4 java 个文件)。正如我在上一个 post 中所说,Android 在 java 部分捕获视频帧并通过在 Qt 上使用 JNI 传递有关帧的信息。

我的问题?如何在 Qt 项目上添加 Java 文件并使它们工作?我已经尝试过,但我有包问题,因为我的应用程序不使用相同的包。我该如何解决?