blob: b719a01cb79b01b80d9b81b75897551d725ca9fd (
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
|
#N canvas 271 56 833 785 10;
#X obj -16 -15 cnv 15 700 350 empty empty empty 20 12 0 14 -260097
-66577 0;
#X obj 212 0 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 212 26 metro 40;
#X obj -14 342 cnv 15 621 300 empty empty empty 20 12 0 14 -258113
-66577 0;
#X obj 27 665 pdp_xv;
#X msg 117 649 cursor 1;
#X floatatom 164 495 10 0 0 0 - - -;
#X obj 211 51 pdp_background;
#X obj 209 220 pdp_xv;
#X msg 259 219 cursor 1;
#X msg 303 196 rgb 0 0 0;
#X obj 435 196 loadbang;
#X msg 88 359 bang;
#X text -13 -110 pdp_opencv_cvk : OCR-like pattern recognition;
#X text -13 -88 by damiles : http://blog.damiles.com/?p=93;
#X text -12 -51 adapted to PD by Yves Degoyon ( ydegoyon@gmail.com
);
#X text 239 -2 Hand drawing input;
#X msg 241 137 clear;
#X obj 49 33 openpanel;
#X msg 30 4 bang;
#X obj 29 101 pdp_background;
#X obj 31 178 pdp_imgloader;
#X obj 29 78 metro 40;
#X msg 48 57 load \$1 0 0;
#X floatatom 124 103 5 0 0 0 - - -;
#X obj 57 205 pdp_xv;
#X obj 30 125 pdp_convert image/YCrCb/*;
#X obj 4 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 29 148 pdp_scale 128 128;
#X text 66 4 Test with an image;
#X obj 30 265 pdp_binary;
#X text 345 138 <-- clear the input and try again;
#X obj 208 197 pdp_pen ------;
#X obj 212 78 pdp_convert image/YCrCb/*;
#X text 326 106 <-- this must be the same size as your patterns;
#X obj 212 108 pdp_scale 128 128;
#X obj 145 381 s pclear;
#X obj 284 138 r pclear;
#X obj 87 382 del 1000;
#X msg 370 197 width 8;
#N canvas 5 49 634 415 thingsidontwanttosee 0;
#X msg 267 202 draw \$1 \$2;
#X obj 358 202 unpack f f;
#X obj 343 228 f;
#X obj 370 228 f;
#X msg 380 179 fill \$1 \$2;
#X obj 342 248 pack f f;
#X obj 227 179 route press drag release;
#X obj 230 148 inlet;
#X obj 258 274 outlet;
#X connect 0 0 8 0;
#X connect 1 0 2 1;
#X connect 1 1 3 1;
#X connect 2 0 5 0;
#X connect 3 0 5 1;
#X connect 4 0 8 0;
#X connect 5 0 4 0;
#X connect 6 0 1 0;
#X connect 6 1 0 0;
#X connect 7 0 6 0;
#X restore 256 168 pd thingsidontwanttosee;
#X text 407 167 <-- mouse events;
#X text 241 493 Distance of the incoming frame compared to the patterns
;
#X msg 111 437 load ../plus 50;
#X text 125 360 Compare the incoming frame to the patterns;
#X text 216 415 Load a new set of patterns from a directory;
#X text 217 427 All patterns should be of the same size;
#X obj 20 462 pdp_opencv_knear plus 50;
#X text -13 -99 based on "basic OCR with Open CV tutorial";
#X text -12 -75 The algorithm is internally based on k-nearest classifiers
\, hence the name.;
#X msg 101 412 load ./plus 50;
#X connect 1 0 2 0;
#X connect 2 0 7 0;
#X connect 5 0 4 0;
#X connect 7 0 33 0;
#X connect 8 0 40 0;
#X connect 9 0 8 0;
#X connect 10 0 32 0;
#X connect 11 0 10 0;
#X connect 11 0 39 0;
#X connect 12 0 38 0;
#X connect 12 0 47 0;
#X connect 17 0 32 0;
#X connect 18 0 23 0;
#X connect 19 0 18 0;
#X connect 19 0 22 0;
#X connect 19 0 27 0;
#X connect 20 0 26 0;
#X connect 21 0 30 0;
#X connect 21 0 25 0;
#X connect 22 0 20 0;
#X connect 23 0 21 0;
#X connect 24 0 20 3;
#X connect 26 0 28 0;
#X connect 27 0 22 0;
#X connect 28 0 21 0;
#X connect 30 0 47 0;
#X connect 32 0 8 0;
#X connect 32 0 9 0;
#X connect 32 0 30 0;
#X connect 33 0 35 0;
#X connect 35 0 32 0;
#X connect 37 0 17 0;
#X connect 38 0 36 0;
#X connect 39 0 32 0;
#X connect 40 0 32 0;
#X connect 43 0 47 0;
#X connect 47 0 4 0;
#X connect 47 0 5 0;
#X connect 47 1 6 0;
#X connect 50 0 47 0;
|