Processing Magic

Processing is an open source programming language and environment for people who want to program images, animation, and interactions.

I recently discovered Processing
one day in my surfing adventures. I was ready to fall for any combination of art and programming, since I lack serious drawing skills!

Processing seems to provide the means of expressing both worlds. Also it offers very simple ways to interact with video and any capturing device. Capturing video in Linux is also possible and here is how I managed to get it working.

A sample teaser is based on the concept of Minority Report, otherwise touchless multitouch interface, an effort of local-guru.net . Installing and running Processing is really easy since it is Java based. However video and Linux still suffer due to limited support from manufacturers and proprietary codecs.

After gathering info, here is what I did to get video capturing running in my Ubuntu 8.10 64bits, using a Logitech QuickCam Communicate STX.

  1. Download and extract Processing :D
  2. RTFM for kick start.
  3. As local-guru suggests, capturing video on Linux is supported through a gsvideo cross platform library created by codeanticode. It is based on Java bindings for gstreamer. You can get the latest version here.
  4. Extract the gsvideo library in the library folder of your processing installation.
  5. Gstreamer comes with Ubuntu, but if you are missing it for some reason, get it from Synaptic.
  6. In 64bits system, there is a problem caused by the java libraries packed with Processing. To get over this problem, get help from this page in Spanish, also described in some comments in codeanticode's blog. What I did was to install openjdk-6-jdk from synaptic, remove the java folder from my Prossesing installation, and then link openJDK to processing (ln -s /usr/lib/jvm/java-6-openjdk java) in my processing folder.
  7. After that, just a simple tweak to local-gurus sample code. You can get the code here but the GSCapture constructor should be called as: video = new GSCapture(this,640,480,"v4l2src","/dev/video0",30);

And this is my sample video, woman trapped in one's hands!

One Response to “Processing Magic”

  1. sci::phiNo Gravatar says:

    ένα παράδειγμα (γκρίζα διαφήμιση) για processing:

    http://dl.getdropbox.com/u/412467/misha_intro.avi

    [Reply]

Leave a Reply