This example presents the fastest way to load a background image into Processing. To load an image as the background, it must be the same width and height as the program.
PImage bg;
int a;
void setup()
{
size(200,200);
frameRate(30);
// The background image must be the same size as the parameters
// into the size() method. In this program, the size of "milan_rubbish.jpg"
// is 200 x 200 pixels.
bg = loadImage("milan_rubbish.jpg");
}
void draw()
{
background(bg);
a = (a + 1)%(width+32);
stroke(226, 204, 0);
line(0, a, width, a-26);
line(0, a-6, width, a-32)}
Very trendy!!
All I need to do now in connect this style to my installation. I want to capture the essence of the Jumpman range, but make my own fictional range called Jumpman "Magic". I will design my own Jumpman "Magic" trainer from the existing designs to use within my advertisement. I will then combine my design with the particle idea in processing.
I will then have a last look at Monster Media to see exactly what makes their advertisements so successful (i.e layout, use of images and fonts, etc).
I will then combine all of this elements to create a hopefully successful shopfront interactive advertisement installation!
After much experimentation with movies and frame differencing and blob detection, I was starting to tear my hair out. I just couldn't work out how to place the codes together to make my idea work. I wanted to detect motion or change of light which then activated a video clip: Sounds easy!
I then thought I would start from the beginning and recap again about what Seb had taught us in class about particles. Why not keep my idea simple?
So after further idea generations and several thought processes, I decided to go back to basics with the code and make my installation more exciting, by thinking more about the style and layout of it rather trying to use complicated code.
I want to experiment further with the D_Particles code and when using my background (51); trick it will black out my ugly mug and leave us with pretty particles reacting to my movement:
For a little while I concentrated on the Movie example in OpenCv:
Name
movie()
Examples
import hypermedia.video.*;
OpenCV opencv;
void setup() {
size( 640, 480 );
opencv = new OpenCV( this );
opencv.movie( "bunny.avi", width, height ); // load movie file
}
void draw() {
opencv.read(); // read a new frame
image( opencv.image(), 0, 0 ); // and display image
}
void mousePressed() {
float time = mouseX/float(width);
opencv.jump( time ); // jump to a specified frame
}
This was interesting to me especially after seeing some of the installations from the monster media website, such as the following:
A lot of them follow the idea of detecting motion, which then activates a video clip or animation to play. I though this could be very exciting.
A busily researched online, and especially on Processing fourms, as to an idea of how to achieve this. I only wanted my installation to play a simply movie, created in After effects, when movement was detected.
I looked into practical ideas such as when movement was detected in a certain coordinate of the stage, it would activate the movie clip.I also looked into when movement was detected in terms of changes of light it would do the same thing. Could I find any help? NOOOOOOOOOOOOOO!!!
I tried to place parts of code from various sources together to achieve the effect I wanted.
I firstly started by placing the code from the Movie example and the Blob detection.
To help me decide what technique I wanted to use to create my interactive advertisement, I decided to go through Many of the openCv and JMyron examples within the processing programme.
I believed that If I tried all the techniques and had a play with each to see what effects could be changed and what was possible, It would help me decide o a route to take for my final piece.
Jumbo Shrimp
After all my initial research and experiments that I have already talked about on this blog, I decided to have a look at the openCv example: "Jumbo_Shrimp" (What a name!)
The effect looks like this (Please excuse the crummy quality!):
I am not that expressed by this effect. I know my webcam is shockingly bad, but it still isn't very exciting. The one thing i do like about the effect is the bold use of colour, which is exactly what I am looking forward to coincide with the Nike Jumpman theme. The bold use of red and black sure make the effect stand out, but I am not sure it is right for the effect I want to achieve.
After much deliberation and idea generation, I am getting there. I am in the progress on working on my final idea.
Simply but wicked!
Through the next few posts, I will take you through the highs (and the lows) of my progress over the last week or so and the forthcoming future!
Enjoy!!! (Some if it might be quite entertaining!