-
Notifications
You must be signed in to change notification settings - Fork 4
/
06a-background.pd
86 lines (86 loc) · 2.62 KB
/
06a-background.pd
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#N canvas 623 62 587 654 10;
#X declare -lib Gem;
#X obj 28 8 cnv 15 400 50 empty empty 6a 14 24 0 24 -175655 -66577
0;
#X msg 31 130 create \, 1;
#X msg 39 156 0 \, destroy;
#X obj 129 162 pix_video;
#X obj 129 376 pix_texture;
#X obj 129 398 rectangle 4 3;
#X text 346 128 This is a render-chain.;
#X text 348 142 Always start it with gemhead.;
#X text 346 170 takes the video image from your camera;
#X text 17 395 onto an rectangle;
#X obj 129 187 pix_rgba;
#X text 348 190 converts the colorspace;
#X text 29 556 use;
#X text 28 536 Challenge:;
#X obj 56 557 pix_multiblob;
#X obj 129 320 pix_blob 4;
#X obj 31 186 gemwin 12;
#X text 360 297 detects the center of gravity;
#X obj 254 353 > 0.001;
#X msg 139 212 reset;
#X obj 213 231 hsl 100 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 1980 1;
#X text 14 373 textures the image;
#X text 306 347 if the blobsize is to small;
#X text 312 359 don't show the crosshair;
#X text 337 409 computer and camera;
#X text 304 396 you may have to ajust this for your;
#X text 81 29 Using Background substraction;
#X text 28 67 If we compare the current frame to the previous frame
\, we loose the position if the tracked object stops moving.;
#X text 29 94 An aproach to this is to substract the Background;
#X text 359 244 compares the current frame to a;
#X text 360 258 stored one;
#X text 316 229 threshold;
#X obj 128 492 rectangle 0.01 1;
#X obj 128 513 rectangle 1 0.01;
#X text 365 310 of blobs in the alpha channel;
#X text 16 429 the render chain;
#X text 17 441 may be toggled;
#X text 16 454 by 0 or 1 sent;
#X text 18 466 to gemhead;
#X text 143 557 instead;
#X obj 129 276 alpha;
#X obj 176 277 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 129 297 mn-flip;
#X obj 128 470 translateXYZ 0 0 0.01;
#X obj 129 130 gemhead;
#X obj 128 430 gemhead;
#X obj 215 399 mn-coor_map;
#X obj 240 160 loadbang;
#X msg 240 181 0.2;
#X obj 129 249 pix_background;
#X text 352 498 the crosshair;
#X obj 322 15 declare -lib Gem;
#X text 177 211 move out of the image and set reference frame;
#X text 29 622 Max Neupert \, GMU - Bauhaus Universität Weimar 2008-2012
;
#X text 81 16 Pure Data + Gem;
#X connect 1 0 16 0;
#X connect 2 0 16 0;
#X connect 3 0 10 0;
#X connect 4 0 5 0;
#X connect 10 0 49 0;
#X connect 15 0 4 0;
#X connect 15 1 46 0;
#X connect 15 2 46 1;
#X connect 15 3 18 0;
#X connect 18 0 45 0;
#X connect 19 0 49 0;
#X connect 20 0 49 1;
#X connect 32 0 33 0;
#X connect 40 0 42 0;
#X connect 41 0 40 1;
#X connect 42 0 15 0;
#X connect 43 0 32 0;
#X connect 44 0 3 0;
#X connect 45 0 43 0;
#X connect 46 0 43 1;
#X connect 46 1 43 2;
#X connect 47 0 48 0;
#X connect 48 0 20 0;
#X connect 49 0 40 0;