Log in or register to post comments

Clear User Defined Targets

March 27, 2014 - 2:10am #1

Hi.

How can I clear all user defined targets?

 

I'm currently doing this by user input in my application:

TrackerManager.Instance.GetTracker<ImageTracker>().Stop();
TrackerManager.Instance.GetTracker<ImageTracker>().TargetFinder.ClearTrackables(false);

And after a second I turn the tracking on again with:

TrackerManager.Instance.GetTracker<ImageTracker>().Start();

When the tracking is turned on, vuforia immediately picks up the previously created user defined target and I don't want this to happen.

I'm using the Unity plugin.

Thanks,
Samu

Clear User Defined Targets

July 10, 2014 - 12:58am #7

To be clearer:

the onQCARUpdate() method is the sample code function which actually triggers the QCAR_onUpdate() method of the UpdateCallbackInterface.

 

Clear User Defined Targets

July 10, 2014 - 12:53am #6

Yes, you always need to deactivate the Dataset before doing this kind of operation.

Also, in Java, you will want to do this in the onQCARUpdate() method of a Vuforia.UpdateCallbackInterface that you have registered with Vuforia, as shown in the User Defined Target sample code.

 

 

 

Clear User Defined Targets

July 10, 2014 - 12:42am #5

Doesn't this return false (I.E not work) if the dataset is active? D:
Sorry for being a bit noobish c:

Clear User Defined Targets

July 10, 2014 - 12:41am #4

Dataset.destroy(Trackable  theTrackableToBeDetroyed);

 

Clear User Defined Targets

July 10, 2014 - 12:36am #3

How would one do this in the Java API?

Clear User Defined Targets

March 27, 2014 - 4:00am #2

Hi,

I think you are confusing the Cloud Recognition API (Target Finder) with the User Defined Targets API;

you need to simply remove the target from your Dataset, using the dataset.Destroy() method.

Please check the API reference:

https://developer.vuforia.com/resources/api/unity/class_data_set

and the UDT sample as well, because this technique is shown there too.

 

Log in or register to post comments