Monday, August 31, 2009

First run of Processing, project "Cube-cam"


Processing is a programming framework/language for whom like to program images, videos and human interactions. Many artists used the Processing to make their interactive arts. It is designed to be easy to use and powerful.

The best way to learn programming is by writing programs. I started the project "cube-cam". It captures images from the web camera and converts each pixel to a rotating cube. The cube is in a 3D space which rotating itself.

Some highlights of my program:

1) Capture is done by using Opencv library, you can do it with the Processing bundled video library. I prefer to use opencv because it can do more image processing stuffs. To install opencv for Processing, please check out the opencv port link.

2) Grabbing image pixels and process one by one.

3) Construct 3D cubes.

4) Used Moviemaker library to record the demonstration video, it is very handy to show your works to your friend.


import processing.opengl.*;
import hypermedia.video.*; // Imports the OpenCV library
import processing.video.*;
MovieMaker mm; // Declare MovieMaker object
float a;

OpenCV opencv;

PImage myimage;
boolean gray=false;


void setup() {
size(800, 600, P3D);

lights();

opencv = new OpenCV( this );

opencv.capture( 80, 60 );
frameRate(30);
mm = new MovieMaker(this, width, height, "demo.mov",
30, MovieMaker.ANIMATION, MovieMaker.LOW);

}

void draw() {

opencv.read();

background(0);

a+=0.5;
if(a > TWO_PI) {
a = 0.0;
}

if (gray)
opencv.convert(OpenCV.GRAY); // Converts to greyscale

myimage = opencv.image();
myimage.loadPixels();
for (int j = 0; j < 60; j++) {
for (int i = 0; i < 80; i++) { // For each pixel in the video frame...
color c = myimage.pixels[i+j*80];


pushMatrix();
translate(i*10,j*10);
fill(c);
rotateX(a);
rotateY(a);
box(5);
popMatrix();

}
}
mm.addFrame(); // Add window's pixels to movie
}

void mouseClicked() {
gray =!gray;
}

void keyPressed() {
if (key == ' ') {
mm.finish(); // Finish the movie if space bar is pressed!
}
}

Saturday, August 29, 2009

LEGO Mindstroms Sudoku Solver.


A robot made with LEGO Mindstroms can scan the text on a sudoku game sheet and control a pen to write the answer back. It is really amazing. It involves many complicated tasks, like motor control, image processing and character recognition.

Demonstration video:


Project website:
http://tiltedtwister.com/sudokusolver.html

Tuesday, August 25, 2009

Cheap wireless communcation with Infrared.

JSR,self-taught artist, made a cheap wireless communication circuit for his music project using adruino, he made a simple circuit to convert the normal UART port to infrared signals. A wireless serial port is born! The circuit and codes are simple, please check out jacob's website here.


For the transmitter, looks like:

Very simple and clean!

Video demonstration:

Friday, August 21, 2009

Trackballer interfacing.



Sparkfun got another cool stuff here, the trackballer which is used in smartphone like Blackberry and also HTC Magic android phone. Trackballer contains 4 LED inside (red, blue, green and white), which used to indicate the phone status like miss call, sms etc. The hall effect sensors inside the trackballer help to detect 360 degree movement. For detail schematic, and datasheet, please find it in sparkfun store:here.

If you wonder how cool is it, please play the demonstration video below:

Pete Lewis shows off the TrackBaller from Sparkfun on Vimeo.

Wednesday, August 19, 2009

FUWA (Fudan Intelligent Robot)



We are familiar with Japanese-made robot. Today, we would like to introduce a robot developed in Fudan University of Shanghai, China. It is designed to be a service robot, which can help you on some stuffs like pouring water, opening doors etc. It would be very useful to help the elderly and disabled.

Friday, August 7, 2009

World Record: "The longest distance covered by a battery-operated remote-controlled model car“



Panasonic, one of the battery maker in Japan, have a marketing campaign to show off their long battery life. The battery "EVLOTA" is used to power up a robot rider, which rides on a car track for 24hrs non-stop! Finally it runs about 23.726km, and sets a world record!

Photos:




Official Site:
Evolta: World record

Monday, August 3, 2009

Cute Beatbots, dance with heart.


A funny and cute robot (KeepOn) developed by Hideki Kozima and Marek Michalowski, it has 2 cameras and one microphone to capture sounds and also movements. It is pretty cool. Check out the video below: