level 1
烟娴
楼主
我想做的是利用摄像头抠像,是屏幕上掉落的东西堆积在人像上,不知道怎么实现抠像,我只完成的部分代码,请大神指点下!!就像这个一样,抠出来的像把掉落的物体接住!!!

求各位打大神指点和帮助!!
代码如下
int y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11;
void setup() {
size(400,300);
}
void draw() {
background(100);
ellipse(200,y1,20,20);
ellipse(300,y2,20,20);
ellipse(100,y3,20,20);
ellipse(10,y5,20,20);
ellipse(80,y6,20,20);
ellipse(150,y7,20,20);
ellipse(210,y8,20,20);
ellipse(330,y9,20,20);
ellipse(280,y10,20,20);
ellipse(380,y11,20,20);
y1+=1;
y2+=2;
y3+=1;
y4+=4;
y5+=3;
y6+=2;
y7+=1;
y8+=3;
y9+=6;
y10+=4;
y11+=4;
if (y1>height) {
y1=0;
}
if (y2>height) {
y2=0;
}
if (y3>height) {
y3=0;
}
if (y4>height) {
y4=0;
}
if (y5>height) {
y5=0;
}
if (y6>height) {
y6=0;
}
if (y7>height) {
y4=0;
}
if (y8>height) {
y8=0;
}
if (y9>height) {
y9=0;
}
if (y10>height) {
y10=0;
}
if (y11>height) {
y11=0;
}
}
2014年04月14日 09点04分
1

求各位打大神指点和帮助!!代码如下
int y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11;
void setup() {
size(400,300);
}
void draw() {
background(100);
ellipse(200,y1,20,20);
ellipse(300,y2,20,20);
ellipse(100,y3,20,20);
ellipse(10,y5,20,20);
ellipse(80,y6,20,20);
ellipse(150,y7,20,20);
ellipse(210,y8,20,20);
ellipse(330,y9,20,20);
ellipse(280,y10,20,20);
ellipse(380,y11,20,20);
y1+=1;
y2+=2;
y3+=1;
y4+=4;
y5+=3;
y6+=2;
y7+=1;
y8+=3;
y9+=6;
y10+=4;
y11+=4;
if (y1>height) {
y1=0;
}
if (y2>height) {
y2=0;
}
if (y3>height) {
y3=0;
}
if (y4>height) {
y4=0;
}
if (y5>height) {
y5=0;
}
if (y6>height) {
y6=0;
}
if (y7>height) {
y4=0;
}
if (y8>height) {
y8=0;
}
if (y9>height) {
y9=0;
}
if (y10>height) {
y10=0;
}
if (y11>height) {
y11=0;
}
}