aboutsummaryrefslogtreecommitdiff
path: root/Gem/pix_blob-help.pd
blob: d5058f451dd341462398f4b8011d73409f17705b (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
#N canvas 6 61 489 679 10;
#X declare -lib Gem;
#X msg 142 104 gemList;
#X msg 142 307 gemList;
#X text 169 16 part of GEM;
#X floatatom 186 256 3 0 0 0 - - -;
#X floatatom 164 281 3 0 0 0 - - -;
#X obj 142 207 pix_blob;
#X text 176 43 [pix_blob];
#X text 93 73 get the "center of gravity" of an image;
#X msg 175 133 <mode>;
#X msg 209 173 <color-weights>;
#X floatatom 209 232 3 0 0 0 - - -;
#X text 250 231 size;
#X text 232 261 Y;
#X text 210 282 X;
#X text 52 330 [pix_blob] will calculate the "center-of-gravity" of
a certain (combination of) channel(s).;
#X text 52 391 You can choose the combination of channels used for
the calculation by changing the <mode>. Valid modes are: 0(gray)(default)
\, 1(red) \, 2(green) \, 3(blue) \, 4(alpha);
#X text 56 450 pE: selecting "red" (1) will weight position of each
pixel with its red-value. Pixels with "more" red will be weighted stronger
\, thus moving the "center of gravity" -- the blob position -- nearer
to themselves. The total amount of "red" in the image defines the size
of the blob.;
#X text 58 545 You can specify a custom combination of channels with
<color-weights>. pE: "1 0 2" will give more weight to the blue-channel
than to the red-channel \, green- and alpha-values will be ignored.
;
#X text 56 617 Specifying only one single color-weight <w> \, is the
same as "<w> <w> <w> 0";
#X obj 378 8 declare -lib Gem;
#X connect 0 0 5 0;
#X connect 5 0 1 0;
#X connect 5 1 4 0;
#X connect 5 2 3 0;
#X connect 5 3 10 0;
#X connect 8 0 5 1;
#X connect 9 0 5 2;