blob: 350bd7303f67a47111981e8b127104fa19abe5c7 (
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
|
#N canvas 227 366 1068 671 10;
#X obj 17 217 cnv 15 430 450 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 17 171 cnv 15 430 40 empty empty empty 20 12 0 14 -195568 -66577
0;
#X text 26 175 Arguments:;
#X obj 17 76 cnv 15 430 90 empty empty empty 20 12 0 14 -233017 -66577
0;
#X text 22 38 Class: pix_opencv;
#X text 23 22 Synopsis: [pix_opencv_calibration];
#X text 47 195 none;
#X text 26 86 pix_opencv_contours_convexity :: Finds convexity defects
of the bigest contour of a binary image.;
#X text 25 228 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 26 281 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 453 6 cnv 15 610 660 empty empty empty 20 12 0 14 -228992 -66577
0;
#X obj 600 414 cnv 15 455 200 empty empty empty 20 12 0 14 -24198 -66577
0;
#X obj 609 625 pix_texture;
#X obj 832 240 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 842 284 pd gemwin;
#X msg 842 266 destroy;
#X obj 458 627 pix_texture;
#X obj 458 646 square 2;
#X obj 609 291 separator;
#X obj 647 41 bng 25 250 50 0 load empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 704 216 bng 15 250 50 0 empty empty end_reached 20 7 0 10 -262144
-1 -1;
#X floatatom 686 181 5 0 10000 1 frame# - -;
#X obj 647 70 openpanel;
#X msg 647 90 open \$1;
#X obj 635 199 pix_film;
#X msg 653 133 auto \$1;
#X obj 653 115 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X text 840 246 Create window and render;
#X msg 748 116 colorspace RGBA;
#X msg 758 137 colorspace RGB;
#X msg 772 156 colorspace Grey;
#X obj 748 88 loadbang;
#X obj 609 272 pix_separator;
#X obj 458 294 separator;
#X obj 458 275 pix_separator;
#X obj 458 312 translateXYZ -2 0 0;
#N canvas 1 158 405 225 vswitch 0;
#X obj 36 139 outlet;
#X obj 36 26 inlet;
#X obj 260 29 inlet;
#X obj 305 29 inlet;
#X obj 81 73 == 0;
#X obj 36 93 spigot 1;
#X obj 260 95 spigot 0;
#X connect 1 0 5 0;
#X connect 2 0 6 0;
#X connect 3 0 4 0;
#X connect 3 0 6 1;
#X connect 4 0 5 1;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
#X restore 458 230 pd vswitch;
#X obj 526 230 tgl 15 0 empty load empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 458 197 pix_video;
#X msg 497 132 device 0;
#X msg 506 153 driver 1;
#X msg 483 93 dialog;
#X msg 488 113 device /dev/dv1394-0;
#X obj 609 368 pix_opencv_bgsubstract;
#X obj 609 329 pix_resize 320 240;
#X floatatom 756 369 5 0 0 0 - - -;
#X obj 609 388 pix_opencv_morphology;
#X floatatom 757 387 5 0 0 0 - - -;
#X obj 609 644 square 2;
#X floatatom 746 588 5 0 0 0 - - -;
#X floatatom 781 588 5 0 0 0 - - -;
#X floatatom 811 569 5 0 0 0 - - -;
#X floatatom 845 569 5 0 0 0 - - -;
#X obj 780 466 route 0 1 2 3 4;
#X obj 780 524 unpack 0 0 0 0 0 0;
#X floatatom 875 550 5 0 0 0 - - -;
#X floatatom 909 550 5 0 0 0 - - -;
#X text 819 589 Start point (X -Y);
#X text 883 569 Depth point (X -Y);
#X text 948 551 End point (X -Y);
#X floatatom 694 441 5 0 0 0 - - -;
#X text 730 445 number convexity defects in our detected contour;
#X text 692 484 A convexity defect is defined by 3 points. So for each
convexity defects we have ::;
#X obj 609 310 translateXYZ 2 0 0;
#X obj 609 421 pix_opencv_contours_convexity;
#X obj 458 251 pix_rgba;
#X msg 623 348 set;
#X text 652 347 <- Set the background reference;
#X text 790 369 <-Adjust threshold;
#X text 796 389 <-Adjust morphology if needed;
#X obj 635 14 gemhead;
#X obj 458 9 gemhead;
#X obj 62 419 cnv 15 300 60 empty empty DEPRECATED!! 100 20 0 18 -233017
-258113 0;
#X text 74 445 please consider the use of pix_opencv_contours;
#X connect 12 0 48 0;
#X connect 14 0 15 0;
#X connect 15 0 14 0;
#X connect 16 0 17 0;
#X connect 18 0 63 0;
#X connect 19 0 22 0;
#X connect 20 0 21 0;
#X connect 21 0 24 1;
#X connect 22 0 23 0;
#X connect 23 0 24 0;
#X connect 24 0 36 1;
#X connect 24 2 20 0;
#X connect 25 0 24 0;
#X connect 26 0 25 0;
#X connect 28 0 24 0;
#X connect 28 0 38 0;
#X connect 29 0 24 0;
#X connect 30 0 24 0;
#X connect 31 0 28 0;
#X connect 31 0 26 0;
#X connect 32 0 18 0;
#X connect 33 0 35 0;
#X connect 34 0 33 0;
#X connect 35 0 16 0;
#X connect 36 0 65 0;
#X connect 37 0 36 2;
#X connect 38 0 36 0;
#X connect 39 0 38 0;
#X connect 40 0 38 0;
#X connect 41 0 38 0;
#X connect 42 0 38 0;
#X connect 43 0 46 0;
#X connect 44 0 43 0;
#X connect 45 0 43 1;
#X connect 46 0 64 0;
#X connect 47 0 46 1;
#X connect 53 0 54 0;
#X connect 54 0 49 0;
#X connect 54 1 50 0;
#X connect 54 2 51 0;
#X connect 54 3 52 0;
#X connect 54 4 55 0;
#X connect 54 5 56 0;
#X connect 63 0 44 0;
#X connect 64 0 12 0;
#X connect 64 1 60 0;
#X connect 64 2 53 0;
#X connect 65 0 34 0;
#X connect 65 0 32 0;
#X connect 66 0 43 0;
#X connect 70 0 24 0;
#X connect 71 0 38 0;
|