blob: dded33a97c411b2521ff8aae745350bf8623fa91 (
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
|
#N canvas 576 38 1283 943 10;
#X obj 594 611 cnv 15 455 213 empty empty empty 20 12 0 14 -24198 -66577
0;
#X floatatom 1767 815 5 0 0 0 - - -;
#X floatatom 1801 815 5 0 0 0 - - -;
#X text 1775 834 Depth point (X -Y);
#X text 1840 816 End point (X -Y);
#X text 46 156 pix_opencv_contours_convexity :: Finds convexity defects
of the bigest contour of a binary image.;
#X text 45 192 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 pix_threshold to obtain a correct input for pix_opencv_contours_boundingrect.
;
#X text 46 245 pix_opencv_contours_boundingrect works detecting the
bigest white area in the input image \, sometimes you will need to
use pix_opencv_morphology to transform the contours of the shape to
be analyzed..;
#X obj 735 64 gemhead;
#X obj 616 862 pix_texture;
#X obj 53 60 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 63 104 pd gemwin;
#X msg 63 86 create;
#X obj 464 858 pix_texture;
#X obj 464 886 square 2;
#X obj 616 391 separator;
#X obj 747 91 bng 25 250 50 0 load empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 804 266 bng 15 250 50 0 empty empty end_reached 20 7 0 10 -262144
-1 -1;
#X floatatom 786 231 5 0 10000 1 frame# - -;
#X obj 747 120 openpanel;
#X msg 747 140 open \$1;
#X obj 735 249 pix_film;
#X msg 753 183 auto \$1;
#X obj 753 165 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X text 61 66 Create window and render;
#X msg 848 166 colorspace RGBA;
#X msg 953 166 colorspace RGB;
#X msg 1057 166 colorspace Grey;
#X obj 848 138 loadbang;
#X obj 615 362 pix_separator;
#X obj 464 394 separator;
#X obj 464 365 pix_separator;
#X obj 464 429 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 557 319 pd vswitch;
#X obj 625 319 tgl 15 0 empty load empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 498 247 pix_video;
#X obj 498 59 gemhead;
#X msg 537 172 device 0;
#X msg 546 203 driver 1;
#X msg 523 118 dialog;
#X msg 528 148 device /dev/dv1394-0;
#X obj 616 491 pix_opencv_bgsubstract;
#X obj 616 459 pix_resize 320 240;
#X floatatom 763 492 5 0 0 0 - - -;
#X obj 616 534 pix_opencv_morphology;
#X floatatom 764 533 5 0 0 0 - - -;
#X obj 616 881 square 2;
#X floatatom 753 797 5 0 0 0 - - -;
#X floatatom 788 797 5 0 0 0 - - -;
#X floatatom 818 778 5 0 0 0 - - -;
#X floatatom 852 778 5 0 0 0 - - -;
#X obj 790 695 route 0 1 2 3 4;
#X obj 787 733 unpack 0 0 0 0 0 0;
#X floatatom 882 759 5 0 0 0 - - -;
#X floatatom 916 759 5 0 0 0 - - -;
#X text 826 798 Start point (X -Y);
#X text 890 778 Depth point (X -Y);
#X text 955 760 End point (X -Y);
#X floatatom 797 886 5 0 0 0 - - -;
#X floatatom 832 886 5 0 0 0 - - -;
#X floatatom 862 867 5 0 0 0 - - -;
#X floatatom 896 867 5 0 0 0 - - -;
#X obj 831 822 unpack 0 0 0 0 0 0;
#X floatatom 926 848 5 0 0 0 - - -;
#X floatatom 960 848 5 0 0 0 - - -;
#X text 870 887 Start point (X -Y);
#X text 934 867 Depth point (X -Y);
#X text 999 849 End point (X -Y);
#X floatatom 858 982 5 0 0 0 - - -;
#X floatatom 893 982 5 0 0 0 - - -;
#X floatatom 923 963 5 0 0 0 - - -;
#X floatatom 957 963 5 0 0 0 - - -;
#X obj 892 918 unpack 0 0 0 0 0 0;
#X floatatom 987 944 5 0 0 0 - - -;
#X floatatom 1021 944 5 0 0 0 - - -;
#X text 931 983 Start point (X -Y);
#X text 995 963 Depth point (X -Y);
#X text 1060 945 End point (X -Y);
#X floatatom 930 1056 5 0 0 0 - - -;
#X floatatom 965 1056 5 0 0 0 - - -;
#X floatatom 995 1037 5 0 0 0 - - -;
#X floatatom 1029 1037 5 0 0 0 - - -;
#X obj 964 992 unpack 0 0 0 0 0 0;
#X floatatom 1059 1018 5 0 0 0 - - -;
#X floatatom 1093 1018 5 0 0 0 - - -;
#X text 1003 1057 Start point (X -Y);
#X text 1067 1037 Depth point (X -Y);
#X text 1132 1019 End point (X -Y);
#X floatatom 704 660 5 0 0 0 - - -;
#X text 740 664 number convexity defects in our detected contour;
#X text 900 696 A convexity defect is defined by 3 points. So for each
convexity defects we have ::;
#X obj 615 420 translateXYZ 2 0 0;
#X obj 618 630 pix_opencv_contours_convexity;
#X obj 558 340 pix_rgba;
#X msg 762 462 set;
#X text 791 461 <- Set the background reference;
#X text 797 492 <-Adjust threshold;
#X text 803 535 <-Adjust morphology if needed;
#X connect 8 0 21 0;
#X connect 9 0 46 0;
#X connect 11 0 12 0;
#X connect 12 0 11 0;
#X connect 13 0 14 0;
#X connect 15 0 91 0;
#X connect 16 0 19 0;
#X connect 17 0 18 0;
#X connect 18 0 21 1;
#X connect 19 0 20 0;
#X connect 20 0 21 0;
#X connect 21 0 33 1;
#X connect 21 2 17 0;
#X connect 22 0 21 0;
#X connect 23 0 22 0;
#X connect 25 0 21 0;
#X connect 25 0 35 0;
#X connect 26 0 21 0;
#X connect 27 0 21 0;
#X connect 28 0 25 0;
#X connect 28 0 23 0;
#X connect 29 0 15 0;
#X connect 30 0 32 0;
#X connect 31 0 30 0;
#X connect 32 0 13 0;
#X connect 33 0 93 0;
#X connect 34 0 33 2;
#X connect 35 0 33 0;
#X connect 36 0 35 0;
#X connect 37 0 35 0;
#X connect 38 0 35 0;
#X connect 39 0 35 0;
#X connect 40 0 35 0;
#X connect 41 0 44 0;
#X connect 42 0 41 0;
#X connect 43 0 41 1;
#X connect 44 0 92 0;
#X connect 45 0 44 1;
#X connect 51 0 52 0;
#X connect 51 1 62 0;
#X connect 51 2 72 0;
#X connect 51 3 82 0;
#X connect 52 0 47 0;
#X connect 52 1 48 0;
#X connect 52 2 49 0;
#X connect 52 3 50 0;
#X connect 52 4 53 0;
#X connect 52 5 54 0;
#X connect 62 0 58 0;
#X connect 62 1 59 0;
#X connect 62 2 60 0;
#X connect 62 3 61 0;
#X connect 62 4 63 0;
#X connect 62 5 64 0;
#X connect 72 0 68 0;
#X connect 72 1 69 0;
#X connect 72 2 70 0;
#X connect 72 3 71 0;
#X connect 72 4 73 0;
#X connect 72 5 74 0;
#X connect 82 0 78 0;
#X connect 82 1 79 0;
#X connect 82 2 80 0;
#X connect 82 3 81 0;
#X connect 82 4 83 0;
#X connect 82 5 84 0;
#X connect 91 0 42 0;
#X connect 92 0 9 0;
#X connect 92 1 88 0;
#X connect 92 2 51 0;
#X connect 93 0 31 0;
#X connect 93 0 29 0;
#X connect 94 0 41 0;
|