blob: cad8f5268bdb1a2bb87ebceac4b0c448700867bf (
plain)
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
#N canvas 462 38 1392 934 10;
#X obj 580 466 cnv 15 550 250 empty empty empty 20 12 0 14 -24198 -66577
0;
#X floatatom 717 652 5 0 0 0 - - -;
#X floatatom 803 666 5 0 0 0 - - -;
#X floatatom 725 815 5 0 0 0 - - -;
#X floatatom 760 815 5 0 0 0 - - -;
#X floatatom 797 815 5 0 0 0 - - -;
#X floatatom 831 815 5 0 0 0 - - -;
#X obj 722 786 unpack 0 0 0 0 0;
#X obj 730 736 route 0 1 2 3 4;
#X text 790 754 For each contour detected;
#X text 29 172 It is useful as a motion tracker if you have well isolated
silouets of the objects you want to track.;
#X msg 621 480 mode \$1;
#X obj 682 481 hradio 15 1 0 4 empty empty empty 0 -8 0 10 -262144
-1 -1 0;
#X text 751 482 retrieval mode ( see cvFindContours );
#X obj 717 506 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144
-1 -1 0;
#X text 799 506 retrieval method ( see cvFindContours );
#X msg 650 505 method \$1;
#X msg 673 528 maxmove \$1;
#X floatatom 747 529 5 0 0 0 - - -;
#X floatatom 771 553 5 0 0 0 - - -;
#X msg 683 550 ftolerance \$1;
#X text 808 551 frame tolerance for identification ( default 5 );
#X text 30 138 pix_opencv_contours_boundingrect :: Calculates up-right
bounding rectangle of all contours of a binary image.;
#X text 29 211 This object considers a contour to be analyzed any group
of white pixels in a black background \, for this reason you will find
useful to use pdp_bgsubstract or pdp_threshold to obtain a correct
input for pix_opencv_contours_boundingrect.;
#X text 29 265 pix_opencv_contours_boundingrect works detecting any
white areas in the input image \, it's important to set max/min values
of the areas you want to detect to filter non interesting noise or
areas \, also sometimes you will need to use pix_opencv_morphology
to transform the contours of the shapes to be analyzed..;
#X floatatom 833 719 5 0 0 0 - - -;
#X text 871 720 number of contours;
#X msg 698 575 nightmode \$1;
#X obj 788 576 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 777 597 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 790 619 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 717 596 draw \$1;
#X text 804 595 draw bounding rectangle ( default : on );
#X msg 732 617 show \$1;
#X text 817 616 draw the detected contours ( default : off );
#X text 811 576 hide original image ( default : off );
#X obj 715 44 gemhead;
#X obj 596 842 pix_texture;
#X obj 596 861 square 2;
#X obj 33 40 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
0;
#N canvas 0 22 454 304 gemwin 0;
#X obj 67 89 outlet;
#X obj 67 10 inlet;
#X obj 65 41 route create;
#X msg 67 70 set destroy;
#X msg 182 68 set create;
#N canvas 87 154 247 179 Gem.init 0;
#X obj 118 46 loadbang;
#X msg 118 81 reset;
#X obj 118 113 outlet;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X restore 289 80 pd Gem.init;
#X obj 162 241 gemwin;
#X msg 161 188 create \, 1;
#X msg 237 189 destroy;
#X msg 283 161 frame 25;
#X obj 164 126 t b b b;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 0 10 0;
#X connect 2 1 4 0;
#X connect 2 1 8 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 7 0 6 0;
#X connect 8 0 6 0;
#X connect 9 0 6 0;
#X connect 10 0 7 0;
#X connect 10 2 9 0;
#X restore 43 84 pd gemwin;
#X msg 43 66 create;
#X obj 444 838 pix_texture;
#X obj 444 866 square 2;
#X obj 596 371 separator;
#X obj 727 71 bng 25 250 50 0 load empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 784 246 bng 15 250 50 0 empty empty end_reached 20 7 0 10 -262144
-1 -1;
#X floatatom 766 211 5 0 10000 1 frame# - -;
#X obj 727 100 openpanel;
#X msg 727 120 open \$1;
#X obj 715 229 pix_film;
#X msg 733 163 auto \$1;
#X obj 733 145 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X text 41 46 Create window and render;
#X msg 828 146 colorspace RGBA;
#X msg 933 146 colorspace RGB;
#X msg 1037 146 colorspace Grey;
#X obj 828 118 loadbang;
#X obj 595 342 pix_separator;
#X obj 444 374 separator;
#X obj 444 345 pix_separator;
#X obj 444 409 translateXYZ -2 0 0;
#X obj 596 406 translateXYZ 2 0 0;
#N canvas 0 22 450 300 vswitch 0;
#X obj 144 263 outlet;
#X obj 36 26 inlet;
#X obj 260 29 inlet;
#X obj 36 133 spigot;
#X obj 260 141 spigot;
#X obj 119 64 loadbang;
#X msg 83 93 0;
#X msg 113 93 1;
#X msg 296 104 0;
#X msg 326 104 1;
#X obj 399 34 inlet;
#X obj 399 67 select 0;
#X connect 1 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 0 0;
#X connect 4 0 0 0;
#X connect 5 0 7 0;
#X connect 5 0 8 0;
#X connect 6 0 3 1;
#X connect 7 0 3 1;
#X connect 8 0 4 1;
#X connect 9 0 4 1;
#X connect 10 0 11 0;
#X connect 11 0 7 0;
#X connect 11 0 8 0;
#X connect 11 1 9 0;
#X connect 11 1 6 0;
#X restore 536 267 pd vswitch;
#X obj 604 267 tgl 15 0 empty load empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 478 39 gemhead;
#X msg 517 152 device 0;
#X msg 526 183 driver 1;
#X msg 503 98 dialog;
#X msg 508 128 device /dev/dv1394-0;
#X text 875 815 ( First contour ) Xorigin Yorigin Width Height;
#X text 752 648 min area in pixels (default 10x10);
#X text 840 664 max area in pixels (default 320x240);
#X obj 536 296 pix_resize 320 240;
#X text 790 528 maximum move of a countour ( default 20 );
#X floatatom 762 432 5 0 0 0 - - -;
#X obj 596 439 pix_opencv_bgsubstract;
#X floatatom 802 872 5 0 0 0 - - -;
#X obj 1159 591 loadbang;
#X obj 802 848 *;
#X obj 802 891 s area;
#X msg 766 399 set;
#X text 800 401 reset background reference;
#X obj 969 943 timeroll;
#X obj 908 913 autoscale;
#X msg 963 891 0;
#X obj 602 685 pix_opencv_contours_boundingrect;
#X obj 478 227 pix_video;
#X obj 1243 910 autoscale;
#X msg 1298 888 0;
#X obj 1242 943 timeroll;
#X obj 1202 863 mean_n 25;
#X text 923 338 TODO ::: in some cases i want to reuse losts tags inmediately
\, a message to do it is needed;
#X msg 927 890 240;
#X msg 1262 887 240;
#X text 924 297 KNOWN BUGS :: in some input data all the blobs are
tagged with 0 label (if maxmove is very high????) ... if i put maxmove
to zero blobs are tagged in a crazy way....;
#X obj 749 988 -;
#X msg 723 958 240;
#X obj 723 934 t b;
#X msg 1162 624 50;
#X obj 834 431 loadbang;
#X msg 799 433 50;
#X obj 531 320 pix_rgba;
#X connect 1 0 86 1;
#X connect 2 0 86 2;
#X connect 4 0 96 1;
#X connect 4 0 98 0;
#X connect 5 0 79 0;
#X connect 6 0 79 1;
#X connect 7 0 3 0;
#X connect 7 1 4 0;
#X connect 7 2 5 0;
#X connect 7 3 6 0;
#X connect 8 0 7 0;
#X connect 11 0 86 0;
#X connect 12 0 11 0;
#X connect 14 0 16 0;
#X connect 16 0 86 0;
#X connect 17 0 86 0;
#X connect 18 0 17 0;
#X connect 19 0 20 0;
#X connect 20 0 86 0;
#X connect 27 0 86 0;
#X connect 28 0 27 0;
#X connect 29 0 31 0;
#X connect 30 0 33 0;
#X connect 31 0 86 0;
#X connect 33 0 86 0;
#X connect 36 0 50 0;
#X connect 37 0 38 0;
#X connect 40 0 41 0;
#X connect 41 0 40 0;
#X connect 42 0 43 0;
#X connect 44 0 62 0;
#X connect 45 0 48 0;
#X connect 46 0 47 0;
#X connect 47 0 50 1;
#X connect 48 0 49 0;
#X connect 49 0 50 0;
#X connect 50 0 63 1;
#X connect 50 2 46 0;
#X connect 51 0 50 0;
#X connect 52 0 51 0;
#X connect 54 0 50 0;
#X connect 54 0 87 0;
#X connect 55 0 50 0;
#X connect 56 0 50 0;
#X connect 57 0 54 0;
#X connect 57 0 52 0;
#X connect 58 0 44 0;
#X connect 59 0 61 0;
#X connect 60 0 59 0;
#X connect 61 0 42 0;
#X connect 62 0 76 0;
#X connect 63 0 73 0;
#X connect 64 0 63 2;
#X connect 65 0 87 0;
#X connect 66 0 87 0;
#X connect 67 0 87 0;
#X connect 68 0 87 0;
#X connect 69 0 87 0;
#X connect 73 0 102 0;
#X connect 75 0 76 1;
#X connect 76 0 86 0;
#X connect 77 0 80 0;
#X connect 78 0 99 0;
#X connect 79 0 77 0;
#X connect 81 0 76 0;
#X connect 84 0 83 0;
#X connect 85 0 84 0;
#X connect 86 0 37 0;
#X connect 86 1 8 0;
#X connect 86 2 25 0;
#X connect 87 0 63 0;
#X connect 88 0 90 0;
#X connect 89 0 88 0;
#X connect 91 0 88 0;
#X connect 93 0 84 0;
#X connect 94 0 88 0;
#X connect 96 0 84 0;
#X connect 96 0 91 0;
#X connect 97 0 96 0;
#X connect 98 0 97 0;
#X connect 99 0 1 0;
#X connect 100 0 101 0;
#X connect 101 0 75 0;
#X connect 102 0 60 0;
#X connect 102 0 58 0;
|