artoolkit-docs

Building ARToolKit from Source

If you have been supplied with pre-built ARToolKit binaries, you will not need to build ARToolKit from source. The instructions below apply only to users who wish to modify the internals of ARToolKit. Source code and project files are supplied for all of ARToolKit. This allows you to not only see how the toolkit works, but also to modify its operation should you so wish.

Required Software / Source Packages

External dependencies for building ARToolKit from source include all the dependencies for building your own ARToolKit-based applications (as listed on page Installing ARToolKit) but also additional dependencies required to build the utilities and libraries. Where ARToolKit libraries require external DLLs, these are generally supplied with ARToolKit. Exceptions are listed below.

A supported compiler/IDE

OpenGL

libjpeg

GLUT

Required to build libARgsub and the utilities and examples. Note: libARgsub_lite provides equivalent functionality to libARgsub without requiring GLUT.

OpenCV - Required to build calib_camera

Generally OpenCV headers and libraries are provided with ARToolKit.

Video capture libraries

OpenVRML (optional)

If you would like to work with 3D models which are represented in a Virtual Reality Modeling Language (VRML) file then you need to install the OpenVRML SDK in order for ARToolKit to be able to render them. All the source code related to VRML is located in the ARvrml.lib.

OpenSceneGraph (OSG)

In general you can find information about OpenSceneGraph (OSG) and what it does on their website. ARToolKit uses some of the features provided by OSG. All these features are available using the ARosg.lib. In general you need to install OSG on Mac and Windows when you like to build the complete ARToolKit project. On Linux you can choose in the ./Configure step if you would like to use OSG. ARToolKit requires version 2.6 or later, version 2.8.2 is recommended.

Compiling ARToolKit

Windows

Mac OS X

Linux

Post-Compilation Steps

Verifying the Compilation

ARToolKit includes a variety of examples demonstrating ARToolKit programming techniques. After compiling, the executables for these applications can be found in the bin directory inside your ARToolKit directory. Running the simpleLight example is one of the most straight-forward ways to test that your ARToolKit installation is functioning correctly. An explanation of simpleLight, including how to run it, and its source code can be found on the page ARToolKit Tutorial 1: First Simple ARToolKit Scene. More detailed information about the techniques demonstrated in each example can be found on the page ARToolKit Examples.

Windows:

simpleLite can be opened by double-clicking its icon in the ARToolKit4\bin directory. Alternately, you can run it from the command line:

Mac OS X:

Linux:

simpleLite can be launched from a terminal window thus: ./simpleLite

Setting up the ARTOOLKIT5_ROOT environment variable

Click here to see how to set an environment variable