Calibrate works?

This commit is contained in:
jan 2016-07-10 00:36:44 -07:00
commit cc711c6343
1104 changed files with 636510 additions and 75 deletions

View file

@ -0,0 +1,37 @@
import gab.opencv.*;
import processing.video.*;
Movie video;
OpenCV opencv;
void setup() {
size(720, 480);
video = new Movie(this, "street.mov");
opencv = new OpenCV(this, 720, 480);
opencv.startBackgroundSubtraction(5, 3, 0.5);
video.loop();
video.play();
}
void draw() {
image(video, 0, 0);
opencv.loadImage(video);
opencv.updateBackground();
opencv.dilate();
opencv.erode();
noFill();
stroke(255, 0, 0);
strokeWeight(3);
for (Contour contour : opencv.findContours()) {
contour.draw();
}
}
void movieEvent(Movie m) {
m.read();
}