motion tracking:

How much is that doggy in the window?

That doggy’s not for sale. Her name is Sniff. One of the better reactive video installations I’ve seen in a long time. A projected 3D dog reacts to passersby. The – simple, playful and engaging.

The level of engagement and the formation of an emotional is really what interests me here. Often reactive video is sluggish, too abstract or has some kind of learning curve. Using a familiar paradigm – approaching a strange dog is an apprehensive experience for both you and the dog, creates an emotive virtual experience. And everyone loves puppies.

Sniff was created by Karolina Sobecka and Jim George using a combination of Open Frameworks and the Unity 3D game engine; using an infra-red camera for motion tracking. Here’s how the tracking works:

Sniff system from karolina sobecka on Vimeo.

White Void

White Void have done some cool stuff over the years. I remember noticing them when they brought out their Midi Gun, alternative midi controller.

Here’s some of their projects:

Tone ladder – A ladder equipped with sensors becomes a musical instrument:

Polygon playground – a large scale interactive lounge object featuring a software aided 3D surface projection system covering the object with a seamless 360 degree projection mapping, with motion and proximity sensing:

http://www.polygon-playground.com/

Motion Tracking 80s stylee

1980s disco gem Mai Tai – “History” with top notch motion tracking effects.

Processing Blinds

processing blinds

Another oldish sketch I dug up. The idea was to project it onto a store window, and then a passerby would need to pull open the blinds to see in the store.

It used to be quite processor heavy, so reworked the motion detection code to try and speed it up. By pre-calculating the grid positions on the screen I managed to achieve a significant speed increase.

UPDATE: Just noticed some other places where code can be speeded up. Will update the code when I get time.

View the sketch here.

Here’s the motion detection part of the code:


import processing.video.*;
Capture myCapture;
color newPixel;
color[] prevFrame;
float speed = 10;
float sensitivity = 0.64;
float targetX, targetY, myX, myY, avX, avY;
int cxLoc, cyLoc;
int counter=0;
int totalBlocks=0;
int[] cX= new int[5000];
int[] cY= new int[5000];
// precalculating the grib
void precalc(){
for(int y = 0; y < 30-1; y++){
for(int x = 0; x < 40-1; x++){
cX[counter] = x*(width/40);
cY[counter] = y*(height/30);
counter++ ;
}
}
totalBlocks=counter;
}
void initVid () {
String s = "IIDC FireWire Video";
myCapture = new Capture ( this, width, height, 4);
prevFrame = new color[width*height];
}
void captureEvent ( Capture myCapture ) {
myCapture.read();
}
void motion () {
avX = 0;
avY = 0;
counter = 0;
for(int i = 0; i < totalBlocks; i++){
if(motionTest(i,width/40,height/30)==true){
avX += cX[i];
avY += cY[i];
counter ++;
}
}
if (avY<=0) avY=myY;
if (avX<=0) avX=targetX;
if (avY>0 && avX>0 && counter>0){
targetX=width-avX/counter;
targetY=avY/counter;
}
myY += (targetY-myY)/speed;
myX += (targetX-myX)/speed;
}
boolean motionTest(int j,int tw, int th){
int dc=0; // counter to track number of differences
//print(j);
// ave. out a square
for(int y=0;y for(int x=0;x // int srcPos=((srcY+y)*width)+(srcX+x);
int srcPos=((cY[j]+y)*width)+(cX[j]+x);
// int srcPos=cY[j]*(width)+cX[j];
newPixel = myCapture.pixels[srcPos];
if(abs(red(newPixel)-red(prevFrame[srcPos]))>25) dc++;
prevFrame[srcPos]=newPixel; // update prevFrame w/ current pixel clr
}
}
if(dc>(sensitivity*(tw*th))){ return true; } else{ return false; }
}