Developing AR Games for iOS and Android — Save 50%
Develop and deploy augmented reality apps using Vuforia SDK and Unity 3D with this book and ebook
This article written by Dominic Cushnan and Hassan El Habbak, the authors of Developing AR Games for iOS and Android, discusses about how Vuforia tracks the images and also defines the various features that can be tracked in an image. This article contains two sections: What decides trackable score? and Features definition.
(For more resources related to this topic, see here.)
What decides trackable score?
Trackables are the foundation of the AR experience using Vuforia. It is paramount to understand and create a suitable trackable for the experience to be robust and useful. The score attributed to the trackable in the target manager is our indication of how robust the target image is going to perform, but what decides that score?
Best way of understanding this, is by understanding how Vuforia tracks the images. The idea is simple, it looks for position of contrasting edges in clusters all around the image. Those edges are tracked, and based on the map of positions that are stored in the dataset, Vuforia can tell the relative position of the trackable in the real world and accordingly render the 3D content on top of it. This particularly means that tracking the image is not a function of its color or what really is in it, as much as how many contrasting edges are there in the image, and how well they are distributed on the image.
To better understand this, we can look on the current edges that are recognizable in the image we have just uploaded. To do that, simply click on the Show Features link on the top left of the webpage. The following image shows features in image target stones:
Once the Show Features link has been clicked, the image target manager layers over the target image an overlay of where it detects a recognizable edge that it can track in a Vuforia image target. Notice that it is only tracking the dark edges between the Stones and nothing else in the image. It is even tracking only the high contrast edges between the Stones, while ignoring some of the lighter ones.
Also notice that the number of edges found in the image is large, and evenly distributed all around the image. This is a great factor in what made this image great for tracking.
To contrast this image's result, let's try an image that will yield a 1-star score when tried on the target manager. The following image shows landscape image added to target image:
Before adding this image, intuitively we might think that this image is suitable for tracking. It certainly has a lot of details of a wide-angle landscape. But this image yielded a shocking 1-star result when added to the Target Manager.
The main reason for the low score for this image is the fact that the entire image is a shade of green. This greatly diminishes contrasting edges in the image.
If we are to click on the Show Features link on the top, we will be able to see what the target manager detected from the image. The following image shows features in the mountain landscape image:
Immediately, we notice the considerably lower number of features detected in the image compared to the stones one. It only detected the edges created by the shadows of the objects in the image, which is clearly not enough to award it any score above 1 star.
To help us get a higher score, we must understand what are the features that the target manager is looking for. We do know now that the main thing that the target manager is looking for in an image is edges, but what kind of edges specifically? To understand that, we need the definition of features.
A feature is a sharp and spiked detail in the image, like the corner of an edge. Features must be very contrasting to be found and it has to be distributed evenly across the image and in a random manner. The following image shows shapes and features recognized in them:
In the shapes illustrated above, we can see the yellow crosses representation of the features recognizable in the shape. The representation is as follows:
- Shape 1: It is a perfect circle without any corners at all, and such no features are recognizable in it.
- Shape 2: It has an edge to the left with two recognizable corners. That yields two features recognizable in the shape.
- Shape 3: It is a square with four edges and four corners. This yields four recognizable features in the shape.
This means that any curved object yields little to none features at all. Primarily, humans and animals make very poor trackables due to their curved nature.
Thus in this article, we learned about how to track an image and which features are recognizable in an image.
Resources for Article:
- Interface Designing for Games in iOS [Article]
- Unity Game Development: Welcome to the 3D world [Article]
- Unity Game Development: Interactions (Part 1) [Article]
eBook Price: $19.99
Book Price: $32.99
About the Author :
Dominic Cushnan is a visionary, and he is always looking for the next new idea and technology to analyze. He is currently the director of a software company dedicated to bringing augmented reality solutions to various types of clients in various fields. Dominic began developing web-based AR projects, and he has seen the industry grow and develop over the years. Working initially with advertising agencies and brands, Dominic is excited to see the consumer AR market expand.
Hassan EL Habbak is a software engineer with a huge interest in mobile technologies, particularly in the areas of AR and gaming. He started off with small-scale mobile applications, but soon found himself creating massive AR experiences for a variety of businesses and individuals. He is also a gaming enthusiast with various games already implemented using free technologies such as Unity. He thrives on finding channels through which he may deliver his content to the masses of unsuspecting people.