News Download Projects Publications Community Documentation
home > documentation > artoolkit framework
Prev: Developing your First Application, Part 2
ARToolKit Framework

ARToolKit is a software ToolKit like GLUT. It furnishes predefined functions that you need to call in a specific order for developing an AR program . But you can also use different parts of the ToolKit seperately. ARToolKit supports multiple platforms, while attempting to minimise librairy dependencies without sacrificing efficiency. ARToolKit uses OpenGL for the rendering part, GLUT for the windows/event handler aspect and hardware-dependent video library and standard API on each platform (e.g. win32 in Windows).

The API is in C and a lot of samples provide good starting points for creating new applications (skeleton framework).

Figure 1 summarises the relationship between your Application, ARToolKit and dependent librairies.

Figure 1: ARToolKit Architecture.


This section provides a better description of the main elements of ARToolKit.

The ARToolKit library consists of four modules:

  • AR module: core module with marker tracking routines, calibration and parameter collection.
  • Video module: a collection of video routines for capturing the video input frames. This is a wrapper around the standard platform SDK video capture routines.
  • Gsub module: a collection of graphic routines based on the OpenGL and GLUT libraries.
  • Gsub_Lite module: replaces GSub with a more efficient collection of graphics routines, independent of any particular windowing toolkit.

The next figures show the hierarchical structure of ARToolKit and relation with dependencies libraries.

Figure 2a: Hierarchical structure of ARToolKit using Gsub Module

Figure 2b: Hierarchical structure of ARToolKit using Gsub_Lite Module
For further requirements we advise you to use gsub lite, as gsub is now deprecated.

The modules respect a global pipeline metaphor (video->tracking->display), so the user can easily replace any module with another (like gsub with Open Inventor renderer).

Figure 3: Main ARToolKit pipeline

Data Types

ARToolKit manipulates a lot of different kinds of variable. Internally, it uses global variables, that restrict re-entrant part of the code. Otherwise, standard multi-argument interface are used based on a data-flow approach.

ARToolKit uses different image formats between different modules. Figure 4 summarises all the different formats supported. Some formats are only available on certain platforms or with certain hardware.

Figure 4: ARToolKit data-flow.

Information about the detected markers is contained in the ARMarkerInfo structure defined in ar.h in the include directory.

Augmented Reality Functions

All ARToolKit functions generally begin with the prefix ar, and a specific prefix for each module (arVideo for video, arg for graphics, ar for main core). You will find more information in the API reference documentation.