I'm working on an Android mobile app oriented to the real time augmented visualization of a drone's camera view (specifically I'm working on a DJI Phantom 3 Professional with relative SDK). I'm using Wikitude framework for the AR part. Every Wikitude sample works by augmenting the smartphone's camera view, so I need to redirect the input video stream. At this stage, by using the DJI SDK features, I have a TextureView object containing the correctly decoded stream coming from the drone. The following are the relative instructions on the top of the current view's .xml file:
<TextureView
android:id="@+id/video_previewer_surface"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_centerHorizontal="true"
android:layout_above="@+id/linearLayout" />
Actually, Wikitude Architect View is composed by the rendering of the camera stream and the rendering of the augmentation, as depicted in the following figure: Architect View Composition
sample_cam.xml file:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal">
<com.wikitude.architect.ArchitectView
android:id="@+id/architectView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
Is there a way to replace the current camera stream of the Wikitude Architect View with the content of my TextureView?
Alternatively, is there a way to make the camera stream of the ArchitectView as a transparent background, in order to overlap this layer to the TextureView one?
The following could be a portion of the code of the .xml final file:
<TextureView
android:id="@+id/video_previewer_surface"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_centerHorizontal="true"
android:layout_above="@+id/linearLayout" />
<com.wikitude.architect.ArchitectView // with transparent background for camera
android:id="@+id/architectView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>