Touchlib compiling instructions (Ubuntu)

Hardware:
A linux compatible webcam (USB or a Firewire)

Software:
Ubuntu 7.04

Installation instructions:

  1. I’m asuming you have a clean installation of Ubuntu 7.04
  2. First install the dependencies:
    sudo apt-get install cmake libcv1 libcvaux1 libcv-dev libcvaux-dev libglut libglut-dev fftw-dev g++ libxmu-dev libglut3-dev subversion
    
  3. Now to install osc, checkout the latest version on the SVN:
    svn co https://www.smartelectronix.com:9000/repos/osc/oscpack/trunk/ [yourdirname]
    

    (or you could get the source oscpack_1_0_2.zip)

    make
    sudo make install
    

    If osc fails to compile and you’re using gcc 4.3, check out how to fix osc in my Fedora Core 9 instructions.

  4. Now compile touchlib:
    mkdir touchlib  
    cd touchlib 
    svn checkout http://touchlib.googlecode.com/svn/trunk/ .
    cmake .
    make
    
  5. Touchlib should now be ready to use.

More information:
Ubuntu topic on NUIgroup

Known bugs:
Due a problem with the OpenCV library in Linux, Touchlib might crash after a few minutes.

A fix for rev.393 is available here.
A mirror to the file: Touchlib race condition fix rev.393

(old)
A fix for rev.90 is available in here.
A mirror to the file: Touchlib race condition fix rev.90


9 responses

  1. I have compiled it but how do I start it? There are no executable files. Thanks in advance.

    Mathias – June 17th, 2008
  2. Sorry for earlier comment. Now I know you just compile touchlib.

    Mathias – June 17th, 2008
  3. I’d already compiled the touchlib and it works, but my table with IR LED is not working as well I wish, then I made one miniMT( http://ssandler.wordpress.com/MTmini/ ), and liked the result I got, but I don’t know how to make the touchlib work with the negative capture, like it does on the package for windows that they have at the site. Some ideas about it??? thanks santo

    santo de casa – June 17th, 2008
  4. Hello. i compiled it successfully and i built my pad. What must i do agter “make” to start to use it???

    RG – June 21st, 2008
  5. On the linux version, binaries are placed in different dirs. The demo applications are placed in /demos OSC -> /demos/osc pong -> /demos/pong smoke -> /demos/smoke touch example -> demos/touch The config application is placed in /src

    Laurence Muller July 3rd, 2008
  6. and how can i set the cam resolution ??? the settings will always start with the max res of 640x480 but i will use 320x260 .. thanx

    freeside – November 25th, 2008
  7. Hi freeside, you could try to download camstream for ubuntu (either use the repos. or download it from http://www.smcc.demon.nl/camstream/ ). Set your camera properties in camstream (exit and save), and start any touchlib application.

    Laurence Muller November 28th, 2008
  8. The package names are slightly different on Fedora, but everything worked out well in my case. I had never used cmake before, but that sure saved me a big headache :)

    Michael Riley May 17th, 2009
  9. Hey Micheal, you’re right about the package name differences. I also have a tutorial for Fedora: https://multigesture.net/articles/touchlib-compiling-instructions-fedora-core-9/ But I guess you already figured it out :).

    Laurence Muller June 4th, 2009