- Sort Posts
- 7 replies
- Last post
Hi ashunkhs, There is nothing
Loading & activating multiple dataSet
Hello there, I'm just curious as to what the maximum number of simultaneously activated datasets is? And what are the performance effects of increasing the number of simultaneously running datasets to the application. I'm still looking for this information within your vuforia resources but have yet to find them.
Loading & activating multiple dataSet
Hi, Vuforia 2.0 does not set a specific limit to the number of activate Dataasets, however it limits the maximum number of Image Targets to 100, this means that you can use how many activate DSs you want as long as the total number of Image Targets included in those DSs does not exceed 100 targets (so you could for example activate 2 datasets with 50 targets each, or 100 datasets with 1 target each, as an example...)
Performance-wise, what matters is the total number of Image Targets in those activate Datasets; so, for example, 2 active DS with 10 targets each should perform the same as 1 DataSet with 20 targets (as 2 x 10 = 20, so total number of targets does not change).
Loading & activating multiple dataSet
Yes, thank you very much.
After i posted that inquiry I was able to stumble upon the following link, which states that I am only limited to 100 active targets at the same time.
Again thank you very much for your help.
Hi ashunkhs,
There is nothing special about activating multiple datasets; you can simply call the function "imageTracker->activateDataSet( some_data_set )" for all the datasets that you want, for example, the following code is perfectly legal:
// create datasets
dataSet1 = imageTracker->createDataSet();
dataSet2 = imageTracker->createDataSet();
// load datasets
dataSet1->load( "MyDataSet1.xml", QCAR::DataSet::STORAGE_APPRESOURCE);
dataSet2->load( "MyDataSet2.xml", QCAR::DataSet::STORAGE_APPRESOURCE);
// Activate my datasets
imageTracker->activateDataSet( dataSet1 ); //activate first dataset
imageTracker->activateDataSet( dataSet2 ); //also activate second dataset
One note on the general process:
you can either create, load and activate your datasets all at once during initialization (see the _loadTrackerData() function in ImageTargets.cpp for instance)
or you can create/load the datasets at initialization and then activate or deactivate any of them in the QCAR_OnUpdate() function (also check the ImageTargets.cpp example); the QCAR_onUpdate() is a safe place where you can manipulate your datasets (e.g. activating one and/or deactivating another one), without the risk of interfering with the QCAR tracker.
I hope this helps.