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.
- Go to the Target Manager in the Vuforia Engine Developer Portal and login.
- Click Add Database. The Create Database dialog opens.
- Name the database and select the Device Type option. The database name should be unique for the developer account you are using.
- 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
- In the Target Manager database list, click the name of your Device Database.
- 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.
- 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 (_).
- 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.
- 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
|
Add a Multi Target to a Database
|
Add a Cylinder Target to a Database
|
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.
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
- In a database, Click the Target's name listed in the target list.
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. |
|
|
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 name of the database containing the targets that you want to remove.
- 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.
- 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.
4. Define a new name for the database in the Edit Name dialog and click Save.
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.
- Start by following the steps in the View Details of a Target section above.
- 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 |
- Go to the Vuforia Target Manager Home Page.
- In the list of databases, find and click the name of the database that you want to download.
- 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
}
}