May 18, 2010

AR Finger Tracking

Filed under: Uncategorized — squirreltech @ 8:58 pm

Well, i’m back again. I am using the processing platform to play with this stuff, because it is so easy to make graphic applications and in very few lines, you can get something up and running.

So, I was very happy to find the SimpleARToolkit. This is a wrapper for the jARToolkit which it self it a wrapper for the ARToolkit. jARToolkit doesn’t seem to be in active development any more, which I think is a bummer because I really don’t want to go back to C/C++ to do coding. I like Java 😦 Sigh….

Anyway, I did have some good results with an AR marker. This is simply a black and white image that is not symmetrical left to right or top to bottom. The code knows the image as some kind of “patt” file, which is probably just short for pattern. This is really nice because the image can be generated and chances of it appearing in the background are very slim. Additionally, the application can assign “up”, which means I can turn my finger relative to the camera and the code recognizes this.

Check out the video below. Then the code afterward.


import JMyron.*;
import processing.opengl.*;
import pARToolKit.SimpleARToolKit.*;

JMyron m;
PImage img;
SimpleARToolKit hiro;
SimpleARToolKit ren;
int capWidth, capHeight;

void setup() {

  capWidth = 320;
  capHeight = 240;
  size(capWidth, capHeight, OPENGL);
  m = new JMyron();
  m.start(capWidth, capHeight);
  img = createImage(capWidth, capHeight, ARGB);
  hiro = new SimpleARToolKit(this, capWidth, capHeight);
  hiro.loadPattern("patt.kanji", 80, 0.0f, 0.0f);

  stroke( 0, 255, 0 );

void draw() {
  if (hiro.findMatch(img,100)) {

void showBox(SimpleARToolKit _a) {
//  noFill();

  line( 25, 0, 25, 50);
  line( 25, 50, 0, 25 );
  line( 25, 50, 50, 25 );
//  box(50);


May 6, 2010

Color tracking

Filed under: Uncategorized — squirreltech @ 9:03 pm

Well… I did get that code from my previous post working on my machine (Dell E6400 running win 7). I can click to change what color should be tracked. This has no filters, it just looks for the designated color (indicated by the circle in the upper left corner) and puts a new circle there.

Obviously, not realistic for mouse replacement, especially if I happen to be wearing a blueish shirt! I think we’ll have to keep looking.

April 29, 2010

Finger Tracking Options

Filed under: Uncategorized — squirreltech @ 10:13 pm

I did some looking on youtube of course, and found some pretty crazy stuff. That last one is my favorite, and ultimately something I would like to get to. I set an email to the poster guy but he’s a bum and didn’t email me back 😦

I discovered three plausible (for me) ways in which to do finger tracking.

  1. Tracking a color on my finger
  2. Tracking an AR marker
  3. HAAR like feature tracking.

HAAR sounded too much like I would need to learn a lot about computer vision to make it “learn” what a finger looks like. On the other hand, this doesn’t require any physical objects except my fingers, and I am suspecting would be more robust.

I don’t own a printer so tracking an AR marker would require heading to Kinko’s or more likely Emily’s to steal some paper and maybe a kiss. 🙂

So, color tracking seemed like the best idea… At least for now. It seemed that processing was a good platform to get the concepts worked out. I’ve never really worked with stuff like the camera before, and I had no idea how to manipulate an image to capture one color spot, but that is what the internet is for, no?

Eventually, I found this post in the processing forums and decided I had a winner.

April 28, 2010

Random stumble from B.

Filed under: Uncategorized — squirreltech @ 12:29 am

B. sent me this link. I think it has a lot of the same patterns as my CounterClock. Even still, it is just cool 🙂

April 26, 2010

Finger Tracking

Filed under: Uncategorized — squirreltech @ 2:12 pm

Well…. a while back I came across Johnny Lee’s wiimote finger tracking, here. So I bought a wiimote and sat down to get to work. After some searching, I found the proper reflective tape (infrared doesn’t just bounce off any ol’ reflector tape. I think I ended up finding it at an army supply store!)

The next step was to build an infrared LED array that would serve as a “light” source. In attempting to build this array, I truly appreciated the freedom of working in abstract worlds such as computer programming. For example, when I need a new variable I can just type it out and give it a type and a name and use it. The concrete world of electronics does not have such a luxury. If I want a new LED, I have to get in my car drive out to the electronics shop and purchase one. I can’t even freakin download it! Sheesh, how do these EE people get any thing done?

Well, then I had to move and fly off to strange places and all the little pieces and thoughts got packed into a(n abstract) tool box until I could get back to it…..

Until…. I got a new work laptop that came with a built in web cam. When I first heard about it, I wasn’t thrilled- “What the heck am I going to do to a web cam?” But then the wiimote finger tracking idea hit me. What if I could use the web cam to track my finger….. oooooooo. So, the next few posts will be about my research along those lines…

April 23, 2010


Filed under: Uncategorized — squirreltech @ 5:22 pm

Well, it wouldn’t be right if I didn’t start with this one. I was cruising around the internets one day, and I found an awesome flash called pelotas.swf, here for example. It looks only slightly interesting… until you wait for a few moments when everything lines up. Really really crazy stuff.

Sooo, I did some thinking and was able to figure out the algorithm used (some guessing and some pi and such) and came up with CounterClock. I added a few more spirals (variable number actually) and a whole page full of other parameters. Hit the ‘h’ key to see!

Some screen shots:

Hello Tech World!

Filed under: Uncategorized — squirreltech @ 4:05 pm

Well well. I am starting this blog because I tend to play with cool stuff that I think people might enjoy. So I’ll post things here.

Create a free website or blog at WordPress.com.