Halloween is coming, it is time to prepare a halloween project. There is an urban myth that when you enter a castle or old house, the portrait painting on the wall would have one scary effect, the eyes are always following you! it tracks your movement. How about using a big LCD monitor and a web camera to make one "Following-Eye" portrait to scare people:)
I used Processing with Opencv to make this "Following-eye" portrait project, and the famous painting "Mona Lisa" is used for demonstration.
The demonstration goes here:
To make it more real, I suggest you can put the monitor in vertical orientation and run the project in full screen. Of course, if you can add a wooden frame on top of the monitor would be prefect! Send me a photo if you make one!
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.
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];