-
Notifications
You must be signed in to change notification settings - Fork 4
/
07a-multi-blobtracker.pd
191 lines (191 loc) · 5.4 KB
/
07a-multi-blobtracker.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#N canvas 754 31 910 947 10;
#X declare -lib Gem;
#X obj 27 7 cnv 15 400 50 empty empty 7 14 24 0 24 -175655 -66577 0
;
#X text 75 29 Tracking multible blobs;
#X obj 27 92 declare -lib Gem;
#X obj 279 63 gemhead;
#X obj 279 776 pix_texture;
#X obj 279 820 rectangle 4 3;
#X obj 673 304 pix_gain;
#X obj 732 304 pix_levels;
#X obj 799 304 pix_curve;
#X obj 366 680 list split 3;
#X obj 366 896 unpack s f f;
#X obj 400 918 s blobcount;
#X obj 400 702 showblob 1;
#X obj 716 173 pix_video;
#X text 671 151 replace [pix_film] with;
#X text 702 193 for live video;
#X text 702 281 you may also try:;
#N canvas 555 599 616 311 init 0;
#X obj 98 29 loadbang;
#X obj 243 100 send contrast;
#X obj 210 122 send saturation;
#X msg 210 96 2.5;
#X msg 243 74 1.3;
#X obj 174 144 send low_threshold;
#X msg 174 122 0.04;
#X msg 137 148 1;
#X obj 137 170 send high_threshold;
#X obj 101 196 send threshold;
#X msg 101 174 0.15;
#X obj 64 220 send blobsize;
#X msg 64 197 0.2;
#X text 226 26 this thing initializes all the sliders;
#X connect 0 0 4 0;
#X connect 0 0 3 0;
#X connect 0 0 6 0;
#X connect 0 0 7 0;
#X connect 0 0 10 0;
#X connect 0 0 12 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X connect 6 0 5 0;
#X connect 7 0 8 0;
#X connect 10 0 9 0;
#X connect 12 0 11 0;
#X restore 28 68 pd init;
#X obj 155 774 pix_texture;
#X obj 155 818 rectangle 4 3;
#X obj 155 388 pix_separator;
#X obj 279 386 pix_separator;
#X obj 274 237 cnv 15 220 130 empty empty empty 20 12 0 14 -204786
-66577 0;
#X obj 279 343 pix_contrast;
#X obj 316 254 hsl 99 15 0 10 0 0 empty contrast contrast -2 -8 0 10
-262144 -1 -1 1274 1;
#X floatatom 319 273 5 0 0 0 - - -;
#X obj 351 303 hsl 99 15 0 10 0 0 empty saturation saturation -2 -8
0 10 -262144 -1 -1 2450 1;
#X floatatom 355 324 5 0 0 0 - - -;
#X obj 274 91 cnv 15 220 142 empty empty empty 20 12 0 14 -262130 -66577
0;
#X obj 301 194 unpack f f f f;
#X obj 301 214 send frames;
#X obj 403 132 receive frames;
#X floatatom 335 175 5 0 0 0 - - -;
#X obj 324 152 float;
#X obj 388 152 %;
#X obj 279 174 pix_film;
#N canvas 1126 98 165 233 open 0;
#X obj 16 17 inlet;
#X obj 28 127 loadbang;
#X obj 16 179 outlet;
#X obj 16 47 openpanel;
#X msg 16 67 open \$1;
#X msg 28 148 open specimen.mov;
#X connect 0 0 3 0;
#X connect 1 0 5 0;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X connect 5 0 2 0;
#X restore 329 118 pd open;
#X obj 279 117 t a b;
#X text 497 89 video file playback;
#X text 495 235 video processing;
#X obj 26 114 cnv 15 220 130 empty empty empty 20 12 0 14 -261234 -66577
0;
#X msg 44 174 0 \, destroy;
#X obj 31 221 gemwin 10;
#X text 31 130 window control (click this!);
#X text 698 66 suggestions:;
#X obj 272 414 cnv 15 220 130 empty empty empty 20 12 0 14 -204800
-66577 0;
#X obj 279 522 pix_movement2;
#X floatatom 322 450 5 0 0 0 - - -;
#X floatatom 360 504 5 0 0 0 - - -;
#X obj 357 483 hsl 99 15 0 1 0 0 empty high_threshold high_threshold
-2 -8 0 10 -262144 -1 -1 9800 1;
#X obj 319 432 hsl 99 15 0 1 0 0 empty low_threshold low_threshold
-2 -8 0 10 -262144 -1 -1 392 1;
#X text 501 414 movement detection;
#X text 502 428 (difference between subsequent frames);
#X text 503 457 high can't be smaller than low!;
#X obj 362 152 + 2;
#X obj 329 96 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 350 94 open video file;
#X obj 400 723 showblob 2;
#X obj 400 786 showblob 5;
#X obj 400 744 showblob 3;
#X obj 400 765 showblob 4;
#X obj 400 807 showblob 6;
#X obj 400 828 showblob 7;
#X obj 400 849 showblob 8;
#X obj 400 870 showblob 9;
#X obj 272 547 cnv 15 220 130 empty empty empty 20 12 0 14 -203904
-66577 0;
#X obj 279 657 pix_multiblob 9;
#X msg 319 580 threshold \$1;
#X msg 354 632 blobSize \$1;
#X obj 357 614 hsl 99 15 0 1 0 0 empty blobsize blobsize -2 -8 0 10
-262144 -1 -1 1960 1;
#X obj 322 562 hsl 99 15 0 1 0 0 empty threshold threshold -2 -8 0
10 -262144 -1 -1 1470 1;
#X text 497 545 blob detection;
#X text 494 559 (groups of adjacent pixels are a blob);
#X text 422 385 <---------- multiplying and unlinking the pixel information
;
#X text 133 91 load Gem library;
#X msg 31 151 dimen 800 400 \, view -4 0 4 0 \, create \, 1;
#X obj 155 743 translateXYZ -8 0 0;
#X msg 51 199 color 0.5 0.5 0.5 \, frame 6;
#X text 499 64 explanation:;
#X text 154 838 the left image;
#X text 154 853 processed;
#X text 273 839 the right image;
#X text 274 855 blobs;
#X text 28 897 Max Neupert \, GMU - Bauhaus-Universität Weimar 2013
;
#X text 75 16 Pure Data + Gem;
#X connect 3 0 37 0;
#X connect 4 0 5 0;
#X connect 9 0 10 0;
#X connect 9 1 12 0;
#X connect 10 1 11 0;
#X connect 12 0 57 0;
#X connect 18 0 19 0;
#X connect 20 0 76 0;
#X connect 21 0 46 0;
#X connect 23 0 21 0;
#X connect 23 0 20 0;
#X connect 24 0 23 1;
#X connect 24 0 25 0;
#X connect 26 0 27 0;
#X connect 26 0 23 2;
#X connect 29 0 30 0;
#X connect 31 0 34 1;
#X connect 33 0 32 0;
#X connect 33 0 35 1;
#X connect 33 0 54 0;
#X connect 34 0 33 1;
#X connect 35 0 23 0;
#X connect 35 1 29 0;
#X connect 36 0 35 0;
#X connect 37 0 35 0;
#X connect 37 1 33 0;
#X connect 41 0 42 0;
#X connect 46 0 66 0;
#X connect 49 0 46 2;
#X connect 49 0 48 0;
#X connect 50 0 46 1;
#X connect 50 0 47 0;
#X connect 54 0 34 0;
#X connect 55 0 36 0;
#X connect 57 0 59 0;
#X connect 58 0 61 0;
#X connect 59 0 60 0;
#X connect 60 0 58 0;
#X connect 61 0 62 0;
#X connect 62 0 63 0;
#X connect 63 0 64 0;
#X connect 66 0 4 0;
#X connect 66 1 9 0;
#X connect 67 0 66 0;
#X connect 68 0 66 0;
#X connect 69 0 68 0;
#X connect 70 0 67 0;
#X connect 75 0 42 0;
#X connect 76 0 18 0;
#X connect 77 0 42 0;