Working with Device Databases

A Device database – also referred to as datasets in the SDK – is a set of runtime assets and authoring files for a Vuforia target. The database is locally accessible and contains the targets which your application is tracking. Download the databases from the Target Manager or get them from one of the Vuforia tools capable of generating databases

The Vuforia Target Manager allows you to create, manage, and download Device Databases for image-based Vuforia Targets. Device Databases provide your AR application with a locally accessible Vuforia target. See Getting Started with the Vuforia Target Manager.

Create a New Device Database

The Target Manager allows you to create and manage Device Databases online, and provides download options for both Unity and native projects.

Start by creating a Device Database in the Target Manager.

  1. Go to the Target Manager in the Vuforia Engine Developer Portal and login.
  2. Click Add Database. The Create Database dialog opens.
  3. Name the database and select the Device Type option. The database name should be unique for the developer account you are using.

  1. Click Create. You'll be taken back to the Target Manager database list.

View the Details of a Device Database and its Targets

You can view your databases and the targets in each database in the Target Manager.

All existing databases appear on the page with the following information:

  • Database name.
  • Database type.
  • The number of targets in the database.
  • The data that the database was last modified.

Add a Target to a Device Database

Image Targets, Multi Targets and Cylinder Targets are created and managed using the Target Manager. The recommended maximum size for a Device Database is 1000 image-based targets, though, it is possible to support a larger number of targets depending on the images used. Should you need more Images than this, we recommend looking at our Database Comparison and the Cloud Recognition

  1. In the Target Manager database list, click the name of your Device Database.
  2. In the Details window, click Add Database. A pop-up window opens with options to add either an Image, Cylinder, or Multi Target to the database.
  3. The name you provide the target must fulfil the following:
    • The name must be unique within this device database.
    • The name should describe the image.
    • The name can be changed later.
    • The name can only include letters, numbers, and the underscore character (_).
  4. The dimensions you provide to an image-based target returns the pose information during tracking in that scale. For example, if your Image Target is 16 units wide, moving the camera from the left border of the target to the right border of the target will change the returned position by 16 units along the x-axis. Therefore, the size of the target is relative to the size of the augmented virtual content and the dimension of your target should be in the same scene units as your augmentations.
  5. Image files uploaded to the Target Manager must be of format 8 or 24-bit PNG or JPG. A JPG file must be in RGB or greyscale. The maximum accepted image file size is 2.25MB. See the Best Practices for more details.

Add an Image Target to a Database 

  1. Select Image as the Target Type.
  2. Type a unique name for the target in the Target Name field.
  3. Enter the Width of the target in scene units.
  4. Browse and select the image file.
  5. Click Add. After a short processing time, the target list is loaded with the result of the upload. The target’s rating is displayed along with the target image.

Add a Multi Target to a Database 

  1. Select Multi as the Target Type.
  2. Type a unique name for the target in the Target Name field.
  3. Enter the Width, Height, and Length of the Multi Target in scene units.
  4. Click Add. A new target container is shown in the target list.
  5. Click the new target container. A window opens with an empty target container with the specified dimensions. On the left, the 3D representation is shown, and a layout view is on the right.

  1. In the 3D representation, click one of the surfaces (e.g. Upload Front) on the layout view.
  2. Browse and select the image file that you want to place on that surface.
  3. Click Open. A progress indicator will notify you when the upload is complete.

    NOTE: The image file must be square. If the aspect ratio is not appropriate, a message will appear to inform that itexpects an aspect ratio of 1:1. Do not use the same image on multiple sides as it can create false positives upon detection.

  4. Repeat for each of the other surfaces of the Multi Target. Use the breadcrumbs on the page to return to the list of targets for this database.

    TIP: You do not have to upload all six parts, however there must be at least two surfaces associated with images before you can download the device database and use the Multi Target.

Add a Cylinder Target to a Database 

  1. Select Cylinder as the Target Type.
  2. Type a unique name for the target in the Target Name field.
  3. Enter the Top Diameter, Side Length, and Bottom Diameter of the Cylinder Target in scene units.
    • If you enter 0 for the top diameter or the bottom diameter, it will make the target a conical shape.
  4. Click Add. The cylinder container is added to the target list.
  5. In the target list, click the cylinder container you just added. A window opens with an empty 3-D representation of the cylinder on the left and a layout view on the right.

  1. In the layout view, click Upload Side.
    • You must upload the side image before uploading the top or bottom image.
  2. Browse and select the image file that you want to place on that surface.

    NOTE: The image file must have the appropriate aspect ratio for the dimensions you provided earlier. If the aspect ratio is not correct, a message indicates the expected aspect ratio.

  3. Click Open. A progress indicator will notify you when the upload is complete.
  4. Repeat for Upload Top and Upload Bottom. Use the breadcrumbs on the top of the page to return to the list of targets for this database.

    TIP: You do not have to upload all three parts but associating the Side surface with an image is required before you can download a Device Database and use the Cylinder Target.

View a List of the Targets in a Database

1. Go to the Target Manager page.
2. Click the Device Database's name containing the targets you want to view.
Target List


For each Image Target the following information is displayed next to the target name.

  • The target type.
  • The augmentable Rating for any Image targets.
  • The target status of Active, Inactive Incomplete or Processing.
  • The date that the target was last modified.

View the Details of a Target

  1. In a database, Click the Target's name listed in the target list.


For Image Targets, the target's properties will be listed to the right of the target image.

  • The target type.
  • The target ID.
  • The augmentable rating of the Image Target.
  • The date that the target was added.
  • The date that the target was last modified.

The Show/Hide Features link under the image will show you the contrast based features of the image that are used to detect and track the target.


For Multi Targets, which are composed of multiple target images, you can view the details of the individual images by clicking on them in the target's 3D viewer.
Each image has its own details page where you can view the image’sfeatures and optionally replace the image.


For Cylinder Targets, which are composed of multiple target images, you can view the details of the individual images by clicking on them in the target's 3D viewer.
Each image has its own details page where you can view the image’sfeatures and optionally replace the image.

 

Remove Targets from a Device Database

You can remove targets from a Device Database with the Target Manager using these steps:

  1. Go to the Target Manager Home Page, you will see a list of Device Databases
  2. Click the name of the database containing the targets that you want to remove.
  3. Click the check box next to the targets that you want to remove in the target list, or check the box next to Target Name to remove all targets.
  4. Click the Delete link from the menu above the targets

You will be presented with a confirmation dialog. If accepted, the target(s) will be deleted and the target list is updated.

Edit the Properties of a Device Database

You can change and rename the images used for targets within the Target Manager and also rename your databases.

Rename a Database

1. Go to the Target Manager Home Page.
2. Click the name of the database that you want to edit in the database list, this will take you to the database's details page.
3. Click the Edit Name link at the top of the page, under the database name.


database details

4. Define a new name for the database in the Edit Name dialog and click Save.

edit dialog

Change the Target Source File of an Existing Target

Use this procedure to change the source file associated with an existing target in a Device Database. Changing the source file will have no effect on any target already downloaded as a Device Database.

  1. Start by following the steps in the View Details of a Target section above.
  2. When you are in the detail page of the target you wish to exchange, click Update Target/Change and select your locally stored image file.  

NOTE: Multi Targets and Cylinder Targets require that you first select which of the images of the composition you wish to change.

How To Download Targets in a Device Database

You can choose to download the database as a .zip archive or a .unitypackage. Select the type that is appropriate to the development tool you are using.

Tool Archive
Unity .unitypackage
Android Studio .zip
Xcode .zip
Visual Studio .zip
  1. Go to the Vuforia Target Manager Home Page.
  2. In the list of databases, find and click the name of the database that you want to download.
  3. Click Download Database. Select the format you want to downloa.

Add a Device Database to a Vuforia Engine Project

Device Databases are the containers for Vuforia Image Targets, Multi Targets, and Cylinder Targets. Add one or multiple databases to your Vuforia Engine project and associate the targets with an Observer. The following instructions will show you how to add a Device Database to your project. To learn how to load Device Databases at runtime, See How To Load and Activate Multiple Device Databases

Unity

Download your Device Database as a .unitypackage, you can then double click on the package or import it from the Unity Editor using Import -> Custom Package. The Unity package will automatically import the database files into the StreamingAssets folder of your project.

Native

Download your Device Database as a .zip archive. Unpack the zip file and copy the two target asset files (.dat and .xml) to the Assets directory of your project.

To test your own Vuforia targets, you can replace the Image Target file set used in the Vuforia Engine native sample project by copying your database files into the appropriate directory depending on the platform used (Android, iOS, UWP).

Get a list of targets in a device database and create a new Observer with its target info:

VuDatabaseTargetInfoError databaseTargetInfoError;
if (vuEngineGetDatabaseTargetInfo(mEngine, mdatabasePath, targetInfos, &databaseTargetInfoError) == VU_SUCCESS)
{
    vuDatabaseTargetInfoListGetSize(targetInfos, &numTargetInfos);
    if (numTargetInfos > 0)
    {
        VuDatabaseTargetInfo databaseTargetInfo;
        for (int32_t i = 0; i < numTargetInfos; i++)
        {
            REQUIRE_SUCCESS(vuDatabaseTargetInfoListGetElement(targetInfos, i, &databaseTargetInfo));

            // Create target info for observer creation

        }
        // Create and add new observer with target info
    }
}

Learn More

Target Manager

Vuforia Target Manager

Vuforia Features from Device Databases

Image Targets

Multi Targets

Cylinder Targets

Other Vuforia Databases

VuMark Databases

Device vs Cloud Databases

Cloud Databases

Can this page be better?
Share your feedback via our issue tracker