求大神解决问题
processing吧
全部回复
仅看楼主
level 1
这个问题怎么解决啊?
代码在下面
import processing.video.*;
import gab.opencv.*;
import java.awt.*;
OpenCV opencv;
Movie theMov;
void setup() {
size(480, 480);
theMov = new Movie(this, "test.mov");
/* only use 1 of the following options */
theMov.play(); //plays the movie once
theMov.loop(); //plays the movie over and over
opencv = new OpenCV(this, 480,480);
opencv.loadCascade(OpenCV.CASCADE_FRONTALFACE);
}
void draw() {
image(theMov, 0, 0);
opencv.loadImage(theMov);
noFill();
stroke(0, 255, 0);
strokeWeight(3);
Rectangle[] faces = opencv.detect();
println(faces.length);
for (int i = 0; i < faces.length; i++) {
println(faces[i].x + "," + faces[i].y);
rect(faces[i].x, faces[i].y, faces[i].width, faces[i].height);
}
}
void movieEvent(Movie m) {
m.read();
}
2015年05月15日 02点05分 1
1