Thursday, January 26, 2006

HW Assignment Posting

Here are my ICM assignments for each week:

http://www.greg-b.com/itp/compmedia

Saturday, November 12, 2005

ICM Midterm - Human Constellation

Midterm - Human Constellation

Built using Processing (www.processing.org)

Me with my hands up.

Me sitting at my desk.


Try it yourself:

*Requires Camera Input

http://greg-b.com/itp/compmedia/week7/

The Code:

http://greg-b.com/itp/compmedia/week7/greg_assignment7.pde

By Manipulating Dan O'Sullivan's edge detection code, I was able to hook up a motion capture device (iSight Camera) and give birth to star clusters that outline the shape of your body.

The magic behind this code can be found in these 4 lines:

for(int row=1; row<video.height-1; row=row+1) {

for(int col=1; col<video.width-1; col=col+1) {

int right = video.pixels[(row)*video.width+col+1];

int left = video.pixels[(row)*video.width+col-1];

With this code above, Processing scans each individual pixel of your video input in rows (scanning right to left) and columns (going down and up) finding values for x and y, respectively. Knowing this we can now tell processing to do somethng with this information. In my case it was to display an image of a star onto where there is the most contrast between pixels.

The contrast threshold can be adjusted using the up/down arrow keys on your keyboard and its value is echoed in the Processing window.

Watch a video demo:

http://www.greg-b.com/itp/vid/constellation.wmv