Wednesday, 9 December 2009

The Limits...


I have found the limits of how many feeds you can clearly see on my screen & the answer is...
20! I can get a 5x4 grid of feeds on my computer screen which are big enough to understand what is being seen. I just need to find 8 extra feeds now!

Monday, 7 December 2009

Button Test

A cheeky little vid to show the system working.

video

Everywhere

I've managed to combine 8 web feeds with my 3 webcams to get a grid of 11 showing different place around the world - from Adelaide to Copenhagen! Here's a screenshot:


The only problem with this is that the whole programme slows down, including my webcams, to around 1 frame every 3 seconds...

Around the world!

After speaking to some people on the Processing website, asking if I could stream live feeds from the internet, they said no - but only to movie files, not jpegs that refresh every couple of seconds on the web page. I just had to write a simple programme that tells processing to look for the exact picture - simple! It's not the smoothest thing in the world, but it works. The best feed I could find so far is from the Brooklyn Bridge that refreshes the picture every second. To view it just copy & paste this code into a processing application:

PImage a; // Declare variable "a" of type PImage

void setup() {
frameRate(1);
size(1024, 768);
}

void draw() {
// Displays the image at its actual size at point (0,0)
a = loadImage("http://brooklyn-bridge.mobotixcam.de/record/current.jpg?rand=380424");
image(a, 0, 0);


}

Peephole MKI





To test the view of the webcam feeds, I set up a rig to look through a standard peephole. You hold it up to the screen & look through: the initial tests were positive.
Although you can't see much, it actually gives you a really weird view, which looks really nice.

Inside the mouse...





To take the input (opening the peephole) away from the computer & avoid using arduino for now, I have bought an optical mouse to take apart & use the buttons.

Also

The mouse buttons can be used to control the webcam feeds too!

Making Noise

After talking to Jon about my progress, he thought that I should explore the receiving end of the system - the people who are being looked at & ways they could become aware of someone watching them. So to do this, I am playing around with sounds - when an individual peephole is activated, the corresponding webcam makes a sound.

Currently the sounds are limited to being played off my computer (each alert is controlled from a different mouse button) & the sounds are from Metal Gear Solid, but hopefully I'll be able to play them in separate speakers.

"Hears" the code:

import ddf.minim.*;

AudioPlayer leave;
AudioPlayer codeccall;
AudioPlayer alert;
Minim minim;

void setup()
{
size(200, 200);

minim = new Minim(this);

// load a file, give the AudioPlayer buffers that are 1024 samples long
// player = minim.loadFile("found.wav");

// load a file, give the AudioPlayer buffers that are 2048 samples long
alert = minim.loadFile("found.wav", 2048);
codeccall = minim.loadFile("codeccall.wav", 2048);
leave = minim.loadFile("leave.wav", 2048);
// play the file

}

void draw()
{
background(0);

if((mousePressed)&& (mouseButton == RIGHT)){
alert.play();
alert.rewind();
delay (1000);
}

if((mousePressed)&& (mouseButton == LEFT)){
codeccall.play();
codeccall.rewind();
delay (1000);
}

if((mousePressed)&& (mouseButton == CENTER)){
leave.play();
leave.rewind();
delay (1000);
}
}

Keyboard Fail

After waiting for around for four days for the keyboard adapter, it turns out my laptop doesn't recognise the hardware & essentially wont work! AAH! I thought this would make my life easier but quite the opposite. Grr!