Marker Tracking
→
Return to Tracking Configuration
Introduction
With marker tracking, a reference pattern is identified in the image input (e.g. coming from a webcam) using a built-in image recognition software component. The detected pattern is then compared with the patterns defined in the according configuration files. Once detected the rotation and translation of the camera in reference to the pattern can be calculated to allow correct superimposition of 3D content into the input image. Thus e.g. putting the reference pattern on a street the information of its perspective in the image will be calculated and for example a virtual vehicle can be rendered into the image in the correct perspective.
A marker is a 2-dimensional optical reference pattern similar to a 2D barcode:
The Marker tracking is based on coded markers which can be configured in arbitrary number and size (but you can't change the inside pattern). These markers were developed by metaio and provide a robust tracking due to a maximum contrast and an integrated error correction mechanism which allows the detection even in relativly low quality images and from flat angles. The system determines the identity of the marker through the inner pattern of the dark squares. Up to 512 different markers can be created using the
Marker Generator tool. In order to allow tracking, always the full marker must be visible.
Getting started
When you start the Unifeye GUI it automatically loads a default marker tracking configuration file with 3 defined markers (ID 1 - 3) of size 140mm. If you print out the provided pdf file
SquareMarker.pdf (available via the Windows start menu in the submenu
Tracking Patterns), activate your camera, load a geometry and put the marker with ID 1 in front of the camera, it will be rendered on top of the marker with ID 1. Please note, that every loaded 3D model will be placed/assigned to the first configured tracking coordinate system (in the default case, the marker with ID 1) per default. You can change that by the according dropdown box within the Unifeye GUI:
If you want to use a different marker tracking configuration (more marker, less marker, different size), you need to create an according configuration. Please note that you should not just configure 512 markers and use this configuration always as this heavily impacts performance. It is recommended to always create the configuration file according to your needs
Creating customized marker tracking configurations
The tracking system is configured in so called "Tracking Configuration" files, sometimes also refered to as the "TrackingData" file. The tracking configuration file is a XML file. For the marker tracking system there are specific parameters and options available which are reflected in the configuration file. Fortunately you won't have to edit the XML file manually. The
Marker Tracking Configuration tool which can be found in the tool category "Configuration" within the Unifeye GUI allows a step by step graphical user interface based configuration. After the configuration file was created you can use it directly with the Unifeye GUI or the Workflow Authoring tool/engine by simply loading it.
Using existing marker tracking configurations
If you only want to load (any) tracking configuration file, e.g. when you try different configurations, you can do so by using the Unifeye tool "Tracking Configuration". It provides a file dialog that allows you to load an arbitray tracking configuration file:
Tracking quality modes
There are two different tracking qualities that can be used for marker tracking:
robust and
fast. In
robust mode, the binarization threshold is automatically adjusted to changing lighting situations. In
fast mode, the binarization threshold stays the same until it is manually changed. The
robust option is set as default and should not be changed if possible. There are some cases though where the
fast mode is needed (e.g. if you want to manually control the binarization threshold or if markers are very large within in the images).
You can change the tracking quality mode using the
Marker Tracking Configuration tool or manually change the
trackingQuality tag in the tracking configuration file using an editor of your choice. To set the binarization threshold when using
fast mode you can open a window containing a binarized version of the camera stream from within the
Marker Tracking Configuration tool or from within the Tracking Configuration tool.
In this window you will find a slider control just above the binarized image. Using this slider you can adjust the binarization threshold according to your needs.
Please note that the buttons for opening the threshold window are only activated if a marker tracking configuration in
fast mode is active in Unifeye and the image source set in Unifeye is a non-still-image.
Some important things to remember
- You should not create one configuration file with 512 markers and use it all the time as this drastically impacts the overall system performance. Better create tracking configuration files according to the really user markers.
- You should provide the correct dimension in millimeter inside the configuration file and not up-/downscale the marker PDF file during/after printing.
- If you need high precision you should provide an appropriate camera calibration.
- You should always leave enough white space around the black border of the print out of the marker:
Tools
- The Marker Generator lets you create PDF files containing marker tracking patterns. Those files can be printed and then be used for detection in still images or video/camera streams.
- The Marker Tracking Configuration tool provides an easy way to create tracking configuration files defining the markers you need for your specific project.
Using marker tracking configuration files
To activate marker tracking within the Unifeye SDK you simply have to load an according tracking configuration file and use the API function setTrackingData() (see
http://doxygen.metaio.com/UnifeyeSDK/UnifeyeSDK_doxygen/group__Configuration.html). You can also load the according tracking configuration file within the Unifeye GUI using the Tracking Configuration Tool.
→
Return to Tracking Configuration
--
SupportMetaio - 2011-01-21