-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKinect.pde
40 lines (34 loc) · 934 Bytes
/
Kinect.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
class Kinector {
private int skip;
int threshold;
private int w, h;
int[] depthPixels;
Kinector(int kw, int kh, int kSkip) {
skip = kSkip;
w = kw;
h = kh;
threshold = 1;
}
//void firstPixelDetect() {
// depthPixels = kinect.getRawDepth();
// for (int i = 0; i < w; i ++) {
// for (int j = 0; j < h-1; j ++) {
// if ((depthPixels[(i) + (j*w)]) < threshold) {
// shapeDetect(i, j);
// break;
// }
// }
// }
//}
//void shapeDetect(int x, int y) {
// if (kinect.getRawDepth()[(x+1)+(y*w)] < threshold) {
// shapeDetect(x+1, y);
// } else if (kinect.getRawDepth()[(x)+((y+1)*w)] < threshold) {
// shapeDetect(x, y+1);
// } else if (kinect.getRawDepth()[(x)+((y-1)*w)] < threshold) {
// shapeDetect(x, y-1);
// } else if (kinect.getRawDepth()[(x-1)+(y*w)] < threshold) {
// shapeDetect(x-1, y);
// }
//}
}