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 that 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 Unity and native projects.
Start by creating a Device Database in the Target Manager.
- Log in to the Target Manager in the Vuforia Engine Developer Portal.
- Click Generate Database. The Create Database dialog opens.
- Name the database and select the Device Type option. The database name should be unique to the developer account you are using. Only letters, numbers, dashes, and underscores are allowed.
- Click Generate. 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 date 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 Cloud Recognition.
- In the Target Manager database list, click the name of your Device Database.
- Click Add Target in the details view. A pop-up window opens with options to add an Image, Cylinder, or Multi Target to the database.
- The name you provide for the target must fulfill 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 (_).
- The dimensions you provide to an image-based target return the pose information in that scale during tracking. For example, if your Image Target is 16 units wide, moving the camera from the target's left border to the target's right border 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.
HINT: Unity and Extended Tracking use units in meters. - Upload the image files using the formats described here in the attributes table.
|
|
|
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.
The following information is displayed next to the target name for each Image Target.
- The target type.
- The augmentable Rating for the Image Target.
- The target status: Active, Inactive, Incomplete, or Processing.
- The date that the target was last modified.
View the Details of a Target
- 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 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. |
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. |
Remove Targets from a Device Database
You can remove targets from a Device Database with the Target Manager using these steps:
- Go to the Target Manager Home Page; you will see a list of Device Databases
- Click the database name containing the targets that you want to remove.
- Click the check box next to the targets you want to remove from the list or check the box next to Target Name to remove all targets.
- 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 will be 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
- Go to the Target Manager Home Page.
- Click the database name you want to edit in the database list; this will take you to the database's details page.
- Click the Edit Name link under the database name at the top of the page.
- Define a new name for the database in the Edit Name dialog and click Confirm.
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 not affect any target already downloaded as a Device Database.
- Start by following the steps in the View Details of a Target section above.
- When on 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 you to select which images in the composition you wish to change.
How to Download Targets in a Device Database
You can download the database as a ZIP archive or a Unity Asset Package. 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 |
- Go to the Vuforia Target Manager Home Page.
- In the list of databases, find and click the name of the database you want to download.
- Click Download Database. Select the format you want to download.
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 your project's StreamingAssets folder.
Native
Download your Device Database as a ZIP archive. Unpack the zip file and copy the two target asset files (DAT and XML) to your project's Assets directory.
To test your 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:
1234567891011121314151617CopyVuDatabaseTargetInfoError 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
}
}