BTW, I'm new to this, and new to java for that matter, so I don't get this PGraphics stuff. From what I could find I understand it's better engine then the normal loadpixels / pixels because it deals with a buffer, or something like that, but I'm lacking in syntax.
So, could you post a little more code (or all of it ?

) because I don't understand where should I get color[]b from. I tried initialising it to a white image, but that just turned the screen green, allthough color[]a is the camera image.
And I think there should be a color[]b =color[]a at the end somewhere, but that's another thing.
And I'd really like to see this thing, because I built my own camera difference thingie and it's a little slow, so if I'm gaining performance, I want in
Code:
import processing.video.*;
Capture cam;
PImage img;
color c;
int camW = 320;
int camH = 240;
void setup(){
size(camW,camH);
fill(255,0,0);
String s = Capture.list()[0];
cam = new Capture(this, s, camW,camH);
img = new PImage(width,height);
for (int i=0;i<width*height; i++){
img.pixels[i] = color(0,0,0);
}
}
void draw(){
image(renderDifference(cam.pixels,img.pixels,10),0,0);
}
That's it, and the other file is your renderDifference function