Image Read 2

Erratica - Webcam

This is the continuation of the image processing test driven this time by the webcam. The next step will be to make each of the cells being placed on the image be more than just an ellipse and have them be driven by the brightness of the pixels.

Erratica - Webcam

Erratica - Webcam

Changing the radius based on brightness

import processing.video.*;

float r = 5;
int xPix, yPix;

Capture video;

void setup (){
size (640,480, P2D);
smooth ();
noStroke ();
video = new Capture (this,width,height);
}

void draw (){
if (video.available()){
video.read();
video.loadPixels();
}

for (int x = 0; x < width; x+=10){
for (int y = 0; y < height; y += 10){

color c = video.get (x,y);
float b = brightness (c);
//r = b/8;

fill (c, 14);
ellipse (x,y,10,10);
// ellipse (x,y,r,r);

}
}

}

Tags: ,

Comments are closed.