Vuforia is able to recognize and track targets by analyzing the contrast based features of the target that are visible to camera. You can improve the performance of a target by improving the visibility of these features through adjustments to the target's design, it's rendering and scale, and how it's printed.
You can also improve detection and tracking performance by controlling the focus mode of the device camera and designing your app's user experience to obtain the best image of the target.
Review these tips and practices to understand how to affect these variables and achieve the best possible performance for your AR apps.
To get started designing targets, See:
Attributes of an Ideal Image Target
Target star rating
Image Targets are detected based on natural features that are extracted from the target image and then compared at run time with features in the live camera image. The star rating of a target ranges between 1 and 5 stars; although targets with low rating (1 or 2 stars) can usually detect and track well. For best results, you should aim for targets with 4 or 5 stars. To create a trackable that is accurately detected, you should use images that are:
|Rich in detail||Street-scene, group of people, collages and mixtures of items, or sport scenes|
|Good contrast||Has both bright and dark regions, is well lit, and not dull in brightness or color|
|No repetitive patterns||Grassy field, the front of a modern house with identical windows, and other regular grids and patterns|
For more information on the features and rating of Image Targets and for advice on how to enhance your Image Targets, see these articles:
Camera focus modesIf the target is not focused well in the camera view, the camera image result can be blurry and the target details can be hard to detect. As a consequence, detection and tracking performance can be negatively affected.
It is recommended to make use of the appropriate Camera Focus Mode to ensure the best camera focus conditions.
- Try the continuous autofocus mode (FOCUS_MODE_CONTINUOUS_AUTO) because it lets your device automatically adjust the focus as the view changes.
- Not all devices support the continuous autofocus mode, so consider the other focus modes available in the Vuforia API.
- Many of the Vuforia samples show how to use the FOCUS_MODE_TRIGGER_AUTO option to trigger a one-shot autofocus adjustment when the user touches the screen. Check the sample code to discover how to do this.
Lighting conditionsThe lighting conditions in your test environment can significantly affect target detection and tracking.
- Make sure that there is enough light in your room or operating environment so that the scene details and target features are well visible in the camera view.
- Consider that Vuforia works best in indoor environments, where the lighting conditions are usually more stable and easy to control.
- If your application use case and scenarios require operating in dark environments, consider enabling the device Flash torch (if your device has one), using setFlashTorchMode() Vuforia API:
CameraDevice.getInstance().setFlashTorchMode( true );or in Unity:
CameraDevice.Instance.SetFlashTorchMode( true );
- For tabletop, near-field, product shelf and similar scenarios, a physical printed image target should be at least 5 inches or 12 cm in width and of reasonable height for a good AR experience.
- The recommended size varies based on the actual target rating and the distance to the physical image target.
- Consider increasing the size of your targets if the distance of the target is higher.
- You can estimate the minimum size that your target should have by dividing your camera-to-target distance by ~10. For instance, a 20 cm wide target would be detectable up to a distance of about 2 meters (20 cm x 10). Note, however, that this is just a rough indication and the actual working distance/size ratio can vary based on lighting conditions, camera focus, and target rating.
Printed target - flatnessThe quality of the tracking using Vuforia SDK can degrade significantly when the printed targets are not flat. When designing the physical printouts, game boards, play pieces, try to ensure that the targets do not bend, coil up, and are not creased or wrinkled. A simple trick is to use thick paper when printing, for example, 200-220 g/m². A more elegant solution is to get the printout foam core mounted on a 1/8” or 3/16” – 3 or 5 mm – thick board.
Printed target - glossinessPrintouts from modern laser printers might also be glossy. Under ambient lighting conditions a glossy surface is not a problem. But under certain angles some light sources, such as a lamp, window, or the sun, can create a glossy reflection that covers up large parts of the original texture of the printout. The reflection can create issues with tracking and detection, since this problem is very similar to partially occluding the target.
Attributes of an Ideal Image Target