Log in or register to post comments

Is downloading and using trigger images at runtime possible

September 24, 2018 - 6:57am #1

Hello.

We're considering Vuforia for a project with specific requirements. Would it be possible to download and setup a tracking image database at runtime? So for example, a database could be uploaded to a server, then the app would get it an be able to track new trigger images without the need of rebuilding the app. On this forum I've found an old post saying it's possible, but its old and has been downvoted.

Is it possible? Does Vuforia have tools to make it easier? Thanks.

Is downloading and using trigger images at runtime possible

September 24, 2018 - 11:17am #2

Hello marcinlazo,

There are two potential methods for accomplishing what you are describing.

The first option is to utilize our Cloud Recognition/Database feature: https://library.vuforia.com/articles/Training/Cloud-Recognition-Guide.html This will allow you to store your database in a cloud and process the image recognition from there.

The second option would be to store you databases on your own server and to then download them to your project. Once you've downloaded them, you can load and activate them within Vuforia. The follow code provides a quick example of how you could approach loading and activating a database that is present in your project.

public void LoadAndActivateDataset(string loadThisDataset)
{
    TrackerManager trackerManager = (TrackerManager)TrackerManager.Instance;
    ObjectTracker objectTracker = TrackerManager.Instance.GetTracker<ObjectTracker>();

    //Stop the tracker.
    objectTracker.Stop();
   
    //Create a new dataset object.
    DataSet dataset = objectTracker.CreateDataSet();

    //Load and activate the dataset if it exists.
    if( DataSet.Exists( loadThisDataset ) )
    {
        dataset.Load( loadThisDataset );
        objectTracker.ActivateDataSet( dataset );
    }
 
    //Start the object tracker.
    objectTracker.Start();
}

Thanks,

Vuforia Engine Support

Log in or register to post comments