- Sort Posts
- 16 replies
- Last post
Re: Dynamic Trackables
Hi,
How about overwriting the trackable file with a new image? For example, having a limited number of trackables in the application (say 5), and once you need a sixth, you just overwrite the oldest one with the new one, keeping the name of the file. Would that work? Or do you embed the tracking code into the application, and once it's there, there is just no way to modify it, not even with possibly overwriting files? Sorry if it's a stupid question, just trying to see if there are any compromises that we could make to make it work one way, or other.
Re: Dynamic Trackables
Currently the trackable files must be present in the assets folder at compile time and cannot be changed at runtime. We are considering dynamic loading of trackable files for future versions of the SDK.
- Kim
Kim,
Thanks for the quick response.
Can you give me a timeline as when this might be included in a future version. I am currently developing with the iOS SDK and know that this is still in Beta. Can we expect this dynamic loading functionality by release?
Even a client side image trackable loader, similar to Powered by String, that would load images, find the features and manage a searchable feature dictionary, would be a great addition and help with dynamic image tracker.
Thanks,
Justin
Re: Dynamic Trackables
I was just messing around with the sdk, and tell me if I'm wrong, but on iOS just by moving a qcar-resources.dat and the config.xml file from the application bundle directory to the application documents or library directory would make them half-easier to update. But of course I may be oversimplifying things... :)
Re: Dynamic Trackables
From what I understand Kim said, is that the .dat and .xml files are compiled into the application when Xcode or eclipse builds the application.
If I am wrong and its just based on a fixed file system location, then why can't we move the fixed location to a the App's documents location and we can override the files and re-load the feature data when we want dynamic trackables.
Re: Dynamic Trackables
Well, to be completely honest, I didn't actually try the Android version, but I messed around in the file system of the iPhone after installing my application, and the config.xml and resources dat files are in the main bundle folder location. Unfortunately you can't modify the main bundle folder after installation, but you can modify/overwrite stuff in other folders, like the Documents folder. There are a couple of issues that need to be taken care of for it to work, but in my mind, it would be one way to make it work. :)
Dynamic Trackables
Hi junkieHead
Yes it is, to a degree.
The way this works is that you need to break up your images into different datasets. Each dataset can either be statically built with the app, or it can be downloaded OTA and stored in the documents directory of the application. If it is done the latter way you need to make use of this:
QCAR::DataSet::STORAGE_ABSOLUTE as opposed to QCAR::DataSet::STORAGE_APPRESOURCE
There are plenty of threads in the forum about this, so I recommend searching to learn more about this.
Once you feel more confident then you could try building a sample/test app based on ImageTargets to check that it provides what you need.
HTH
N
Dynamic Trackables
This is irrelevant to the post but could u please help me out in building a sample app which opens a UIView when image is detected. I have referred to all the posts related to this but unable to make anything working. If any sample demo is available please forward me at
I am unable to understand what should i do to completely remove the opengl from the image tracking app. Also when i started building the app from scratch, I was unable to implement the SDK as I got confused where to begin with due to lack of understanding of the workflow. Please help me out.
Dynamic Trackables
Hi junkieHead,
My suggestion is to get familiar with all the samples first in order to understand the workflow - unfortunately there is no shortcut ;)
Look at the Image Targets app and how it brings up a UIView when you touch the screen (in order to change datasets) - this should get you started.
Once you become more familiar you can try to build a sample up from scratch and you will see that initialising QCAR is relatively straightforward:
// attempt QCAR initialisation
QCARutils* qUtils = nil;
qUtils = [QCARutils getInstance];
// Provide a list of targets we're expecting - the first in the list is the default
[qUtils addTargetName:@"Stones & Chips" atPath:@"StonesAndChips.xml"];
[qUtils addTargetName:@"Tarmac" atPath:@"Tarmac.xml"];
Next in order to remove the OpenGL rendering you need to look at the code in RenderFrameQCAR, which at a minimal level needs to have the following:
QCAR::setFrameFormat(QCAR::RGB888, true);
QCAR::State state = QCAR::Renderer::getInstance().begin();
NSLog(@"active trackables: %d", state.getNumActiveTrackables());
QCAR::Renderer::getInstance().end();
Once you have the state variable, then you can do whatever you want because this contains the info on the trackables. However in this scenario QCAR is still controlling the render loop.
HTH
N
Dynamic Trackables
Dear NalinS,
Thanx for your reply. I will surely try the UIView popup thing.
As far as renderQCAR frame function is concerned, I have previously tried removing everything and only kept the state variables mentioned by you and what I did was that i inserted the UIView code by calling a nib file through presentModalViewController but it is returning an exception.
Any suggestions on that.
In the mean time, I am looking at the UIView Part of the Image Tracker Example.
Currently the trackable files must be present in the assets folder at compile time and cannot be changed at runtime. We are considering dynamic loading of trackable files for future versions of the SDK.
- Kim