Premade cache for tracking

0 votes
asked Jan 9, 2016 by Daniele Suppo (210 points)
Hello,

I'm wondering if is possible to speed up the "start-up process" in case of many 2D pictures and 3D objects to track, in the same app.

Do you think that would be possible to have a "premade cache" that users would download with the app?

Thank-you!

Daniele

1 Answer

0 votes
answered Jan 11, 2016 by Alex (6,680 points)

Hi Daniele,

yes that's perfectly possible, just open the conf.xml file and set the <write_cache> and <read_cache> parameters to 1 (instead of 0).

 

Note that:

 

1) to actually write/generate the cache, the tracking data should be in  location where your app have writing permissions

 

2) when you set <write_cache> to 1 this means that when the tracker starts it will generate the cache data and save it into the same folder where the conf.xml file is

 

3) when you set <read_cache> to 1 this means that everytime the tracker starts it tries to read cache data (if available) from the very same folder where the conf.xml is

 

Please note that the cache data strongly depends on the images used to create the pointcloud and also on the content of the conf.xml file this meaning that if you manually modify this file then the corresponding cache file would change and even if you have set read_cache to 1 that would not have any effect because you should first re-generate it (based on the modified conf.xml file). Also note that you cannot rename the cache file.

 

When you are confident that you won't modify the conf.xml file anymore, then you can:

 

- set the <write_cache> parameter back to 0

- avoid to distribute all the images used to create the pointcloud

- move the tracking data even in a location that is read-only

 

A positive side-effect of using the cache mechanism is that you can deploy your app by just  providing the pointcloud, the conf.xml and cache file (without the images), so  your app footprint can be reduced a lot.

 

Hope this helps.

Alex

Welcome to Developer Portal Q&A, where you can ask questions and receive answers from other members of the community.
...