aboutsummaryrefslogtreecommitdiff
path: root/externals/gridflow/doc/tutorials/gf_sampling_quantization.pd
blob: 4f60217da2d515ab8ec13ea6e955e7041d883753 (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
#N canvas 740 0 704 805 10;
#X obj 2 5 cnv 15 650 15 empty empty empty 20 12 0 14 -228992 -66577
0;
#X obj 2 -30 cnv 15 700 30 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 0 741 cnv 15 700 30 empty empty empty 20 12 0 14 -233017 -66577
0;
#X text 14 746 GridFlow 0.9.1;
#X text 7 -23 Principles of new media;
#X text 218 152 <-- reduces the size of the image;
#X text 5 3 1.1 sampling;
#X obj 4 314 cnv 15 650 15 empty empty empty 20 12 0 14 -228992 -66577
0;
#X text 7 313 1.2 quantization;
#X text 330 85 <-- change the resampling factor (1 to 8);
#X obj 55 80 #in;
#X obj 55 32 tgl 15 0 empty empty empty 17 7 0 10 -4034 -1 -1 1 1;
#X obj 75 259 #out window \, title sampling;
#X obj 55 204 #scale_by;
#X obj 202 86 hradio 15 1 0 8 empty empty empty 0 -8 0 10 -257985 -1
-1 0;
#X obj 202 108 + 1;
#X obj 202 130 t a a;
#X text 218 152 <-- reduces the size of the image;
#X msg 123 55 open babbage.jpg;
#X obj 55 419 #out window \, title quantization;
#X text 230 53 <-- open image first;
#X floatatom 124 365 5 0 0 0 - - -;
#X obj 24 449 #downscale_by 32 smoothly;
#X obj 25 518 display;
#X obj 34 470 #out window \, title really_small_window;
#X text 133 385 <-- reduces the number of possible pixel values;
#X text 121 201 <-- increases the image size by the same factor \,
letting us see the loss of information from the original image;
#X obj 55 152 #downscale_by \, smoothly;
#X obj 127 343 hsl 128 15 2 16 0 0 empty empty empty -2 -8 0 10 -257985
-1 -1 3300 1;
#X obj 55 54 metro 100;
#X obj 55 385 #posterize 2;
#X text 262 342 <-- number of tones per channel;
#X connect 10 0 27 0;
#X connect 11 0 29 0;
#X connect 13 0 12 0;
#X connect 13 0 30 0;
#X connect 14 0 15 0;
#X connect 15 0 16 0;
#X connect 16 0 27 1;
#X connect 16 1 13 1;
#X connect 18 0 10 0;
#X connect 21 0 30 1;
#X connect 22 0 23 0;
#X connect 22 0 24 0;
#X connect 27 0 13 0;
#X connect 28 0 21 0;
#X connect 29 0 10 0;
#X connect 30 0 19 0;
#X connect 30 0 22 0;