blob: 0aa1fff4376940f972c04d0259bb9cf6d7cdb4ac (
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
|
#N canvas 277 66 1040 775 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 obj 600 684 pix_opencv_contours_boundingrect;
#X floatatom 803 666 5 0 0 0 - - -;
#X floatatom 733 816 5 0 0 0 - - -;
#X floatatom 768 816 5 0 0 0 - - -;
#X floatatom 805 816 5 0 0 0 - - -;
#X floatatom 839 816 5 0 0 0 - - -;
#X obj 730 787 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 5;
#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 destroy;
#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 0 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 227 pix_video;
#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 floatatom 746 894 5 0 0 0 - - -;
#X floatatom 781 894 5 0 0 0 - - -;
#X floatatom 818 894 5 0 0 0 - - -;
#X floatatom 852 894 5 0 0 0 - - -;
#X obj 743 865 unpack 0 0 0 0 0;
#X text 883 816 ( First contour ) Xorigin Yorigin Width Height;
#X text 895 892 ( Second 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 obj 596 439 pix_opencv_threshold;
#X floatatom 731 441 5 0 0 0 - - -;
#X connect 1 0 2 1;
#X connect 2 0 38 0;
#X connect 2 1 9 0;
#X connect 2 2 26 0;
#X connect 3 0 2 2;
#X connect 8 0 4 0;
#X connect 8 1 5 0;
#X connect 8 2 6 0;
#X connect 8 3 7 0;
#X connect 9 0 8 0;
#X connect 9 1 76 0;
#X connect 12 0 2 0;
#X connect 13 0 12 0;
#X connect 15 0 17 0;
#X connect 17 0 2 0;
#X connect 18 0 2 0;
#X connect 19 0 18 0;
#X connect 20 0 21 0;
#X connect 21 0 2 0;
#X connect 28 0 2 0;
#X connect 29 0 28 0;
#X connect 30 0 32 0;
#X connect 31 0 34 0;
#X connect 32 0 2 0;
#X connect 34 0 2 0;
#X connect 37 0 51 0;
#X connect 38 0 39 0;
#X connect 41 0 42 0;
#X connect 42 0 41 0;
#X connect 43 0 44 0;
#X connect 45 0 63 0;
#X connect 46 0 49 0;
#X connect 47 0 48 0;
#X connect 48 0 51 1;
#X connect 49 0 50 0;
#X connect 50 0 51 0;
#X connect 51 0 64 1;
#X connect 51 2 47 0;
#X connect 52 0 51 0;
#X connect 53 0 52 0;
#X connect 55 0 51 0;
#X connect 55 0 66 0;
#X connect 56 0 51 0;
#X connect 57 0 51 0;
#X connect 58 0 55 0;
#X connect 58 0 53 0;
#X connect 59 0 45 0;
#X connect 60 0 62 0;
#X connect 61 0 60 0;
#X connect 62 0 43 0;
#X connect 63 0 83 0;
#X connect 64 0 81 0;
#X connect 65 0 64 2;
#X connect 66 0 64 0;
#X connect 67 0 66 0;
#X connect 68 0 66 0;
#X connect 69 0 66 0;
#X connect 70 0 66 0;
#X connect 71 0 66 0;
#X connect 76 0 72 0;
#X connect 76 1 73 0;
#X connect 76 2 74 0;
#X connect 76 3 75 0;
#X connect 81 0 59 0;
#X connect 81 0 61 0;
#X connect 83 0 2 0;
#X connect 84 0 83 2;
|