aboutsummaryrefslogtreecommitdiff
path: root/pix_opencv_contours_boundingrect-help.pd
blob: 88fd8fc2fd859f232dbb73f860b30959eb506f68 (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
#N canvas 180 115 1202 794 10;
#X obj 2 42 cnv 15 430 560 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 2 -4 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577
0;
#X text 11 0 Arguments:;
#X obj 2 -99 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577
0;
#X text 7 -137 Class: pix_opencv;
#X text 32 17 none;
#X obj 437 -158 cnv 15 710 760 empty empty empty 20 12 0 14 -228992
-66577 0;
#X obj 589 283 cnv 15 550 250 empty empty empty 20 12 0 14 -24198 -66577
0;
#X floatatom 693 467 5 0 0 0 - - -;
#X floatatom 788 481 5 0 0 0 - - -;
#X floatatom 693 581 5 0 0 0 - - -;
#X floatatom 728 581 5 0 0 0 - - -;
#X floatatom 765 581 5 0 0 0 - - -;
#X floatatom 799 581 5 0 0 0 - - -;
#X obj 693 558 unpack 0 0 0 0 0;
#X obj 693 536 route 0 1 2 3 4;
#X text 794 539 For each contour detected;
#X text 16 50 It is useful as a motion tracker if you have well isolated
silouets of the objects you want to track.;
#X msg 618 293 mode \$1;
#X obj 679 294 hradio 15 1 0 4 empty empty empty 0 -8 0 10 -262144
-1 -1 0;
#X text 748 295 retrieval mode ( see cvFindContours );
#X obj 714 319 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144
-1 -1 0;
#X text 796 319 retrieval method ( see cvFindContours );
#X msg 647 318 method \$1;
#X msg 670 341 maxmove \$1;
#X floatatom 744 342 5 0 0 0 - - -;
#X floatatom 768 366 5 0 0 0 - - -;
#X msg 680 363 ftolerance \$1;
#X text 805 364 frame tolerance for identification ( default 5 );
#X text 9 -93 pix_opencv_contours_boundingrect :: Calculates up-right
bounding rectangle of all contours of a binary image.;
#X text 16 89 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 16 143 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 788 518 5 0 0 0 - - -;
#X text 826 519 number of contours;
#X msg 695 388 nightmode \$1;
#X obj 785 389 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 774 410 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 787 432 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 714 409 draw \$1;
#X text 801 408 draw bounding rectangle ( default : on );
#X msg 729 430 show \$1;
#X text 814 429 draw the detected contours ( default : off );
#X text 808 389 hide original image ( default : off );
#X obj 614 -145 gemhead;
#X obj 599 541 pix_texture;
#X obj 919 -153 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 929 -109 pd gemwin;
#X msg 929 -127 create;
#X obj 447 541 pix_texture;
#X obj 599 184 separator;
#X obj 626 -118 bng 25 250 50 0 load empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 683 57 bng 15 250 50 0 empty empty end_reached 20 7 0 10 -262144
-1 -1;
#X floatatom 665 22 5 0 10000 1 frame# - -;
#X obj 626 -89 openpanel;
#X msg 626 -69 open \$1;
#X obj 614 40 pix_film;
#X msg 632 -26 auto \$1;
#X obj 632 -44 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X text 927 -147 Create window and render;
#X msg 727 -43 colorspace RGBA;
#X msg 733 -24 colorspace RGB;
#X msg 750 -1 colorspace Grey;
#X obj 727 -71 loadbang;
#X obj 599 155 pix_separator;
#X obj 447 187 separator;
#X obj 447 158 pix_separator;
#X obj 447 222 translateXYZ -2 0 0;
#X obj 599 219 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 447 96 pd vswitch;
#X obj 515 96 tgl 15 0 empty load empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 447 -150 gemhead;
#X msg 486 -37 device 0;
#X msg 495 -6 driver 1;
#X msg 472 -91 dialog;
#X msg 477 -61 device /dev/dv1394-0;
#X text 843 581 ( First contour ) Xorigin Yorigin Width Height;
#X text 728 463 min area in pixels (default 10x10);
#X text 825 479 max area in pixels (default 320x240);
#X obj 447 116 pix_resize 320 240;
#X text 787 341 maximum move of a countour ( default 20 );
#X floatatom 765 245 5 0 0 0 - - -;
#X obj 599 252 pix_opencv_bgsubstract;
#X obj 527 394 loadbang;
#X msg 769 212 set;
#X text 803 214 reset background reference;
#X obj 599 498 pix_opencv_contours_boundingrect;
#X obj 447 38 pix_video;
#X text 16 268 TODO ::: in some cases i want to reuse losts tags inmediately
\, a message to do it is needed;
#X text 17 227 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 msg 527 414 50;
#X obj 837 244 loadbang;
#X msg 802 246 50;
#X obj 447 135 pix_rgba;
#X obj 447 561 square 2;
#X obj 599 561 square 2;
#X text 16 308 See also pix_opencv_contour_convexhull that output also
a contour rotation;
#X text 8 -153 Synopsis: [pix_opencv_contours_boundingrect];
#X obj 88 419 cnv 15 100 60 empty empty DEPRECATED!! 20 12 0 18 -233017
-258113 0;
#X text 74 445 please consider the use of pix_opencv_contours;
#X connect 8 0 85 1;
#X connect 9 0 85 2;
#X connect 14 0 10 0;
#X connect 14 1 11 0;
#X connect 14 2 12 0;
#X connect 14 3 13 0;
#X connect 15 0 14 0;
#X connect 18 0 85 0;
#X connect 19 0 18 0;
#X connect 21 0 23 0;
#X connect 23 0 85 0;
#X connect 24 0 85 0;
#X connect 25 0 24 0;
#X connect 26 0 27 0;
#X connect 27 0 85 0;
#X connect 34 0 85 0;
#X connect 35 0 34 0;
#X connect 36 0 38 0;
#X connect 37 0 40 0;
#X connect 38 0 85 0;
#X connect 40 0 85 0;
#X connect 43 0 55 0;
#X connect 44 0 94 0;
#X connect 46 0 47 0;
#X connect 47 0 46 0;
#X connect 48 0 93 0;
#X connect 49 0 67 0;
#X connect 50 0 53 0;
#X connect 51 0 52 0;
#X connect 52 0 55 1;
#X connect 53 0 54 0;
#X connect 54 0 55 0;
#X connect 55 0 68 1;
#X connect 55 2 51 0;
#X connect 56 0 55 0;
#X connect 57 0 56 0;
#X connect 59 0 55 0;
#X connect 59 0 86 0;
#X connect 60 0 55 0;
#X connect 61 0 55 0;
#X connect 62 0 59 0;
#X connect 62 0 57 0;
#X connect 63 0 49 0;
#X connect 64 0 66 0;
#X connect 65 0 64 0;
#X connect 66 0 48 0;
#X connect 67 0 81 0;
#X connect 68 0 78 0;
#X connect 69 0 68 2;
#X connect 70 0 86 0;
#X connect 71 0 86 0;
#X connect 72 0 86 0;
#X connect 73 0 86 0;
#X connect 74 0 86 0;
#X connect 78 0 92 0;
#X connect 80 0 81 1;
#X connect 81 0 85 0;
#X connect 82 0 89 0;
#X connect 83 0 81 0;
#X connect 85 0 44 0;
#X connect 85 1 15 0;
#X connect 85 2 32 0;
#X connect 86 0 68 0;
#X connect 89 0 8 0;
#X connect 90 0 91 0;
#X connect 91 0 80 0;
#X connect 92 0 65 0;
#X connect 92 0 63 0;