a tale of a whale…fish

Posted in computational cameras | 3 Comments »


Catch of the Day from Winslow Porter on Vimeo.

Working with Matt, Winslow, and Meredith, we came up with the idea of using color tracking to help us show off how big of a fish we caught from our “fishing expedition”.  Using the code to put a bounding box around an area as a starting point, we substituted the bounding box with various images of fish and than used the distance between our hands to determine the size of our fish (and one killer whale).  Look! I caught a fish THIS big!

some major brainstorming session goin’ on here…

and on to our light-setup with our painted green squares.

Some problems we encountered were:

(1) getting our fish to size up or down proportionally;

(2) having our camera correctly track our color (this was solved partially through a more adequate lighting setup and using a brighter, more unusual color);

(3 the reflection off the green color we used;

(4) having our fish be correctly located within our hands.

and last but not least, our code.

import processing.video.*;

Capture video;

PImage fish;
int fish_Width;
int fish_Height;

float targetRed = 0.0; //set some numbers for the target you are chasing
float targetGreen = 0.0;
float targetBlue = 200.0;
int similarityThreshold = 60;

// recording movie: objects and variables
MovieMaker mm;// used for capturing video
boolean winslow = false;
boolean recordingStarted = false;
String title = “CrazyAnimation”;
int s,m,h;

void setup(){
size(640, 480); //give you Processingwindow a size
//imageMode(CENTER);

video = new Capture(this, width, height, 30); //initiate the video, resolution and frame rate
fish = loadImage(”fish/fish_0.png”);

s = second();  // Values from 0 – 59
m = minute();  // Values from 0 – 59
h = hour();    // Values from 0 – 23

println(”Press ‘E’ to enable recording”);

}

void captureEvent(Capture camera)
{
camera.read();
}

void draw(){

Rectangle myRect = null;
for(int row=0; row<video.height; row++) { //for each row
for(int col=0; col<video.width; col++) { //for each column
//get the color of this pixels
//find pixel in linear array using formula: pos = row*rowWidth+column
color pix = video.pixels[row*video.width+col];
//find the difference
int diff = (int) dist(targetRed,targetGreen,targetBlue, red(pix), green(pix), blue(pix));
if (diff < similarityThreshold){
if (myRect == null) myRect = new Rectangle(col,row,1,1); //if this is the first thing you found make a new rect
myRect.add(col,row);
}
}
}
image(video,0,0); //draw the video, this might be optional

fill(255,0,0);
if (myRect != null){
if(myRect.width <= 200)
{
fish = loadImage(”fish/fish_0.png”);
fish_Width = fish.width;
fish_Height = fish.height;

}

else if(myRect.width > 200 && myRect.width <= 300)
{
fish = loadImage(”fish/fish_1.png”);
fish_Width = fish.width;
fish_Height = fish.height;

}

else if(myRect.width > 300 && myRect.width <= 400 )
{
fish = loadImage(”fish/fish_2.png”);
fish_Width = fish.width;
fish_Height = fish.height;

}

else if(myRect.width > 400 && myRect.width <= 500)
{
fish = loadImage(”fish/fish_3.png”);
fish_Width = fish.width;
fish_Height = fish.height;

}

else if(myRect.width > 500)
{
fish = loadImage(”fish/fish_4.png”);
fish_Width = fish.width;
fish_Height = fish.height;
}

fish.resize(myRect.width,((fish_Height * myRect.width)/fish_Width));

image(fish, myRect.x, myRect.y – (fish.height/2));
// rect(myRect.x, myRect.x, myRect.width, myRect.height);
}
if(winslow == true){
mm.addFrame();

}

}

void mousePressed(){
//allow the target color to be changed
color pix = video.pixels[mouseY*video.width+mouseX];
targetRed = red(pix); //get the color of the pixel they clicked on
targetGreen = green(pix);
targetBlue = blue(pix);

}

void keyPressed(){
if (key == ’s’) {// start or stop the record head when the ’s’ is pressed
if( recordingStarted == true ){
if( winslow == true ){
winslow = false;
println( “Cut” );
}
else if( winslow == false ){
winslow = true;
println( “Rolling” );
}
}
else{
println( “Press ‘E’ to enable recording” );
}
}
if ( key == ‘e’ ) {// create new movie for saving
if( recordingStarted == false ){
recordingStarted = true;
// set specific compression and frame rate options, file will be saved in a folder called “movies”
mm = new MovieMaker( this, width, height, “movies/”+title+”_”+h+m+s+”.mov”, 15, MovieMaker.ANIMATION, MovieMaker.HIGH );
println();
println( “Press ‘S’ to start and stop the record head” );
println( “Press ‘X’ to save the movie and exit the sketch” );
}
}
if (key == ‘x’) {// Finish the movie if the ‘x’ is pressed
if(recordingStarted == true){
mm.finish();
if(winslow == true){
println(”Cut”);
}
println(”Print!”);
}
// Quit running the sketch once the file is written
println();
println(”close”);
exit();
}
if (keyCode == 38){
similarityThreshold++;

println(”New Threshold: ” + similarityThreshold);
}
else   if (keyCode == 40){
similarityThreshold–;

println(”New Threshold: ” + similarityThreshold);
}
}

February 23rd, 2009

blurred reality

Posted in computational cameras | No Comments »

So using Eclipse in Processing for the first time is a bit of a confusing experience.  First I had to import all the java files in Processing into Eclipse so that they can communicate.  After doing the initial setup in Eclipse however, the code hints in Eclipse are great and I can see how this would save me some heartache in the future.

I did some initial pixel manipulations in Eclipse…using some code examples form the Processing book as well as from the class site.

Thinking of some reasons in the REAL world of why you would want to do this, there are a few that come to mind.

(1) CENSORSHIP: there are some things that big brother just doesn’t want you to recognize. that includes bleep words and bleep images.  What you can’t see doesn’t exist. right?

(2) CHRISTMAS CARDS: sometimes something with a red and green tint just seems so much more holiday-esque

(3) PARTY PROJECTIONS: pixel manipulations blown up big are cool backgrounds.

(4) SCREENSAVERS: self-explanatory

February 8th, 2009

minimum constraint design lego-style

Posted in mechanisms | No Comments »

constructing a machine using legos, we demonstrated the beauty of minimum constraint design. 


lego machine 1 from Angela Chen on Vimeo.

lego machine 2 from Angela Chen on Vimeo.

and just in time, this new post from the nytimes from illustrator Christopher Niemann.

February 5th, 2009

the breakfast club

Posted in mechanisms | No Comments »

A Rube Goldberg type machine that cracks an egg in five steps (energy transfers).  Created with team members Adi Marom and Adam Lassy.

Breakfast Machine from Angela Chen on Vimeo.

February 4th, 2009

the wishlist

Posted in computational cameras, wishlist | No Comments »

Working with Adam Havey, we came up with the idea of using your cellphone’s camera to contribute to your universal wishlist: a dynamic list that would be continually updated with photos of items that you see while you are out.  Some possible iterations of the wishlist could be:

(a) shopping wishlist

(b) wedding registry

(c) grocery shopping

(d) birthday/anniversary lists

Using Wordpress’ Postie plugin, one can email photos taken with your camera as a post to your Wordpress blog.  In refining your wishlist, one could even further narrow and categorize your photos by arranging it by color, location, date added, etc.

February 1st, 2009

Posted in extra, photography | No Comments »

merry christmas everyone!christmas_tree

December 25th, 2008

origamisms

Posted in extra | No Comments »

still somewhat recovering from the ITP winter show. the repercussions of which are still being felt, both good and bad. lets see…

sick. check.
wallet and coat stolen at afterparty. check.
blogged about in make magazine. double check.
deemed origami master? oh yea baby, despite what this may mean for my digital life.

3origami_polaroid

if you never made it to the show. u can check out some links to various press about the show here.
it was a great, inspiring process. but i sure am glad that i have another semester between me and the next one.

in the aftermath, friends and family have been asking me what i will be doing with the knowledge that i have learned at school and whether or not i will continue to make jewelry.  my answer is folks, i have no idea.  i do know at the very least, that everyday i will wake up, and i will choose to think and create things that will be inspiring, perhaps beautiful, perhaps impractical, but always with heart.  and my gratitude goes out to all those in my life who give me the freedom to make that choice easy.

snc12609

December 23rd, 2008

constructive deconstruction

Posted in communications lab | No Comments »

This was a piece that I worked on with Jelani that draws upon the same themes that were used for my ICM project. Animated using After Effects.

December 12th, 2008

final meditations

Posted in physical computing | No Comments »

PURPOSE:

Window Vision is a reactive sculpture that serves to highlight the changes in the outside environment by gradually shifting between two components depending on varying levels of light and dark.

OBSERVATIONS:

To have called my apt in Manhattan small would have been an exaggeration.  From my tiny room, you could hardly tell that I was living in the midst of a huge bustling metropolis and to that respect, it made me appreciate the architectural form of the window to an even greater extent.  The one window in my room faced a mere brick wall and the light that came in was so meager that I could hardly tell whether it was two in the morning or two in the afternoon.

Therefore I wanted to create something that would be a reminder of the changing levels of day to night and using the window as the fulcrum through which to implement these ideas.

It is a commentary on our perception of the outside environment.  On the one hand, Window Vision emphasizes the architectural nature of the human need to have an interaction with the outside world and the other is neurological. The piece reflects the way that our vision physically sees the world namely through the cellular structures “cones and rods” that reside in our retina.  Cones generally allow us to see objects and color during the daytime, and rods take over during moments of darkness.  In order to express this dichotomy of vision in terms of light and dark, I created two interfaces: solid for day and transparent for night to reflect the way that our own eyes are constantly shifting to adjust for varying light levels.

INSPIRATION:

The idea of a blind affected by light was very much inspired by Rachel Wingfield from RCA, and her research group Loop.Ph for the reactive blind Digital Dawn, which was conceptually based on the idea of photosynthesis.  Digital Dawn explores how changing light levels within a space can have a profound and physiological impact on our sense of well being.

PROCESS:

Using my sculpture piece to react to varying levels of light using a photocell was fairly easy but achieving the right mechanics ended up being the real challenge. The piece is mechanized through a series of pulleys and a stepper motor that would create enough torque to lift up the first structure similar to a window blind. I ended running out of time to test everything once it was constructed.  The construction alone definitely took the better part of a week to put it all together.  Thanks to some friends for helping me fold my pieces! In retrospect, I might have compromised a bit on the piece itself and the construction in order to better test the mechanics.

having to experiment with different types of “rails” in the form of regular wire, invisible wire, string and finally the winning combination of fishing line to get the structure strung up correctly and properly working.

inspiration ideas for the transparent structure: playing with things that look out of focus

in the end i used this halftone image of tree branches to give the impression of someone looking out their window.

from left to right: testing various motors, gears, and power supplies.

the stepper motor required a circuit using a dual h-bridge and two transistors wired in such a way that i could control the stepper motor using two wires instead of four.  tom igoe has a good tutorial for setting up stepper motors and programming Arduino to run the motor back and forth.

however i ended up running into one major issue: more power!  Seeing that my motor ran on a peak voltage of 24V, I was only giving it 5V through my Arduino at the time.  However once I added an external power supply using both the transformer wall plugs and the variable DC power supply, the motor would no longer run properly and either not turn on at all, stall or repeatedly beep.  I had several people take a look at the setup and circuit to no avail.  I ended up borrowing Adam Lassy’s stepper motor driver in order to guide the stepper motor through the steps in the correct sequence and from there I could add on a higher voltage and amperage.  Unfortunately, that still was not enough power to drive the motor to pull the pieces all the way up and stalled about a third of the way.

Keling stepper motor driver

problem solving


Window Vision Take 1 from Angela Chen on Vimeo.
FUTURE:

As the piece is selected to be shown in the Winter Show this year, I am aiming to improve the mechanics of the piece by adding a stronger, more powerful stepper motor and adding larger pulleys in order to add more torque.  Hopefully the combination of these two will provide the much needed boost in order to get Window Vision off of the ground!

December 12th, 2008

BUSY DAYS AND RESTLESS NIGHTS

Posted in communications lab | No Comments »

Edited in Final Cut Pro in collaboration with EJ, Asli, and JaYoung.  Our goal was to emphasize the feelings and raw emotions of an imsomniac for one night.

December 9th, 2008
« Previous Entries
Next Entries »
  •  
  • categories

    • art
    • communications lab
    • computational cameras
    • data visualization
    • extra
    • fabricating information
    • ICM
    • installation
    • mechanisms
    • Nature of Code
    • photography
    • physical computing
    • processing
    • reading
    • thesis
    • Uncategorized
    • video sculpture
    • wishlist
Brought to you by: Healthy Weight Loss | Option Trading | Real Estate