Model Target Test App User Guide

Vuforia Image

Vuforia Engine provides the Model Targets Test app to assist in evaluating Model Targets. This application is distributed as a precompiled Android APK package that you can install on your own device.

Model Targets Test App

The Model Targets Test App (vuforia-unity-android-modeltargetstest-X-Y-Z.apk) is intended:

  • to allow developers to quickly evaluate the capabilities of the Model Target detection and tracking feature of Vuforia Engine, 
  • to enable developers to test if their custom Model Targets can be tracked and detected with good performance,
  • to allow developers to quickly evaluate the functionality of Model Targets with multiple objects and/or multiple Guide Views in Vuforia Engine, and 
  • to enable developers to test if their custom Model Targets with multiple objects and/or multiple Guide Views can be recognized, tracked, and detected with good performance.

It comes with a built-in Model Target database containing one Model Target (NASA Viking Lander), with a 360˚ Guide View. It also allows you to load your own databases of any type from the device's SD card.

A 3D model of the Viking Lander that is suitable for 3D printing is distributed along with the Model Target Native Sample. See Printing and Assembling the Viking Lander for more information. 

Installing the App

You can install the app *.apk on a device by connecting the device to a PC with a USB cable, and then using the Android Debug Bridge (ADB).

  1. Connect the device to the developer desktop environment using a USB cable.

  2. Open a Cygwin bash shell or Windows Command Line and execute:
    adb devices
    you will see:

    List of devices attached
    [ID] device

    If the device list is empty, or a given device is not listed, kill the ADB server by executing:
    adb kill-server

  3. To install the application, navigate to the folder containing the downloaded APK (in our example, C:\Temp) and install APK using adb:
    $ cd /cygdrive/c/temp
    $ adb install thisIsTheAPKName.apk

As an alternative approach, you can copy the APK to your device's Download folder and install it from a File Manager application directly on the device.

Testing the Example CAD Object

The test app includes a preinstalled Advanced Model Target 360 database. It comprises of the NASA Viking Lander, which is available as a free download from NASA's website. You will need to make a 3D print of this model if you want to try it yourself. For more information, see Printing and Assembling the Viking Lander.

NOTE: it is important that the scale of the 3D-printed object matches the scale of the Model Target. Please do not change the size of the 3D object when 3D printing!

Vuforia Image

NOTE: When running the Model Targets Test App with the included Advanced Model Target 360 database no Guide View is drawn immediately. Instead, the app prompts you to move your device around so that it can find the object.

Screenshot of the Model Targets with Advanced Recognition Test App showing no guide view but a prompt that reads
Screenshot of the Model Targets Test App showing an outline being drawn over the tracked object, and a slider labelled

As soon as you point your devices' camera to the object it will be detected and tracked.

  • An outline rendering around the object indicates that it is being detected and tracked correctly. You can adjust the width of the rendered outline using the slider.
  • For standard Model Target Databases, a Guide View is displayed when the application is started.
  • For Advanced Model Target Databases with multiple objects and/or multiple Guide Views, a specific Guide View is not displayed immediately but will appear when Vuforia Engine detects one of the objects from its database. Additionally, as you continue to move your device around, the Guide View may change - this will happen if another Model Target object comes into view, or if you point your device at the same object but from a different side where another Guide View was defined.

In the cases where the Guide View is displayed in the camera image frame as shown below, the user would need to align the Guide View image with the object before tracking begins.

Vuforia Image

Loading your Own Databases onto the Device

If you have a custom Model Target database (generated using the Model Target Generator) that you would like to test, you can transfer it onto your device's storage and then load it at runtime from inside one the test apps.

A Model Target database consists of two files:

  • <YourDatabaseName>.xml
  • <YourDatabaseName>.dat

If the Model Targets Test app has not yet been started, you will need to create the parent directory manually:

/sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/ModelTargetData

To make a database visible to the apps, upload the two database files onto the device storage by copying them into the following directory, as you created, for the Model Targets Test App:

/sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/ModelTargetData/YourDatabaseName/

For best results, create this directory before starting the test app.

Example

If you want to test “SomeDatabase” with the Model Targets Test App, copy the .xml and .dat files to the following locations:

/sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/ModelTargetData/SomeDatabase/SomeDatabase.dat

/sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/ModelTargetData/SomeDatabase/SomeDatabase.xml

If your Android device is connected via USB, you can copy the files using adb push. Assuming SomeDatabase.xml and SomeDatabase.dat are in a subfolder of the current directory called SomeDatabase, you would use the following command:

adb push SomeDatabase

/sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/ModelTargetData/

The following diagram shows the resulting folder hierarchy:

  • /sdcard/Android/data/com.vuforia.engine.ModelTargetsTest/files/
    • ModelTargetData/
      • SomeDatabase/
        • SomeDatabase.dat
        • SomeDatabase.xml
      • AnotherDatabase/
        • AnotherDatabase.dat
        • AnotherDatabase.xml

Selecting and Loading a Database

At runtime, you can double-tap the screen to open the Options menu. Select a database from the list to load it for tracking.

Vuforia Image

Once you click a database, a loading progress dialogue will appear. On completion, the new Guide View will be displayed if you have loaded a standard Model Target database; or the app will start searching for recognizable objects if you have loaded an Advanced Database with multiple objects with one or more Guide Views; and similarly, if you have loaded an Advanced Model Target 360 database the app will start searching for the trained Model Target.

NOTE: the Guide View in Advanced Databases will not instantly show until an object has been detected or if a certain amount of time has passed without any detection.

Vuforia Image

For single-model databases with multiple Guide Views, you can change the Guide View being displayed by tapping the "Cycle Guide View" option in the menu.

Learn More