Image Targets Optimization Techniques

In this article, we introduce different techniques for improving your image-based targets by evaluating and adjusting the contrast or adjust other settings on the device that may impact tracking performance.

We present a series of adjustments and different techniques to help you improve low performance image-based targets. Image Targets are tracked based on their natural features which can be enhanced through the contrast settings.

Additionally, if you experience that the environment or device also impacts the tracking robustness, it may be necessary to define the camera’s focus mode and other device settings.

Evaluate a Target Image in Grayscale

Vuforia Engine uses the grayscale version of your target image to identify features that can be used for recognition and tracking. You can use the grayscale histogram of your image to evaluate its suitability as a target image. Grayscale histograms can be generated using an image editing application, such as GIMP or Photoshop.

If the image has low overall contrast and the histogram of the image is narrow and spiky, it is not likely to be a good target image. These factors indicate that the image does not present many usable features. However, if the histogram is wide and flat, this is a good first indication that the image contains a good distribution of useful features. Note, though, that this is not true in all cases, as demonstrated by the image with gradient features.

Local Contrast

Good or bad local contrast is often difficult to detect with your eye. You can improve the contrast of the image by enhancing the features' edges as demonstrated in the example below. Other general features such as organic shapes, round details, blurred, or highly compressed images often do not provide enough richness and detail to be detected and tracked properly. See Best Practices for Designing and Developing Image Targets for more information.

Local Contrast Enhancement

If the evaluation or star rating of your Image Target resulted in insufficient features, we recommend enhancing the contrast as a way of improving target detection. This will improve the quality of the features by applying a local contrast enhancement adjustment on the image.

This adjustment modifies the image by increasing the local contrast across edges and around the corners. For this adjustment to yield the expected result, the printed target must be sharp, and the camera focus must be set correctly in the application at runtime. Otherwise, camera blur can diminish the effect of this adjustment. See Camera focus modes on how to adjust this setting.

NOTE: If you downscale the image on the longer side in the Target Manager it can destroy the effect of this adjustment; it is therefore important to scale down the image before this step.

The procedure to apply this adjustment is fairly simple. In our example, we use Adobe Photoshop. You can use any other graphic editor tool of your choice; however, the steps may differ:

  1. Load the image into Adobe Photoshop.
  2. Convert the layer into a Smart Object.
  3. Select Filter->Sharpen->Unsharp Mask and adjust the three settings (Amount, Radius, and Threshold) to enhance the contrast.

    NOTE: The Amount and Radius settings are interdependent, meaning that if you raise the Radius, you’ll need to lower the Amount, and vice versa.

    1. Amount controls the contrast applied to the edges. For high resolution images, the Amount should not exceed 200%.
    2. Radius control the thickness of the edges. Increasing by 1 pixel will affect one light pixel and one dark pixel alongside the edges of the features. For printed images, it is recommended to stay within 1-3 pixels to avoid halo effects.
    3. Threshold controls which pixels are affected by the two other settings. Its range, 0-255, are the brightness levels and indicate to what level the surrounding pixels would be sharpened. It much depends on how well the image details stand out from the background in your image, but it is recommended to keep the threshold setting at 10 or below.

The output is an image with enhanced contrast. If you wish to see more on image correction after contrast enhancement, please refer to your image editing tool’s own resources and the various guides available such as this one.

Original image

Image with enhanced local contrast

Print material

We recommend considering what material the target image will be placed on as glossiness and flatness can affect its trackability. Please consult the Physical Properties of Image-Based Targets for more information.

Device and Camera Adjustments

If the target is not focused well or poorly lit 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 and Flash torch to ensure the best camera conditions. See Working with the Camera in Unity and Camera API Overview for native for adjusting camera settings.

Can this page be better?
Share your feedback via our issue tracker