Best Practices for Tracking Tags and Touch Input

This topic describes what to expect from the vision system of a device made for Surface 2.0 under various conditions, and includes suggestions about how to adjust your code to adapt to those conditions.

What the Vision System Sees

The vision system of devices made for Microsoft Surface 2.0 sees and reacts to light, taking 60 pictures per second. When tracking tags and touch input, special considerations need to be taken into account. For example, if an object placed on the display surface reflects light that is coming from bright-colored content in your application, the vision system might detect a new blob. Additionally, if a tag is very thin and mounted on a transparent object, then any light shining through it from the external environment can make it difficult for the vision system to detect the tag value.

The next sections describe the ideal lighting conditions, user interface (UI) design, application design, and other conditions for the optimum performance of touch input in a Surface application. You can use the information in this section to determine which of the subsequent sections might apply to your application.

Always test your tags on a device made for Surface. You can use the SDK samples Data Visualizer and RawImage Visualizer to test your tags if your application is not available, but for best results, test your tags with your application on a device made for Surface that is in the same kind of physical environment as you expect. There is no substitute for testing tag recognition on a device made for Surface prior to mass production.

There is indirect light or low light around the device made for Surface

The best physical location of a device made for Surface is in an area with diffused, energy efficient, compact fluorescent lights (CFLs) or LEDs. Also, consistent lighting is best, with no direct light or moving daylight hitting the display surface. This way, distinct shadows and bright spots are not cast onto the display surface, and seen as touch inputs.

For more details about the best lighting conditions in the external environment, see the section titled "Lighting considerations" in the Venue Readiness Guide, available as a download from the Samsung SUR40 product page.

Dark colors are displayed under any area where tags or objects will be placed

The best colors to use for the content of your application, in areas where you expect objects or tags to be placed, are darker colors with no red component. This is because any light shining out of the display surface might reflect off of shiny objects and make the vision system to detect a new blob. If you use tag visualizations, you can try using a visualization to create a dark area under a tag after it is detected.

For information about using Surface colors, see Surface Colors and Palettes.

The application allows time for tag values to "come and go", or doesn't require tags to be dragged

Under less ideal conditions, tag values might "come and go" as the vision system loses and regains contact while a tagged object is moving. This can result in tag visualizations that rapidly appear and disappear. This is useful if your tag is on a visor that hides a player's assets in a multi-player game. For example, if a player accidentally knocks their visor while they're playing a card game, they would want their cards to disappear from the screen immediately.

However, if you cannot depend upon ideal conditions when your application is running, or you want a tag visualization to follow a moving tagged object, you can modify your code to wait half a second before removing the visualization. Alternatively, you could modify your code to wait until a tag stops moving, and then animate the transition of the visualization from the starting location to the end location.

The application tracks tags by value

As a best practice, track tags by their value (the Value property in Core Layer applications, or the Value property in Presentation Layer applications.). Don't track tags by their identifier (the Id property in Core Layer applications, or the Id property in Presentation Layer applications).

The application doesn’t require tags to be placed close together, or doesn't require tags of the same value

If tags of the same value are close together, the vision system might swap the IDs.

Tags have a good IR-reflective and absorptive contrast

The best quality printed tags use ink that is truly black. Many printers that use the CMYK (Cyan, Magenta, Yellow, and Black) format will print a color that appears black, but uses only CMY, not K or "true" black. Laser printers seem to work very well. Tags should be printed on material that is not too reflective, to avoid a blooming effect around the white dots.

Alternatively, you can use clear vinyl tags, as long as there is good IR-contrast and no light will shine through the tag. You can also etch tags into objects, using highly IR reflective paint for the dots.

For more guidelines, see Printing Tags.

High quality, resilient tags are used

Printed tags can wear off rapidly when they are used or handled often, due to normal wear and tear. The vision system might have difficulty detecting worn out tags. For this reason, we recommend tags printed on vinyl stickers or embedded in objects (such as etched acrylic) for maximum durability. Tags shouldn’t have a protective overlay that diminishes the contrast, such as a matte laminate. Nor should they have a reflective laminate.

You can order sets of vinyl stick-on tags from third-party vendors such as GM Nameplate. Make sure the vendor knows that you are ordering tags that will be used on a device made for Surface 2.0, so they should not have a matte laminate like the tags that worked best on Surface 1.0 units. Etched tags can be ordered from some model shops.

Tags are placed on dark or non-IR reflective backgrounds

A single tag on a physical object with a black or non-IR reflective background provides the best tag recognition performance for small objects, such as game pieces. It is important that no "slivers" of lighter color appear around the edges of the tag area. On larger objects, if you can extend the black area of the tag without changing the size or position of the white dots, you will have better performance.

For large objects, such as promotional fliers, the best performance can be expected when the only "true" black used on the tagged side of the object is the tag itself. Any other printing on the tagged side of the object should be done with CMY only (no K), using narrow fonts with lighter tones. In certain cases, large areas of darker toned CMY will interfere with tag recognition.

Any tags placed on IR-reflective backgrounds are off center and the tag’s dark region is larger

When a tag is placed on an object with a large light-colored or white background, the tag should never be positioned in the center of the object. Place the tag away from the center of the white area. Additionally, increase the radius of the dark region around the tag (without scaling the white dots on the tag).

Tags lay flat against the display

Some tagged items, such as brochures or cards that are warped, do not press the tag directly against the screen when laid flat. This can sometimes cause problems when Surface attempts to read the tag.

Did you find this information useful? Please send us your suggestions and comments.

© Microsoft Corporation. All rights reserved.