September 2010
S M T W T F S
« Apr    
 1234
567891011
12131415161718
19202122232425
2627282930  

Gesture Recognition in Processing 1

Here is an example of using a gesture recognition library in Processing. The Gesture and Activity Recognition Toolkit (GART) is from http://wiki.cc.gatech.edu/ccg/projects/gt2k/gt2k.

It makes use of a Hidden Markov Model toolkit (HTK). Both training and recognition are supported.

In the above example, when you write with your mouse on the canvas, it matches the corresponding digit [...]

Radiohead’s New Music Video

Now, everyone is talking about the new Radiohead music video. I join this posting game by a piece of information from memo.tv. You can even download the Processing code and the frame data (data folder in Processing) to try out the sketch in Processing. It can be slow but have fun.

House of Cards Processing test [...]

Phidgets – IO Interface Kit

I bought this simple Phidget 8/8/8 interface kit with 8 digital inputs, 8 digital outputs and 8 analog inputs. For projects that require only simple input and output control, it is a handy choice to replace the soon obsolete EZIO board. It has a USB interface and API for most major programming languages, like C/C++, [...]

Magnetic Sensor with Arduino

With reference to a post from Paja blog, I connect a Melexis 90217 to Arduino which can respond to a nearby magnet. It can function as a magnetic field sensor or a steel metal sensor for counting rotation speed as indicated in the reference post.

The software code adapts the ReadingRPM source from the Arduino playground. [...]

Windows Commands in Processing

When I am preparing for the operation procedure for the exhibition, I find Processing can use the Java Runtime class to issue DOS commands. I use it for the Shutdown procedure to power off the computer by pressing the ESC key. The code segment is,

try {
Runtime.getRuntime().exec(”shutdown /s /t 10″);
} catch (Exception e) [...]

Solid state relay with Arduino

Another example: the Arduino board receives a character sent from a host Processing program, 0 to switch off a relay and 1 to switch it on through a digitalWrite() command. The relay is a solid state relay to drive AC through a table lamp as shown in the video.

Processing code

import processing.serial.*;

Serial port;
boolean on;

void setup() {
[...]

Comparison of image processing tools – 4

The next test is to access each pixel in a bitmap and implement a very simple inverse filter. The image has three channels, red, green and blue and each has a resolution of 8 bits.

Test 1
Flash 8

import flash.display.BitmapData;
var bm:BitmapData = new BitmapData(Stage.width,
Stage.height, false, 0xFF000000);
var mc1:MovieClip = this.createEmptyMovieClip(”mc1″,
this.getNextHighestDepth());
var mc2:MovieClip = [...]