In late 2011 Qualcomm, one the world leaders in ARM processors, released a series of tools dedicated to computer vision and augmented reality, optimized for ARM architectures. Two of them immediately caught our attention: FastCV, a low-level computer vision SDK that is not without recalling us of the famous OpenCV, and Vuforia, a high-level, out-of-the-box augmented reality SDK. We installed their demo application, and were quite impressed by the quality of their visual tracking. So, a few weeks ago, we decided to try making something out of these SDKs and started working on a mash-up with our own SDK, that would combine the advantages of both solutions. Moodstocks SDK would provide a robust and real-time image recognition (thanks to its smart sync feature), and we would use one of Qualcomm’s SDKs to add visual tracking of the detected object.
Here is how it would work:
- Moodstocks SDK processes the camera flow in real-time, and at some point matches the current frame with an object that belongs to its database. It passes this information to one of Qualcomm’s SDKs. This step has all the advantages of Moodstocks SDK, as it uses our synchronization service: it makes applications lighter to download than any application using a bundled database, and allows changes in the database without requiring an application update each time a change, however minor it may be, occurs in the database.
- Given that the image has been properly recognized, Qualcomm’s SDK locates this object on the current frame and starts tracking it on the following frames, with the impressive fluidity that we could observe in the demo application, to add to the user experience.
We decided to begin with Vuforia SDK, as it seemed easier of use. Its strength for most developers is that it’s quite easy to use: you add Vuforia SDK to your application, upload all the images you want to recognize and track (via a convenient web interface), and in return you download one single qcar-resource.dat file containing the data necessary to perform these operations on your application. However, this full packaging was the source of several problems in our case:
- the first is that you cannot separate the image recognition among a database from the location and tracking part. A possible trick to separate these two functions would have been to create several of these .dat files, one for each image we wanted to track: as image recognition among a database of only one image is a trivial task, Vuforia SDK would matter of factly do no more that tracking. This could have worked, if Vuforia had not supported a single .dat file that must be named qcar-resource.dat… and juggling with some on the fly file renaming would not have been a really practical solution.
- the second one is that these .dat files are quite heavy, and we wanted to keep the advantages of our synchronization. Using one (or several) of these files would require to manage a second, heavier database than the one used for our image recognition.
In the end, Vuforia appeared to be too high-level and not flexible enough for our needs… all these tricks were far too dirty for us to implement them, so we decided to try our chance with the lower-level FastCV SDK.
We began by searching inspiration in the sample codes and documentation of the SDK. That was quickly done: the two sample codes illustrate hardly a tenth of the functions available in the library, and the documentation of each functions holds in two lines tops. But well, ok, this SDK is still quite young and needs to mature for some time. We went on anyway. After a bit of fumbling through the documentation, FastCV SDK seemed to contain everything we needed to implement the tracking part in itself without too much pain: a ready-to-use tracking function, and an efficient features detector to feed it. Of course, it would require a bit of wrapping to work, but it had the advantage of doing what we needed it to do, nothing more, nothing less. So we had what we needed to track features… Cool. But we couldn’t just track any features on the frame: we first had to locate the object recognized by Moodstocks SDK and extract features to track only from this object. And that’s when things got messy.
We tested several different tactics using the different tools included in FastCV. Our first idea implied using a quite classical method in image matching: pre-process the image to track to extract interesting features, describe them, and search for these features in the camera frames at runtime. As the task of finding a reference image in a camera frame when we do know it’s there (from our own SDK) is quite simple, we hoped to do this using only a few features, which would have had the advantage of allowing to package the lightweight necessary information (aka the descriptors) in a smart way by encoding this information directly within each image identifier. That’s for the theory… but in practice, it appeared that FastCV proposed only one, never-heard-of descriptor. From its concise documentation, it seemed to be some kind of custom, lightweight SURF-like descriptor. We tested it, and realized that it would never be robust and discriminant enough to allow image detection with the small number of reference features we could afford… and we found ourselves once more back to the beginning of our research. We tried a few other methods, before realizing that as we went on, our ideas were becoming more and more heavy and impractical… we just couldn’t find a simple and smart enough way to go through this tracking initialization step using FastCV, and creating a 1000-line-long, barely understandable piece of code would not have served the purpose of illustrating what could be done using both FastCV and our SDK.
So after a few days of work, we simply decided to give up -at least for now- on this project. Let it not be said that we criticize Qualcomm’s SDKs: I would personally encourage developers to use them. Only, none of them was fitted to the specific use we wanted. Vuforia is a perfect SDK for any developer who wants to implement painless augmented reality and doesn’t specifically care about the size or flexibility of their apps. It won’t fail to amaze their users and make their eyes shine. Considering FastCV, I would encourage anyone who work in mobile computer vision to use it as an optimized, efficient toolbox from which to pick elementary functions that will boost your applications. As for us, we’ll keep an eye on the evolution of these two young SDKs and won’t miss the opportunity to resume this project if the opportunity arises.

Posted on 1,Mar |
Posted by Maxime Brenon 









Comments
By Shravan  
437 days ago
Hi,
I am trying to implement the two apis you told in fastcv(fastcornerinmask and the lk flow). But I am dont know how to mask the image for this. Will u please tell me where I can get this information.
Cheers,
Shravan
By Maxime Brenon  
432 days ago
Hi Shravan,
You can find the official documentation of both these functions here: https://developer.qualcomm.com/docs/fastcv/api/index.html , in the “feature detection” and “object detection” categories.
It’s not always crystal clear, but useful anyway!
Cheers,
Max
By mxg  
406 days ago
Hi Maxime!
Can you tell me, please, how you have created the .dat files?
which program have you used?
Thanks in advance!
By Maxime Brenon  
405 days ago
Hi mxg,
You can create the .dat files using Vuforia’s web interface, at this address (you’ll have to login): https://ar.qualcomm.at/qdevnet/projects
From there you can upload your images and get the data files in return!
Maxime
By davis  
181 days ago
can we use any .dat files from an image ? I would like to create a backend system to concert png to .dat files ..is that possible ?
By Maxime Brenon  
181 days ago
Hi Davis,
As far as i know, the image to .dat conversion must be done using Qualcomm’s web service… I guess you won’t be able to implement that yourself, as the process to convert image to their .dat format must be close-source: it’s on this format and the technology that is behind this conversion that their SDK relies, and they probably don’t want anyone else to know what’s happening in there.
By ashok  
360 days ago
Hi,
Previously i did one application by using QCAR(marker based).but in that application i am dealing with static image .now i want to implement with fastcv..
i downloaded sdk ,and i installed sample app provided by them.Now in that application it is giving the trackable’s ,after that how can proceed?.
My requirement is when i focus camera on any object(ex:phone) i want to show some video.this behavior should be applicable for all the phones
By Maxime Brenon  
359 days ago
Hi ashok,
We can’t really help you on this topic, you should contact Qualcomm support instead, or refer to their documentation (it can be found here: https://developer.qualcomm.com/docs/fastcv/api/index.html).
By ashok  
356 days ago
Thank you for your suggestion.
By titou  
358 days ago
Hi;
I instaled the vuforia sdk in my eclipse and when i execute ImageTarget application i have nothing.
can you help me please
By Maxime Brenon  
345 days ago
Hi titou,
We can’t really give you any advice on the use of Vuforia SDK, you should contact them directly or see if you can get any answers on their forums (https://ar.qualcomm.at/qdevnet/forums)
By yc  
165 days ago
Maxime, what sort of objects were you trying to track with FastCV – you mention something with very few feature points.. just curious
By Maxime Brenon  
165 days ago
Hi!
We were in fact trying to track anything that our own SDK is able to recognize, but it’s not what I meant when I talked about few feature points: I intended to use FastCV to detect and describe a few of its own feature points, to encode them in the image IDs in our own SDK, and use them as a starting point for tracking. Given the (quite high) dimension of these feature points descriptors and the available size in our image IDs, I could only afford to encode a very few of these points, which was not enough to make this initialization possible.
By pradeep  
111 days ago
Hi,
I think the descriptor described in FastCV is phonySift, although they don’t disclose it.(https://studierstube.icg.tugraz.at/handheld_ar/naturalfeature.php). . Qualcomm is most probably using Studiertube tracker, and they should have improved on top of it over the years.
I’m going to give it a shot and wanted to check few things. Did you try finding feature points (FAST), and tracking just using NCC (provided in FASTCV as well) by doing exhaustive search ? This tracking step can be done once you determine a match from moodstock api. (https://studierstube.icg.tugraz.at/handheld_ar/highspeed_nft.php)
By Maxime Brenon  
110 days ago
Hi Pradeep!
Thanks for the details the descriptors and tracker used by FastCV: they seem to like a little secrecy, and knowing what’s behind the framework is always useful.
I think FAST + NCC may work, even though searching exhaustively might be a little performance-consuming.
Bear in mind that this post is also a little old, and that things have evolved since then on Qualcomm’s side. I did not dive into the details, but it seems that the latest release of their higher-level framework Vuforia now allows the use of tracking from an image captured dynamically on the phone, without having to prepare a heavy (and static) binary bundle from their web-service. You may be interested in giving it a try!
By Pradeep  
109 days ago
Thanks Maxime ! I’ll take a look at their latest sdk. Will let you know if NCC + FAST + smart search gives comparable results.
By erlan  
54 days ago
thanks for your useful article, need this a lots, but you just explain a few of methods used in vuforia image recognition, could you please share me the full methods they used for ?
By Maxime Brenon  
53 days ago
Hi Erlan,
Concerning Vuforia, I didn’t dive into the details of the SDK, due to the fact that it was too high-level for our purpose (at the time, as it seems that things have evolved on their side since this article was written).
I advise you to use their official documentation and sample codes, which both improved a lot in the last few months: https://developer.vuforia.com/resources/dev-guide/getting-started .
Hope this helps you!
By Amr El-Ansary  
50 days ago
Hi Maxime ,
im trying to integrate both APIs using Unity3D ,
i’m using the samplecode of UserDefinedTargets,
but im facing some problems in integrating Moodstocks with Unity3D , can you please give me any guidelines ?
Regards,
By Maxime Brenon  
48 days ago
Hi Amr,
We do not have a Unity plugin yet, and we have not tried integrating the SDK in this environment either, so I fear we won’t be able to provide you much help on this subject.
It might nevertheless be possible to integrate our SDK in Unity using our current iOS and Android wrapper, but it will probably require some work on your side to get things together: if you decide to try doing so, we’ll be happy to provide you some support via our help center (help.moodstocks.com).
By Thomas  
40 days ago
You guys make me laugh!!! Good luck