aboutsummaryrefslogtreecommitdiff
path: root/externals/gridflow/doc/flow_classes/#moment-help.pd
blob: 0d47f3389b1491e21ce784a57dda207e1e324ae3 (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
#N canvas 663 46 632 642 10;
#X obj 19 44 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1;
#X msg 234 48 4 2 # 1 1 1 -1 -1 -1 -1 1;
#X obj 111 228 display;
#X obj 43 258 display;
#X obj 234 86 #rotate;
#X obj 288 76 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
-241291 -1 -1 -1831 256;
#X obj 288 92 * 100;
#X obj 18 497 #out window;
#X obj 67 181 #t;
#X obj 110 207 #moment;
#X msg 41 105 240 320 1 #;
#X obj 41 124 #draw_polygon put (1 # 255);
#X obj 426 123 #pack;
#X obj 234 105 # +;
#X obj 456 107 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
-241291 -1 -1 -45 256;
#X obj 426 91 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
-241291 -1 -1 12 256;
#X obj 426 72 #pack;
#X obj 456 56 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
-241291 -1 -1 32 256;
#X obj 426 40 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
-241291 -1 -1 49 256;
#X obj 234 67 # *;
#X obj 245 143 # inv+;
#X obj 245 124 # +;
#X obj 426 174 #pack;
#X obj 456 158 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
-241291 -1 -1 149 256;
#X obj 426 142 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -6 0 10
-241291 -1 -1 128 256;
#X obj 41 143 #draw_polygon put (1 # 255);
#X text 162 460 red filter;
#X text 121 105 draw rectangles;
#X text 238 31 rectangle polygon;
#X obj 42 206 #moment 2;
#X obj 269 192 #moment_polar;
#X obj 356 212 display;
#X obj 270 232 display;
#X obj 5 81 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1 -1
;
#X text 141 329 this is a fudge factor.;
#X obj 18 516 fps;
#X floatatom 18 535 5 0 0 0 - - -;
#X text 143 341 depending on what you want to do \,;
#X text 140 353 you set it to 2 \, 3 \, 4 \, whatever.;
#X obj 402 314 #outer + (9000 0);
#X obj 448 378 #transpose;
#X obj 20 80 t b b b;
#X obj 402 490 # + (120 160);
#X obj 63 322 #cast f;
#X obj 63 419 #inner \, seed (f #);
#X obj 402 352 #cast f;
#X obj 402 409 #inner \, seed (f #);
#X obj 402 457 #cast i;
#X obj 63 398 #swap;
#X obj 402 276 #for 0 160 1;
#X obj 63 379 # sqrt (f #);
#X obj 63 341 # * (f # 3);
#X obj 402 429 # / (f # 1000);
#X obj 402 333 # cos* 1000;
#X obj 402 295 # * 225;
#X obj 18 459 #inner (1 3 # 1 0 0);
#X obj 18 478 #draw_polygon + (0 255 255) (2 2 #);
#X obj 19 61 metro 20;
#X obj 18 164 #t;
#X obj 63 360 cv/#SVD;
#X obj 0 0 doc_h;
#X obj 3 559 doc_c 0..1;
#X obj 3 708 doc_i 2;
#X obj 3 818 doc_o 1;
#X obj 14 848 doc_oo 0;
#X obj 14 738 doc_ii 0;
#X obj 14 760 doc_ii 1;
#X obj 14 589 doc_cc 0;
#X obj 0 902 doc_f;
#X obj 0 902 doc_f;
#X obj 97 848 doc_m o0 grid;
#X obj 97 760 doc_m i1 grid;
#X obj 97 738 doc_m i0 grid;
#X obj 97 589 doc_m c0 float;
#X text 232 589 1: average index of the values in the grid \, weighted
by the values themselves.;
#X text 232 624 2: average square of index of the values in the grid
\, weighted by the values themselves. this can be used to compute a
variance (covariance) matrix \, which in turn can be fed to [#moment_polar]
to figure out the standard deviation and the direction of the standard
deviation.;
#X text 232 848 mode 1: a grid[2];
#X text 232 870 mode 2: a grid[2 \, 2];
#X text 232 738 greyscale image;
#X text 232 760 mode 2: alleged centroid (doesn't have to be the real
centroid \, but when it is \, the output will be the variance matrix
\; else it won't be a centred moment);
#X connect 0 0 57 0;
#X connect 1 0 19 0;
#X connect 4 0 13 0;
#X connect 5 0 6 0;
#X connect 6 0 4 1;
#X connect 7 0 35 0;
#X connect 8 0 29 0;
#X connect 8 1 9 0;
#X connect 9 0 2 0;
#X connect 9 0 29 1;
#X connect 9 0 42 1;
#X connect 10 0 11 0;
#X connect 11 0 25 0;
#X connect 12 0 13 1;
#X connect 13 0 21 0;
#X connect 13 0 20 0;
#X connect 14 0 12 1;
#X connect 15 0 12 0;
#X connect 16 0 19 1;
#X connect 17 0 16 1;
#X connect 18 0 16 0;
#X connect 19 0 4 0;
#X connect 20 0 25 2;
#X connect 21 0 11 2;
#X connect 22 0 21 1;
#X connect 22 0 20 1;
#X connect 23 0 22 1;
#X connect 24 0 22 0;
#X connect 25 0 58 0;
#X connect 29 0 3 0;
#X connect 29 0 30 0;
#X connect 29 0 43 0;
#X connect 30 0 32 0;
#X connect 30 1 31 0;
#X connect 33 0 41 0;
#X connect 35 0 36 0;
#X connect 39 0 53 0;
#X connect 40 0 46 1;
#X connect 41 0 49 0;
#X connect 41 1 10 0;
#X connect 41 2 1 0;
#X connect 42 0 56 2;
#X connect 43 0 51 0;
#X connect 44 0 40 0;
#X connect 45 0 46 0;
#X connect 46 0 52 0;
#X connect 47 0 42 0;
#X connect 48 0 44 0;
#X connect 48 1 44 1;
#X connect 49 0 54 0;
#X connect 50 0 48 0;
#X connect 51 0 59 0;
#X connect 52 0 47 0;
#X connect 53 0 45 0;
#X connect 54 0 39 0;
#X connect 55 0 56 0;
#X connect 56 0 7 0;
#X connect 57 0 41 0;
#X connect 58 0 55 0;
#X connect 58 1 8 0;
#X connect 59 0 50 0;
#X connect 59 1 48 1;
#X connect 70 1 76 0;
#X connect 70 1 77 0;
#X connect 71 1 79 0;
#X connect 72 1 78 0;
#X connect 73 1 74 0;
#X connect 73 1 75 0;