Compiling ARToolkit on Ubuntu 10.04

Apparently I’ve given more thought on to ARToolkit these days  (mainly due to my research), so that it makes me  attempt different things with it. Consequently I’ll be writing a series of posts pertaining to my small experiments for future references. I know it’s pretty boring stuff, talking about a dull subject again and again… but it merely gives us a sensation when doing it physically (particularly when you have nothing left to do 😉 ). In general everybody feels great when their imaginations turn into a physical realization.


So… enough lecturing & let me keep aside my talking. In today’s post I’ll cover-up the installation of ARToolkit in Ubuntu 10.04. I successfully installed it several days back. It looks pretty straightforward, according to ARToolkit’s documentation ( . However there are a couple of conditions to be met before you compile ARToolkit in Linux. I’m not an expert in Linux and because of that it took me a fair amount of time to make the application work. But I think it’s not going to be an issue provided we follow the necessary steps (thanks to the Internet!).

First it requires GLUT (OpenGL Utility Toolkit) libraries to be installed. So I issued the following command and that’s it.

sudo apt-get install freeglut3-dev 

This installs the GLUT headers and libraries which in turn can be used when building OpenGL applications. After the installation, the headers could be found at /usr/include/GL.

Next, we should install the V4L2 driver, which is a generic device driver for USB web cams. So I plugged-in my web cam and then went through steps mentioned in here for V4L2 installation. After that I can ensure that my webcam has been integrated with Linux kernel by going to /dev and there you’ll find your webcam attributed as video0 or something. In my case it’s /dev/video0. Now I wanted to capture some video with my webcam. For this purpose I installed a software called Cheese (a totally irrelevant name though) with the following command.

sudo apt-get install cheese

I ran Cheese and Yes!! It worked like a charm. But that joy lasted until I compiled ARToolkit. So… compiling ARToolkit was done with the traditional ./Configure and make command sequence. After giving the command ./Configure ARToolkit provided five options for establishing the camera connection.

Select a video capture driver.

  1. Video4Linux
  2. Video4Linux+JPEG Decompression (EyeToy)
  3. Digital Video Camcoder through IEEE 1394 (DV Format)
  4. Digital Video Camera through IEEE 1394 (VGA NONCOMPRESSED Image Format)
  5. GStreamer Media Framework

I chose the first option which was obviously V4L2. But then I got the following error.

No video config string supplied, using defaults.

error: acquireing channel(0) info

After Googling a little bit I found that the option 5 has been recommended for camera connection which is the GStreamer Media Framework. The results claimed that option 1 didn’t seem to be working. However if we are to use GStreamer we must issue the following command before compiling ARToolkit.

export ARTOOLKIT_CONFIG=”v4l2src device=/dev/video0 ! video/x-raw-yuv,bpp=24,width=320,height=240 ! identity name=artoolkit ! fakesink”

What we are doing here is just creating an Environment Variable named ARTOOLKIT_CONFIG which in turn is used by ARToolkit to supply the camera configuration string. Later I found that we can give this camera configuration string inside our code as well. It’s really important to provide the correct width and height parameters since it might not work for any value. So it’s all about trial and error.

Having gone through this procedure I was successful in compiling and installing ARToolkit  in Ubuntu 10.04. Here with I provided a screen capture of the SimpleTest application which you can find under the example directory in your ARToolkit installation folder.


Thank you! and any comments are invited.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s