Module that finds markers with BCH codes in an image using ARToolKitPlus (

The parameter marker_size sets the sizes of the markers in mm. If all markers have the same size, this should be as single value. If there are different sizes, this parameter should be a matrix where each line consists of three elements. The first two elements descibe a range if id:s and the third element describes the size for that range of id:s. For example, a line like "0 10 25" would indicate that markers with id:s 0-10 have the size 25 mm.

By default, the list of markers are sorted so that the most central marker appears first in the ouput. This can be changed by the sort parameter.

The positions of all ununsed elements in the output table are set to -1.

When the parameter threshold is set to "auto", the same input can give different results depending on to what value the threshold has been adjusted. When use_history is on, the tracker uses the positions of the markers in the previous frame to search in the current frame. The result is more stable but less accurate.

When camera calibration is used, the edges in the MARKERS output are corrected for distorsion and no longer correpond to image coordinates.

The image above shows the type of markers detected by the module.

Example XML definition

A simple example

      class = "MarkerTracker"
      name = "MarkerTracker"

Example with different marker sizes

      class = "MarkerTracker"
      name = "MarkerTracker"
      marker_size = "0 999 45; 1000 1999 90; 2000 2999 24"


classThe class name for the module; must be "MarkerTracker".string
nameThe name of this instance of the module.string
max_markersMaximum number of markers to detectint10
marker_sizeThe size of the markers in mm; or id ranges and sizesfloat45
sortSort the markers in the output according to their distance from the center of the imageboolyes
use_historyUse history to track the markers over timeboolno
thresholdThe initial threshold (Number between 0.0-1.0 or auto)floatauto
calibrationCamera calibration. See ARTookKit documentation for an explanation of these parameters. These values must be valid for the camera used to produce correct results.array640 426 294.458 161.609 675.381 681.446 -0.160115 -0.067107 0.016423 -0.001641 0 0 10
coordinate_systemThe coordinate system of the marker output. The relationship between artoolkit coordinates and ikaros coordinates are z = x', -x = y', -y = z'. See Artoolkit documentation choices:
frame_idThe ID of the reference franme for the tracker, typically the ID of the camera coordinate systemint0

Module Connections


INPUTThe image input


MARKERSOutput table where each row descibes a detected marker: transformation matrix (16 columns), id (1 column), confidence (1 columns), camera position (2 columns), edges (8 columns)
MARKER_COUNTThe number of found markers
PROJECTIONThe camera projection matrix used by ARToolKitPlus (ARToolKitPlus::Tracker::getProjectionMatrix)
MODEL_VIEWThe model view matrix used by ARToolKitPlus (ARToolKitPlus::Tracker::getModelViewMatrix)
MATRIXThe transformation matrix for each detected marker (h_matrix)
OBJECT_IDThe ID of each detected marker
FRAME_IDThe ID of the camera coordinate system. A constant set by the frame_id parameter
CONFIDENCEConfidence of marker matching (0-1)
IMAGE_POSITIONPosition of marker in image (x, y)
EDGESMarker edges in image (x0, y0,...x3, y3)


The edges should be projected back into the input image to allow the markers to be drawn at the correct location in the image.


Christian Balkenius
Lund University Cognitive Science


libARToolKitPlus (from

blog comments powered by Disqus