MarkerTracker
Module that finds markers with BCH codes in an image using ARToolKitPlus (https://launchpad.net/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
<module class = "MarkerTracker" name = "MarkerTracker" />
Example with different marker sizes
<module class = "MarkerTracker" name = "MarkerTracker" marker_size = "0 999 45; 1000 1999 90; 2000 2999 24" />
Parameters
Name | Description | Type | Default |
---|---|---|---|
class | The class name for the module; must be "MarkerTracker". | string | |
name | The name of this instance of the module. | string | |
max_markers | Maximum number of markers to detect | int | 10 |
marker_size | The size of the markers in mm; or id ranges and sizes | float | 45 |
sort | Sort the markers in the output according to their distance from the center of the image | bool | yes |
use_history | Use history to track the markers over time | bool | no |
threshold | The initial threshold (Number between 0.0-1.0 or auto) | float | auto |
calibration | Camera calibration. See ARTookKit documentation for an explanation of these parameters. These values must be valid for the camera used to produce correct results. | array | 640 426 294.458 161.609 675.381 681.446 -0.160115 -0.067107 0.016423 -0.001641 0 0 10 |
coordinate_system | The coordinate system of the marker output. The relationship between artoolkit coordinates and ikaros coordinates are z = x', -x = y', -y = z'. See Artoolkit documentation http://www.hitl.washington.edu/artoolkit/documentation/tutorialcamera.htm | choices: artoolkit ikaros | ikaros |
frame_id | The ID of the reference franme for the tracker, typically the ID of the camera coordinate system | int | 0 |
Module Connections
Inputs
Name | Description |
---|---|
INPUT | The image input |
Outputs
Name | Description |
---|---|
MARKERS | Output 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_COUNT | The number of found markers |
PROJECTION | The camera projection matrix used by ARToolKitPlus (ARToolKitPlus::Tracker::getProjectionMatrix) |
MODEL_VIEW | The model view matrix used by ARToolKitPlus (ARToolKitPlus::Tracker::getModelViewMatrix) |
MATRIX | The transformation matrix for each detected marker (h_matrix) |
OBJECT_ID | The ID of each detected marker |
FRAME_ID | The ID of the camera coordinate system. A constant set by the frame_id parameter |
CONFIDENCE | Confidence of marker matching (0-1) |
IMAGE_POSITION | Position of marker in image (x, y) |
EDGES | Marker edges in image (x0, y0,...x3, y3) |
Limitations
The edges should be projected back into the input image to allow the markers to be drawn at the correct location in the image.
Author
Christian Balkenius
christian.balkenius@lucs.lu.se
Lund University Cognitive Science
Files
MarkerTracker.h
MarkerTracker.cc
libARToolKitPlus (from https://launchpad.net/artoolkitplus)
MarkerTracker.ikc