Log in or register to post comments

how to load the target from internet ?

March 3, 2013 - 8:01am #1

 Hi,

          I have a question about loading the targets.  Now  I replaced the targets from ImageTarget sample should modified the .cpp to change the "stoneandchips.xml" to my target.xml . I just want to know could I set a variable for the target xml name in the .cpp ,then .cpp will loading the xml name

dynamically ?

how to load the target from internet ?

March 13, 2013 - 7:05am #6

Excellent! Glad to help :-)

how to load the target from internet ?

March 13, 2013 - 7:01am #5

thank you AlessandroB 

i did it. 

thanks for your great help.

how to load the target from internet ?

March 11, 2013 - 2:52am #4

Hi,

you can download any file from a server and store it into your phone storage (this part is not related to Vuforia SDK, so you may want to search the internet for how to do that);

 

once the dataset .dat and .xml files have been stored on your device, you can load them with the usual API:

QCAR::DataSet::load( dataSetPath, StorageType );

you will probably need to set the storage type to STORAGE_ABSOLUTE if you want to load the dataset from a specific location (for instance from the SD card directory of your device).

 

Alternatively, have you considered using "Cloud Reco" ? with Cloud Reco (available with Vuforia 2.0) you can store targets on a Cloud database, which seems pretty closer to the scenario you describe.

 

how to load the target from internet ?

March 11, 2013 - 2:08am #3

hi AlessandroB

i also have this problem. 

i replace the target xml by my own target xml named test.xml successfully.  

but my app's size is larget than 12M, so i have a idea that  can i split app and dataset ?

when my app is running. my app download dataset from target server. than recognize the target.

 

thanks 

how to load the target from internet ?

March 3, 2013 - 9:26am #2

Hi,

you can certainly use a variable (in C++ it will be a char array or char* pointer) to pass the name of the dataset to the DataSet::load() function;

 you just need to keep in mind that if you want to do that at any time during program execution, you will have to put the code to activate your dataset inside the QCAR_onUpdate() function (see QCAR_onUpdate in ImageTargets.cpp for instance); in practice, after you have loaded your dataset, in the QCAR_onUpdate() you can call the myDataSet->Activate();  note: in general,  the QCAR_onUpdate() is the "safe" place where you can put all the code related to dataset management without interrfering with the QCAR background processing.

HTH.

 

Log in or register to post comments