hello there!
i'm trying to visualize motion with continuous lines using the jMyron library.
i only want the show the ongoing motion as a continous line in front of a solid background, not the picture the webcam actually puts out. since the picture is being updated through jmyron, i can't call "background()" in setup, so it wouldn't clear the background in draw. like in the "ContinousLines" example. (sorry not allowed to include links yet)
i'm sort of trying to draw with motion tracking.
hope i make myself clear.
below is the code of what doesn't work very well yet.
Code:import JMyron.*;
JMyron theMov;
int[][] globArray;
void setup() {
size(320, 240);
theMov = new JMyron();
theMov.start(width, height);
theMov.findGlobs(1);
theMov.trackColor(255, 255, 255, 255);
background(0);
}
void draw() {
theMov.update();
int[] currFrame = theMov.image();
// draw each pixel to the screen
loadPixels();
for (int i = 0; i < width*height; i++) {
pixels[i] = currFrame[i];
}
updatePixels();
// draw the glob bounding boxes
globArray = theMov.globBoxes();
for(int i = 0; i < globArray.length; i++) {
int[] boxArray = globArray[i];
fill(0);
noStroke();
rect(0, 0, 320, 240);
stroke(255, 0, 0); // red outline
line(boxArray[0], boxArray[1], boxArray[2], boxArray[3]);
}
}
public void stop() {
theMov.stop();
super.stop();
}
help would really be appreciated.
thanks in advance, julian