Hasil Data Metode Variance Pengenalan Arah Panah Kanan dan Kiri Pada Jarak 30 – 90 Cm ( didalam ruang kerja UPT –PK pukul 15.00 ) •
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek dengan intensitas 94 Lux (mengunakan program yang telah ada) :
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
38 49 39 37 39 39 41 41 42 44
320 320 293 255 320 282 317 279 320 320
239 239 239 239 239 239 239 239 239 239
10199 9667 8441 6447 10142 7928 9945 7680 10105 10099
10240 10240 8585 6503 10240 7953 10049 7785 10240 10240
1 6 2 1 1 1 2 2 2 2
172 154 179 176 177 181 184 177 172 173
216 319 172 174 184 103 73 137 242 234
248 29 717 365 387 1296 1590 915 331 348
36 2372 27 35 34 14 23 19 21 29
86 99 97 91 92 99 99 98 94 92
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kanan kiri kanan kanan kanan kanan kanan kanan kanan kanan
Hasil : Benar = 90 % ; Salah = 10 %
LA-1
•
Threshold
83 86 86 86 87 89 88 93 87 90
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek dengan intensitas 94 Lux (mengunakan program yang telah direvisi) :
MaxV value
Pos MaxV Value
246 245 245 245 244 224 193 241 215 219
145 146 146 146 141 143 142 144 162 162
VarVleft
VarVright
26 23 23 23 22 8 10 7 14 1
39 34 34 34 38 15 15 15 23 48
TolV
MaxH value
Pos MaxH Value
34 33 33 33 43 47 34 54 40 98
184 184 184 184 183 189 189 187 177 179
171 170 170 170 183 102 72 135 241 232
VarHleft
VarHright
650 646 646 646 414 1548 1711 1205 407 357
17 16 16 16 18 13 18 15 21 16
TolH
98 98 98 98 96 100 99 99 95 96
Orientasi Variance
Arah Variance
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal vertical
kanan kanan kanan kanan kanan kanan kanan kanan kanan atas
Hasil : Benar = 90 % ; Salah = 10 %
LA-2
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek dengan intensitas 94 Lux (mengunakan program yang telah ada) :
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
33 34 31 33 34 32 33 32 33 53
244 273 273 276 263 258 290 277 271 320
124 134 132 133 133 134 132 136 133 239
89 10 13 13 12 9 1 12 13 9728
26 269 123 177 55 43 760 296 122 10240
71 97 90 93 79 80 100 96 90 5
176 182 183 182 185 183 184 182 183 146
173 130 135 128 145 151 78 128 136 184
13 15 12 16 18 16 265 13 17 18
465 1248 989 1285 1094 1005 48 1139 1111 496
98 99 99 99 99 99 82 99 99 97
horizontal horizontal horizontal horizontal horizontal horizontal vertical horizontal horizontal horizontal
kiri kiri kiri kiri kiri kiri atas kiri kiri kiri
Hasil : Benar = 90 % ; Salah = 10 %
LA-3
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek dengan intensitas 94 Lux (mengunakan program yang telah direvisi) :
Threshold
89 89 85 88 89 89 88 89 89 98
MaxV value
Pos MaxV Value
241 242 245 242 246 246 226 245 245 194
140 134 135 133 136 136 129 135 133 124
VarVleft
VarVright
2 7 7 11 6 6 0 9 12 11
25 12 12 8 12 15 1 8 7 12
TolV
92 42 42 28 50 60 100 12 42 9
MaxH value
Pos MaxH Value
183 188 190 188 191 190 190 190 189 149
175 133 135 130 146 152 100 130 138 185
VarHleft
VarHright
13 13 17 17 17 17 14 15 14 16
379 995 1305 1320 1293 883 972 1162 1150 463
TolH
Orientasi Variance
Arah Variance
97 99 99 99 99 99 99 99 99 97
horizontal horizontal horizontal horizontal horizontal horizontal vertical horizontal horizontal horizontal
kiri kiri kiri kiri kiri kiri atas kiri kiri kiri
Hasil : Benar = 90 % ; Salah = 10 %
LA-4
•
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan intensitas 92 Lux (mengunakan program yang telah ada) :
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
69 67 70 72 71 63 64 63 61 60 60
320 320 320 320 320 320 320 320 320 320 320
239 239 239 239 239 239 239 239 239 239 239
9565 9642 9454 9221 9130 9128 9812 9140 9659 9425 9570
10240 10240 10240 10240 10240 10240 10240 10240 10240 10240 10240
7 6 8 10 11 11 5 11 6 8 7
233 218 231 226 240 151 157 158 157 155 155
319 319 319 319 319 319 319 319 319 319 319
270 155 475 276 421 30 72 52 97 46 51
5429 4753 5337 5108 5760 2281 2465 2497 2465 2403 2403
96 97 92 95 93 99 98 98 97 99 98
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri kiri kiri kiri kiri kiri kiri
Hasil : Benar = 0 % ; Salah = 100 %
LA-5
•
Threshold
117 114 122 125 128 119 120 121 116 118 119
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan intensitas 92 Lux (mengunakan program yang telah direvisi) :
MaxV value
Pos MaxV Value
145 145 145 127 139 142 125 140 123 142 142
157 154 156 149 156 113 106 114 105 110 110
VarVleft
VarVright
9 12 12 13 10 8 10 8 8 9 10
15 14 12 15 18 18 18 15 17 18 15
TolV
MaxH value
Pos MaxH Value
40 15 0 14 45 56 45 47 53 50 34
110 111 107 97 107 113 96 112 99 110 111
198 211 180 180 132 185 131 162 111 120 122
VarHleft
VarHright
395 343 228 360 431 386 386 448 400 465 417
20 19 17 21 22 26 22 24 23 22 18
TolH
Orientasi Variance
Arah Variance
95 95 93 95 95 94 95 95 95 96 96
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kanan kanan kanan kanan kanan kanan kanan kanan kanan kanan kanan
Hasil : Benar = 100 % ; Salah = 0 %
LA-6
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan intensitas 92 Lux (mengunakan program yang telah ada) :
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
71 69 74 76 75 74 75 75 75 77
320 320 320 320 320 320 320 320 320 320
239 239 239 239 239 239 239 239 239 239
9531 9230 8929 9206 9292 9407 9278 9270 9394 9317
10240 10240 10240 10240 10240 10240 10240 10240 10240 10240
7 10 13 11 10 9 10 10 9 10
217 230 238 218 224 208 218 231 222 221
319 319 319 319 319 319 319 319 319 319
238 313 240 129 235 208 289 386 258 272
4709 5290 5665 4753 5018 4327 4753 5337 4929 4885
95 95 96 98 96 96 94 93 95 95
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-7
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan intensitas 92 Lux (mengunakan program yang telah direvisi) :
Threshold
123 121 125 136 134 133 134 135 135 136
MaxV value
Pos MaxV Value
128 127 140 125 144 126 126 145 142 127
144 143 147 143 147 143 142 145 146 143
VarVleft
VarVright
11 13 11 13 7 8 11 13 12 10
11 11 10 11 12 12 11 12 10 10
TolV
0 16 10 16 42 34 0 8 17 0
MaxH value
Pos MaxH Value
VarHleft
VarHright
99 98 109 96 111 97 97 111 109 98
147 125 109 118 148 133 126 118 140 145
22 19 17 18 16 17 17 14 18 17
366 369 319 268 374 270 246 336 453 273
TolH
Orientasi Variance
Arah Variance
94 95 95 94 96 94 94 96 97 94
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-8
•
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 90 cm antara kamera dan objek dengan intensitas 90 Lux (mengunakan program yang telah ada) :
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
61 60 56 56 58 56 57 54 56 56
320 320 320 320 320 320 320 320 320 320
239 239 239 239 239 239 239 239 239 239
8928 9098 9025 9185 9091 8496 8831 9214 9427 9184
10240 10240 10240 10240 10240 10240 10240 10240 10240 10240
13 12 12 11 12 18 14 11 8 11
182 180 180 184 182 183 184 169 184 187
319 319 319 319 319 319 319 319 319 319
109 98 139 258 186 149 154 88 186 210
3313 3240 3240 3386 3313 3349 3386 2857 3386 3497
97 97 96 93 95 96 96 97 95 94
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri kiri kiri kiri kiri kiri
Hasil : Benar = 0 % ; Salah = 100 %
LA-9
•
Threshold
99 98 97 95 99 96 97 95 97 96
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 90 cm antara kamera dan objek dengan intensitas 90 Lux (mengunakan program yang telah direvisi) :
MaxV value
Pos MaxV Value
91 91 93 83 93 90 92 92 106 92
105 105 102 99 102 103 104 102 215 104
VarVleft
VarVright
11 12 14 10 15 12 11 10 1125 10
15 17 18 18 16 17 15 17 1180 18
TolV
27 30 23 45 7 30 27 42 5 45
MaxH value 69 68 70 63 69 67 69 70 64 69
Pos MaxH Value 224 222 151 150 154 158 165 153 102 141
VarHleft
VarHright
138 181 181 153 176 184 219 187 145 165
17 19 20 19 16 19 24 21 21 16
TolH
Orientasi Variance
Arah Variance
88 90 89 88 91 90 90 89 86 91
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kanan kanan kanan kanan kanan kanan kanan kanan kanan kanan
Hasil : Benar = 100 % ; Salah = 0 %
LA-10
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 90 cm antara kamera dan objek dengan intensitas 90 Lux (mengunakan program yang telah ada) :
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
64 57 60 56 59 58 57 56 59 59
320 320 320 320 320 320 320 320 320 320
239 239 239 239 239 239 239 239 239 239
9429 8442 9045 9415 8813 8797 8891 8625 8749 8922
10240 10240 10240 10240 10240 10240 10240 10240 10240 10240
8 18 12 9 14 15 14 16 15 13
188 165 181 176 187 170 182 171 175 186
319 319 319 319 319 319 319 319 319 319
88 66 130 130 211 64 116 90 127 190
3535 2723 3277 3098 3497 2890 3313 2925 3063 3460
98 98 97 96 94 98 97 97 96 95
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-11
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 90 cm antara kamera dan objek dengan intensitas 90 Lux (mengunakan program yang telah direvisi) :
Threshold
100 95 98 97 98 94 94 99 99
MaxV value 89 92 91 92 91 91 92 92 92
Pos MaxV Value 103 100 100 97 100 101 99 98 101
VarVleft
VarVright
13 13 15 11 10 12 13 10 13
16 16 11 13 10 12 12 12 12
TolV
19 19 27 16 0 0 8 17 8
MaxH value 69 70 69 69 70 68 70 71 70
Pos MaxH Value 252 182 214 133 165 204 178 161 162
VarHleft
VarHright
20 25 18 17 18 19 21 26 21
146 199 126 113 131 153 124 211 166
TolH
Orientasi Variance
Arah Variance
87 88 86 85 87 88 84 88 88
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-12
Hasil Data Metode Variance Pengenalan Arah Panah Kanan dan Kiri Pada Jarak 30 – 60 Cm ( didepan gudang syadhan pukul 14.00 – 17.00 dengan intensitas 750 – 1320 Lux ) •
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek (mengunakan program yang telah ada) :
Threshold 42 44 38 37 101
MaxV value
Pos MaxV Value
312 320 281 278 320
239 239 150 2 239
VarVleft
VarVright
5027 6807 12 17148 7524
9735 10240 15 659 10240
TolV 49 34 20 97 27
MaxH value
Pos MaxH Value
VarHleft
VarHright
240 224 240 240 240
314 2 317 319 319
9 1318 8 3712 0
14836 5098 13329 5760 5760
TolH
Orientasi Variance
Arah Variance
100 100 100 36 100
horizontal horizontal horizontal vertical horizontal
kiri kanan kiri bawah kiri
Hasil : Benar = 20 % ; Salah = 80 %
LA-13
•
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek (mengunakan program yang telah direvisi) :
Threshold 105 104 104 101 102
MaxV value
Pos MaxV Value
270 274 274 264 271
177 167 167 142 142
VarVleft
VarVright
10 10 10 6 9
13 14 14 13 10
TolV
MaxH value
Pos MaxH Value
24 29 29 54 10
176 187 187 208 209
134 175 175 163 150
VarHleft
VarHright
841 660 660 1388 1745
6 6 6 19 11
TolH 100 100 100 99 100
Orientasi Variance
Arah Variance
horizontal horizontal horizontal horizontal horizontal
kanan kanan kanan kanan kanan
Hasil : Benar = 100 % ; Salah = 0 %
LA-14
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 30 cm antara kamera dan (mengunakan program yang telah ada) :
Threshold
41 46 38 42 103
MaxV value
Pos MaxV Value
320 320 309 320 320
239 239 239 239 239
VarVleft
VarVright
7304 6890 7238 7743 5891
10240 10240 9549 10240 10240
TolV
MaxH value
Pos MaxH Value
29 33 25 25 43
240 240 240 240 240
308 319 318 319 319
VarHleft
VarHright
2647 9 2173 2603 0
3 5760 10198 5760 5760
TolH
100 100 79 55 100
Orientasi Variance
Arah Variance
horizontal horizontal horizontal horizontal horizontal
kanan kiri kiri kiri kiri
Hasil : Benar = 80 % ; Salah = 20 %
LA-15
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 30 cm antara kamera dan (mengunakan program yang telah direvisi) :
Threshold
111 118 107 111 104
MaxV value
Pos MaxV Value
229 226 246 236 242
127 124 128 125 135
VarVleft
VarVright
8 7 10 11 0
11 12 11 12 13
TolV
28 42 10 9 100
MaxH value
Pos MaxH Value
177 176 191 181 196
160 157 159 164 112
VarHleft
VarHright
19 19 21 18 20
990 1193 1252 954 1251
TolH
Orientasi Variance
Arah Variance
99 99 99 99 99
horizontal horizontal horizontal horizontal vertical
kiri kiri kiri kiri atas
Hasil : Benar = 80 % ; Salah = 20 %
LA-16
•
Threshold
58 58 56 56 57
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 40 cm antara kamera dan objek dan (mengunakan program yang telah ada) :
MaxV value
Pos MaxV Value
320 320 320 320 320
239 239 239 239 239
VarVleft
VarVright
2677 2185 3685 4045 4013
10240 10240 10240 10240 10240
TolV
MaxH value
Pos MaxH Value
74 79 65 61 61
240 240 240 240 240
319 319 319 319 319
VarHleft
VarHright
0 0 0 0 0
5760 5760 5760 5760 5760
TolH
100 100 100 100 100
Orientasi Variance
Arah Variance
horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri
Hasil : Benar = 0 % ; Salah = 100 %
LA-17
•
Threshold
131 132 127 128 129
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 40 cm antara kamera dan objek dan (mengunakan program yang telah direvisi) :
MaxV value
Pos MaxV Value
168 163 179 192 186
112 111 117 118 118
VarVleft
VarVright
9 9 7 9 10
14 17 13 14 14
TolV
MaxH value
Pos MaxH Value
36 48 47 36 29
132 127 140 150 146
168 171 184 144 168
VarHleft
VarHright
723 824 821 1097 820
23 23 23 19 21
TolH
Orientasi Variance
Arah Variance
97 98 98 99 98
horizontal horizontal horizontal horizontal horizontal
kanan kanan kanan kanan kanan
Hasil : Benar = 100 % ; Salah = 0 %
LA-18
•
Threshold
54 53 50 53 54
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 40 cm antara kamera dan objek (mengunakan program yang telah ada) :
MaxV value
Pos MaxV Value
320 320 320 320 320
239 239 239 239 239
VarVleft
VarVright
2206 3505 3670 3791 3697
10240 10240 10240 10240 10240
TolV
MaxH value
Pos MaxH Value
79 66 65 63 64
240 240 240 240 240
319 319 319 319 319
VarHleft
VarHright
0 0 0 0 0
5760 5760 5760 5760 5760
TolH
100 100 100 100 100
Orientasi Variance
Arah Variance
horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-19
•
Threshold
121 114 117 120 120
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 40 cm antara kamera dan objek (mengunakan program yang telah direvisi) :
MaxV value
Pos MaxV Value
149 189 190 191 195
105 116 115 115 116
VarVleft
VarVright
11 7 9 11 11
13 15 17 11 12
TolV
MaxH value
Pos MaxH Value
16 54 48 0 9
116 149 149 150 153
147 107 139 132 123
VarHleft
VarHright
22 21 22 19 21
526 760 1118 834 949
TolH
Orientasi Variance
Arah Variance
96 98 99 98 98
horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-20
•
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 50 cm antara kamera dan objek (mengunakan program yang telah ada) :
Threshold
52 47 48 49 53
MaxV value
Pos MaxV Value
320 320 320 320 320
239 239 239 239 239
VarVleft
VarVright
0 0 0 192 218
10240 10240 10240 10240 10240
TolV
100 100 100 99 98
MaxH value
Pos MaxH Value
240 240 240 240 240
319 319 319 319 319
VarHleft
VarHright
0 0 0 0 0
5760 5760 5760 5760 5760
TolH
100 100 100 100 100
Orientasi Variance
Arah Variance
vertical vertical vertical horizontal horizontal
atas atas atas kiri kiri
Hasil : Benar = 0 % ; Salah = 100 %
LA-21
•
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 50 cm antara kamera dan objek (mengunakan program yang telah direvisi) :
Threshold
125 116 119 118
MaxV value
Pos MaxV Value
143 149 123 146
120 125 111 128
VarVleft
VarVright
9 7 9 7
18 18 15 19
TolV
MaxH value
Pos MaxH Value
50 62 40 64
108 113 94 110
159 122 121 123
VarHleft
VarHright
332 339 297 367
19 21 20 20
TolH
Orientasi Variance
Arah Variance
95 94 94 95
horizontal horizontal horizontal horizontal
kanan kanan kanan kanan
Hasil : Benar = 100 % ; Salah = 0 %
LA-22
•
Threshold
49 52 54 50 54
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 50 cm antara kamera dan objek (mengunakan program yang telah ada) :
MaxV value
Pos MaxV Value
320 320 320 320 320
239 239 239 239 239
VarVleft
VarVright
33 672 0 159 0
10240 10240 10240 10240 10240
TolV
100 94 100 99 100
MaxH value
Pos MaxH Value
240 240 240 240 240
319 319 319 319 319
VarHleft
VarHright
0 0 0 0 0
5760 5760 5760 5760 5760
TolH
100 100 100 100 100
Orientasi Variance
Arah Variance
vertical horizontal vertical horizontal vertical
atas kiri atas kiri atas
Hasil : Benar = 40 % ; Salah = 60 %
LA-23
•
Threshold
121 125 126 123 127
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 50 cm antara kamera dan objek (mengunakan program yang telah direvisi) :
MaxV value
Pos MaxV Value
155 175 150 165 152
109 118 108 115 109
VarVleft
VarVright
16 14 12 7 10
12 13 16 13 12
TolV
MaxH value
Pos MaxH Value
25 8 25 47 17
119 133 115 127 117
183 166 127 180 146
VarHleft
VarHright
22 15 18 19 22
434 585 379 497 532
TolH
Orientasi Variance
Arah Variance
95 98 96 97 96
horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-24
•
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek (mengunakan program yang telah ada) :
Threshold MaxV value 78 61 67 60 62
305 320 319 320 320
Pos MaxV VarVleft Value 238 239 239 239 239
4 29 9 13 14
VarVright TolV 16484 10240 10177 10240 10240
100 100 100 100 100
MaxH value 240 240 240 240 240
Pos MaxH VarHleft Value 319 319 318 319 319
0 0 0 0 0
VarHright TolH 5760 5760 10198 5760 5760
100 100 100 100 100
Orientasi Variance vertical vertical vertical vertical vertical
Arah Variance atas atas atas atas atas
Hasil : Benar = 0 % ; Salah = 100 %
LA-25
•
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek (mengunakan program yang telah direvisi) :
Threshold
164 126 138 124 125
MaxV value
Pos MaxV Value
120 137 144 141 147
105 88 91 91 92
VarVleft
VarVright
9 9 10 10 12
12 14 18 14 15
TolV
MaxH value
Pos MaxH Value
25 36 45 29 20
113 109 113 112 117
169 159 149 163 162
VarHleft
VarHright
535 468 617 397 540
29 19 22 20 25
TolH
Orientasi Variance
Arah Variance
95 96 97 95 96
horizontal horizontal horizontal horizontal horizontal
kanan kanan kanan kanan kanan
Hasil : Benar = 100 % ; Salah = 0 %
LA-26
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek (mengunakan program yang telah ada) :
Threshold 84 78 75 74 77
MaxV value 320 320 320 320 320
Pos MaxV Value 239 239 239 239 239
VarVleft
VarVright
106 25 17 29 269
10240 10240 10240 10240 10240
MaxH value
TolV 99 100 100 100 98
240 240 240 240 240
Pos MaxH Value
VarHleft
VarHright
0 0 0 1 0
5760 5760 5760 5760 5760
319 319 319 319 319
TolH 100 100 100 100 100
Orientasi Variance
Arah Variance
horizontal vertical vertical vertical horizontal
kiri atas atas atas kiri
Hasil : Benar = 40 % ; Salah = 60 %
LA-27
•
Threshold
152 139 140 141 141
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 50 cm antara kamera dan objek (mengunakan program yang telah direvisi) :
MaxV value 146 144 142 143 151
Pos MaxV Value 88 87 87 88 90
VarVleft
VarVright
10 11 10 9 10
19 19 17 17 15
TolV
MaxH value
Pos MaxH Value
48 43 42 48 34
113 112 110 111 118
175 192 169 141 153
VarHleft
VarHright
25 23 21 20 21
617 595 498 486 580
TolH
Orientasi Variance
Arah Variance
96 97 96 96 97
horizontal horizontal horizontal horizontal horizontal
kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-28
Hasil Data Metode Momen Pengenalan Arah Panah Kanan dan Kiri Pada Jarak 30 – 90 Cm ( didalam ruang kerja UPT –PK pukul 15.00 ) •
Hasil data momen arah panah kanan untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek dengan intensitas 94 Lux (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
42 35 35 36 44 35 35 35 35 35
2397 4399 4346 3870 3434 4981 2907 3853 4970 5185
4817 4632 3130 4824 5295 3682 4225 4682 4339 2810
5892 8318 11051 7504 5660 9831 8656 6700 9530 12462
11631 7352 6514 8316 9998 6312 8763 8737 6633 5427
vertical vertical vertical vertical vertical vertical vertical vertical vertical vertical
bawah bawah bawah bawah bawah bawah bawah bawah bawah bawah
Hasil : Benar = 0 % ; Salah = 100 %
LA-29
•
Hasil data momen arah panah kiri untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek dengan intensitas 94 Lux (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
43 39 40 43 39 35 37 43 37 35
2100 2396 2350 1694 2876 4918 5285 2566 5123 4826
6269 5298 5565 5140 5482 3931 3884 5567 4622 3855
4085 5075 4623 5074 5427 9348 10855 5326 9237 9533
11809 11381 11486 12756 10569 7235 5726 11265 6821 7252
vertical vertical vertical vertical vertical vertical vertical vertical vertical vertical
bawah bawah bawah bawah bawah bawah bawah bawah bawah bawah
Hasil : Benar = 0 % ; Salah = 100 %
LA-30
•
Hasil data momen arah panah kanan untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan intensitas 92 Lux (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
75 73 72 72 70 76 72 72 69 74 75
7614 5314 5191 6123 5441 4232 5289 5176 6785 6196 5464
5366 8287 10323 6818 7901 10186 9168 9027 9419 8751 9477
6593 7479 7331 6933 7360 8405 8165 8085 8425 6788 7202
7879 7510 6469 7786 7748 7011 7519 7312 7261 6804 6568
vertical horizontal horizontal vertical horizontal horizontal horizontal horizontal horizontal horizontal horizontal
bawah kanan kanan bawah kanan kanan kanan kanan kanan kanan kanan
Hasil : Benar = 80 % ; Salah = 20 %
LA-31
•
Hasil data momen arah panah kiri untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan intensitas 92 Lux (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
74 75 74 75 72 77 76 78 74 75
8383 6327 6900 7433 7473 3955 6114 6192 6253 8440
6240 7572 6956 7318 6372 10616 8145 7962 8655 7110
6133 7402 7133 6481 6647 7589 7154 7110 6631 6356
7726 7876 7940 7121 8000 7455 7638 7609 7060 7349
vertical vertical vertical vertical vertical horizontal horizontal horizontal horizontal vertical
atas bawah bawah atas bawah kanan kanan kanan kanan atas
Hasil : Benar = 0 % ; Salah = 100 %
LA-32
•
Hasil data momen arah panah kanan untuk pengambilan gambar dengan jarak 90 cm antara kamera dan objek dengan intensitas 90 Lux (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
57 55 56 54 54 55 55 55 56 56 54
7995 8843 9038 9055 8942 8893 9062 8691 8408 8375 8763
13634 14338 13952 14615 13950 14028 15188 14388 13906 14261 15020
1454 1337 1254 1066 1273 1405 976 1153 1140 1355 1052
2053 2412 2319 2506 2196 2484 2531 2487 2284 2312 2231
vertical vertical vertical vertical vertical vertical vertical vertical vertical vertical vertical
atas atas atas atas atas atas atas atas atas atas atas
Hasil : Benar = 0 % ; Salah = 100 %
LA-33
•
Hasil data momen arah panah kiri untuk pengambilan gambar dengan jarak 90 cm antara kamera dan objek dengan intensitas 90 Lux (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
59 59 56 59 56 58 59 58 60 58
7983 8329 8170 8687 7797 7668 8164 7931 8275 7603
13389 13872 14267 13982 14434 13747 13859 13922 14246 14309
1510 1592 988 1540 976 1327 1589 1539 1573 1224
2103 2226 2427 2148 2344 2125 2221 2093 2399 2145
vertical vertical vertical vertical vertical vertical vertical vertical vertical vertical
atas atas atas atas atas atas atas atas atas atas
Hasil : Benar = 0 % ; Salah = 100 %
LA-34
Hasil Data Metode Momen Pengenalan Arah Panah Kanan dan Kiri Pada Jarak 30 – 60 Cm ( didepan gudang syadhan pukul 14.00 – 17.00 ) •
Hasil data momen arah panah kanan untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
48 55 70 62 82
7428 4571 8869 4179 8059
4209 4892 3981 3990 6634
9496 8495 10448 8965 10380
4206 7604 3045 8279 3421
horizontal vertical horizontal vertical horizontal
kiri bawah kiri bawah kiri
Hasil : Benar = 0 % ; Salah = 100 %
LA-35
•
Hasil data momen arah panah kiri untuk pengambilan gambar dengan jarak 30 cm antara kamera (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
72 59 74 32 50
4325 6940 7704 5759 6420
9230 7389 8560 7913 5489
7954 9753 6852 7083 7862
10278 5351 6534 8082 5287
vertical horizontal vertical vertical horizontal
bawah kiri atas bawah kiri
Hasil : Benar = 40 % ; Salah = 60 %
LA-36
•
Hasil data momen arah panah kanan untuk pengambilan gambar dengan jarak 40 cm antara kamera dan objek (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
93 101 79 93 70
8723 9727 7399 10507 6820
8305 6729 6706 6503 7507
7609 8197 8356 7402 8748
3548 4589 4425 3894 7393
vertical vertical horizontal vertical vertical
atas atas kiri atas bawah
Hasil : Benar = 0 % ; Salah = 100 %
LA-37
•
Hasil data momen arah panah kiri untuk pengambilan gambar dengan jarak 40 cm antara kamera dan objek (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
51 74 64 75 81
4509 4569 9439 3449 9083
1792 9255 4356 10338 5778
8724 5356 4930 6984 5772
3656 6843 1426 6746 2279
vertical horizontal vertical horizontal vertical
bawah kanan atas kanan atas
Hasil : Benar = 0 % ; Salah = 100 %
LA-38
•
Hasil data momen arah panah kanan untuk pengambilan gambar dengan jarak 50 cm antara kamera dan objek (mengunakan program yang telah ada) : •
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
43 42 47 44 44
8721 9453 10126 8742 9275
8126 7283 6429 7626 7822
14976 14418 12416 11826 12498
13882 12697 9261 11402 11417
vertical vertical vertical vertical vertical
bawah bawah bawah bawah bawah
Hasil : Benar = 0 % ; Salah = 100 %
LA-39
•
Hasil data momen arah panah kiri untuk pengambilan gambar dengan jarak 50 cm antara kamera dan objek (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
46 44 45 45 49
10065 9578 8623 8341 8604
8476 9285 10551 11036 10273
13621 13019 11893 11651 7916
13146 12432 12213 12764 11233
vertical vertical vertical vertical horizontal
bawah bawah bawah bawah kanan
Hasil : Benar = 0 % ; Salah = 100 %
LA-40
•
Hasil data momen arah panah kanan untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
83 80 81 84 81
10669 10150 10579 10956 10263
14570 14373 13952 14091 13585
3821 3172 4208 5318 3644
5745 3628 5129 5271 4611
vertical vertical vertical vertical vertical
atas atas atas atas atas
Hasil : Benar = 0 % ; Salah = 100 %
LA-41
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 50 cm antara kamera dan objek (mengunakan program yang telah ada) :
Treshold
Top left
Top right
bottom left
bottom right
orientasi momen
arah momen
82 82 82 81 79
9032 9092 8491 8318 8826
13786 13946 14159 13858 13661
4458 4737 5205 4736 4265
5143 5095 5155 5121 4951
vertical vertical vertical vertical vertical
atas atas atas atas atas
Hasil : Benar = 0 % ; Salah = 100 %
LA-42
Hasil Data Metode Variance Pengenalan Arah Panah Kanan dan Kiri Pada Jarak 30 – 90 Cm menggunaka cutting image (didalam ruang kerja UPT –PK pukul 15.00) •
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek dengan intensitas 94 Lux (xmin = 45; xmax = 220; ymin= 50; ymax= 275):
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
39 37 37 39 39 41 41 42 44 39
226 226 226 218 188 186 204 194 195 226
153 152 152 156 134 133 144 118 127 153
0 0 0 0 15 14 10 140 8 0
15 15 15 17 35 372 15 170 82 15
100 100 100 100 58 97 34 18 91 100
173 172 172 176 175 176 171 171 172 173
174 174 174 184 108 77 139 242 234 174
460 426 426 443 236 206 434 386 410 460
24 23 23 34 24 18 12 21 29 24
95 95 95 93 90 92 98 95 93 95
vertical vertical vertical vertical horizontal vertical horizontal horizontal horizontal vertical
atas atas atas atas kanan atas kanan kanan kanan atas
Hasil : Benar = 40 % ; Salah = 60 %
LA-43
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek dengan intensitas 94 Lux (xmin = 45; xmax = 220; ymin= 50; ymax= 275) :
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
89 89 85 88 89 89 88 89 89 98
241 242 245 242 246 246 226 245 245 194
140 134 135 133 136 136 129 135 133 124
2 7 7 11 6 6 0 9 12 11
25 12 12 8 12 15 1 8 7 12
92 42 42 28 50 60 100 12 42 9
183 188 190 188 191 190 190 190 189 149
175 133 135 130 146 152 100 130 138 185
13 13 17 17 17 17 14 15 14 16
379 995 1305 1320 1293 883 972 1162 1150 463
97 99 99 99 99 99 99 99 99 97
horizontal horizontal horizontal horizontal horizontal horizontal vertical horizontal horizontal horizontal
kiri kiri kiri kiri kiri kiri atas kiri kiri kiri
Hasil : Benar = 90 % ; Salah = 10 %
LA-44
•
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan intensitas 92 Lux (xmin = 52; xmax = 200; ymin= 80; ymax= 235) :
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
69 67 70 72 71 63 64 63 61 60 69
137 137 137 139 139 137 140 138 139 138 137
166 165 165 152 155 123 105 114 105 109 166
0 1 0 1 16 1 52 9 33 81 0
99 210 35 17 15 52 15 17 18 15 99
100 100 100 95 7 99 72 48 46 82 100
64 64 64 69 99 96 93 94 92 98 64
137 148 125 134 219 187 131 162 112 122 137
332 333 217 361 950 287 300 244 373 341 332
282 267 277 323 1239 8 20 7 23 6 282
16 20 22 11 24 98 94 98 94 99 16
vertical vertical vertical vertical horizontal vertical horizontal horizontal horizontal horizontal vertical
atas atas atas atas kiri atas kanan kanan kanan kanan atas
Hasil : Benar = 40 % ; Salah = 60 %
LA-45
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan intensitas 92 Lux (xmin = 52; xmax = 200; ymin= 80; ymax= 235) :
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
71 71 74 76 75 74 75 75 75 77
132 132 139 140 143 140 140 138 138 136
144 144 160 156 146 149 154 169 153 142
12 12 1 1 14 1 0 0 1 23
8 8 1 2 13 12 11 171 12 10
34 34 0 50 8 92 100 100 92 57
63 63 99 99 58 62 67 64 60 61
111 111 218 206 105 96 208 83 101 104
203 203 217 249 170 382 678 1059 373 394
397 397 2155 1789 341 126 30 134 163 225
49 49 90 87 51 68 96 88 57 43
horizontal horizontal horizontal Horizontal Horizontal vertical vertical vertical vertical vertical
kiri Kiri Kiri Kiri Kiri atas atas atas atas bawah
Hasil : Benar = 50 % ; Salah = 50 %
LA-46
•
Hasil data variance arah panah kanan untuk pengambilan gambar dengan jarak 90 cm antara kamera dan objek dengan intensitas 90 Lux (xmin = 90; xmax = 200; ymin= 120; ymax= 200):
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
61 60 56 56 58 56 57 54 56 56
88 88 91 82 91 89 87 90 89 89
117 117 102 99 102 103 109 102 97 103
0 1 11 13 11 13 1 10 1306 13
98 122 19 16 17 18 29 15 9 15
100 100 43 19 36 28 97 34 100 14
48 48 44 38 45 45 46 44 38 46
136 130 150 150 153 157 163 153 200 200
7 8 47 52 50 47 45 59 0 478
2 1 4 5 5 5 5 5 145 212
72 88 92 91 90 90 89 92 100 56
vertical vertical horizontal horizontal horizontal horizontal vertical horizontal vertical horizontal
atas atas kanan kanan kanan kanan atas kanan bawah kanan
Hasil : Benar = 60 % ; Salah = 40 %
LA-47
•
Hasil data variance arah panah kiri untuk pengambilan gambar dengan jarak 90 cm antara kamera dan objek dengan intensitas 90 Lux (xmin = 90; xmax = 200; ymin= 120; ymax= 200) :
Threshold
MaxV value
Pos MaxV Value
VarVleft
VarVright
TolV
MaxH value
Pos MaxH Value
VarHleft
VarHright
TolH
Orientasi Variance
Arah Variance
64 57 57 56 59 58 57 56 59 59
97 80 80 89 87 83 83 86 83 82
118 105 105 99 100 103 102 99 100 106
1 2 2 0 21 21 12 13 12 2
1 10 10 1 12 9 6 11 9 14
0 80 80 100 43 58 50 16 25 86
51 46 46 44 46 48 49 46 45 48
180 182 182 200 164 131 150 176 161 161
13 7 7 190 6 1 1 8 8 8
1 47 47 194 28 1 2 48 52 47
93 86 86 3 79 0 50 84 85 83
horizontal horizontal horizontal vertical horizontal vertical vertical horizontal horizontal vertical
kanan kiri kiri atas kiri bawah bawah kiri kiri atas
Hasil : Benar = 50 % ; Salah = 50 %
LA-48
Hasil Data Metode Variance Pengenalan Arah Panah Kanan dan Kiri Pada Jarak 60 Cm dengan Lantai Berwarna Hitam dan Latar belakang berwarna (didalam ruang kerja UPT –PK pukul 16.00) •
Hasil data variance arah panah kanan dan kiri untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan Lantai Hitam dan Latar Belakang Berwarna Biru dengan intensitas 66 Lux:
Threshold
92 104 99 100 102 106 104 102 103 101
MaxV value
Pos MaxV Value
143 141 140 141 142 139 139 137 140 139
115 116 117 119 115 117 116 117 116 117
VarVleft
VarVright
36 31 37 34 34 28 31 24 28 26
28 27 27 28 30 27 26 25 26 27
TolV
MaxH value
Pos MaxH Value
23 13 28 18 12 4 17 4 8 4
108 107 107 107 109 107 108 105 107 109
137 196 120 199 105 130 165 101 161 88
VarHleft
VarHright
446 348 406 402 393 44 43 46 48 47
47 45 47 44 48 233 318 275 351 321
TolH
Orientasi Variance
Arah Variance
90 88 89 90 88 82 87 84 87 86
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kanan kanan kanan kanan kanan kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-49
•
Hasil data variance arah panah kanan dan kiri untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan Lantai Hitam dan Latar Belakang Berwarna Kuning dengan intensitas 66 Lux:
Threshold
91 95 89 87 95 89 87 89 89 90
MaxV value
Pos MaxV Value
141 142 139 143 139 137 140 137 134 134
116 116 117 116 119 118 114 116 119 116
VarVleft
VarVright
34 34 36 34 33 34 44 33 18 31
27 31 29 25 27 23 25 30 23 23
TolV
MaxH value
Pos MaxH Value
21 9 20 27 19 33 44 10 22 26
107 107 106 108 105 104 106 107 107 103
127 167 122 125 205 164 166 206 63 199
VarHleft
VarHright
417 334 302 421 251 43 47 46 46 45
45 45 43 45 40 273 244 355 183 270
TolH
Orientasi Variance
Arah Variance
90 87 86 90 85 85 81 88 75 84
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kanan kanan kanan kanan kanan kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-50
•
Hasil data variance arah panah kanan dan kiri untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan Lantai Hitam dan Latar Belakang Berwarna Merah dengan intensitas 66 Lux:
Threshold
107 102 106 104 102 105 106 103 103 99
MaxV value
Pos MaxV Value
132 128 131 135 131 132 130 134 134 132
115 115 114 115 112 116 114 114 116 115
VarVleft
VarVright
33 25 37 35 37 30 30 34 28 29
23 25 31 31 24 30 23 25 28 23
TolV
MaxH value
Pos MaxH Value
31 0 17 12 36 0 24 27 0 21
101 99 101 102 102 102 100 103 105 102
152 215 106 184 95 150 98 195 76 173
VarHleft
VarHright
299 287 344 319 310 47 48 46 46 43
46 48 47 43 49 284 231 223 297 180
TolH
Orientasi Variance
Arah Variance
85 84 87 87 85 84 80 80 85 77
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kanan kanan kanan kanan kanan kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-51
•
Hasil data variance arah panah kanan dan kiri untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan Lantai Hitam dan Latar Belakang Berwarna Warna-Warni dengan intensitas 66 Lux:
Threshold
MaxV value
106 103 90 106 89 109 109 105 91 94
147 146 142 144 144 144 145 138 144 142
Pos MaxV VarVleft VarVright Value 116 116 117 118 116 117 117 116 116 118
37 36 38 33 32 27 28 28 35 24
31 27 31 27 26 24 28 20 25 23
TolV
MaxH value
17 25 19 19 19 12 0 29 29 5
113 110 109 110 113 111 113 107 109 112
Pos MaxH VarHleft VarHright Value 141 184 102 177 79 114 155 92 199 80
378 449 481 329 409 46 46 52 44 38
45 48 48 40 47 247 344 341 440 364
TolH
Orientasi Variance
Arah Variance
89 90 91 88 89 82 87 85 90 90
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kanan kanan kanan kanan kanan kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-52
•
Hasil data variance arah panah kanan dan kiri untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan Lantai Hitam dan Latar Belakang Berwarna Hitam dengan intensitas 66 Lux:
Threshold
79 76 73 74 76 84 83 82 80 73
MaxV value
Pos MaxV Value
166 165 166 164 157 154 151 152 153 151
122 125 121 122 121 118 119 118 120 117
VarVleft
VarVright
25 31 30 28 23 30 28 25 26 28
33 35 29 33 26 32 30 28 33 25
TolV
MaxH value
Pos MaxH Value
25 12 4 16 12 7 7 11 22 11
127 127 127 127 121 119 118 118 120 119
147 151 127 138 193 154 184 202 109 105
VarHleft
VarHright
593 626 599 749 539 43 41 44 46 49
43 40 44 54 52 392 408 358 488 388
TolH
Orientasi Variance
Arah Variance
93 94 93 93 91 90 90 88 91 88
horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal horizontal
kanan kanan kanan kanan kanan kiri kiri kiri kiri kiri
Hasil : Benar = 100 % ; Salah = 0 %
LA-53
Hasil Data Metode Variance Bentuk Ukuran Panah Kanan dan Kiri Pada Jarak 60 Cm (didalam ruang kerja UPT –PK pukul 18.15 dengan intensitas 99 Lux ) •
Hasil data variance arah panah kanan untuk ukuran panah yang berbeda dengan pengambilan gambar pada jarak 60 cm antara kamera dan objek untuk intensitas 99 Lux (mengunakan program yang telah direvisi) :
20,6 x 16,5 cm
Threshold
132 140 154 154
16,2 x 12,5 cm
MaxV value
Pos MaxV Value
172 129 90 45
121 119 119 119
VarVleft
VarVright
7 10 14 13
12 16 13 14
10,8 x 8,3 cm
TolV
MaxH value
Pos MaxH Value
42 38 8 8
136 99 67 34
150 149 155 150
5,4 x 4,2 cm
VarHleft
VarHright
872 497 217 45
21 26 23 23
TolH
Orientasi Variance
Arah Variance
98 95 90 49
horizontal horizontal horizontal horizontal
kanan kanan kanan kanan
Hasil : Benar = 100 % ; Salah = 0 %
LA-54
•
Hasil data variance arah panah kiri untuk ukuran panah yang berbeda dengan pengambilan gambar pada jarak 60 cm antara kamera dan objek untuk intensitas 99 Lux (mengunakan program yang telah direvisi) :
20,6 x 16,5 cm
Threshold
126 144 150 140
16,2 x 12,5 cm
MaxV value
Pos MaxV Value
179 128 88 47
123 132 134 124
VarVleft
VarVright
6 11 12 10
14 15 14 90
10,8 x 8,3 cm
TolV
MaxH value
Pos MaxH Value
58 27 15 89
141 99 68 35
144 144 152 161
5,4 x 4,2 cm
VarHleft
VarHright
27 23 22 20
789 390 177 40
TolH
Orientasi Variance
Arah Variance
97 95 88 50
horizontal horizontal horizontal vertical
kiri kiri kiri atas
Hasil : Benar = 75 % ; Salah = 25 %
LA-55
Hasil Data Metode Variance Pengenalan Arah Panah Atas dan Bawah Pada Jarak 30 - 90 Cm (didalam ruang kerja UPT –PK pukul 10.30) •
Hasil data variance arah panah atas dan bawah untuk pengambilan gambar dengan jarak 30 cm antara kamera dan objek dengan intensitas 75 Lux:
Threshold
106 104 110 106 111 96 97 99 96 98
MaxV value 122 103 105 113 110 112 101 115 115 94
Pos MaxV Value 96 94 95 94 96 97 98 98 96 96
VarVleft
VarVright
19 17 14 19 17 594 498 501 569 401
634 338 280 583 477 20 17 16 20 19
TolV
MaxH value
Pos MaxH Value
98 95 95 97 97 97 97 97 97 96
166 147 150 153 152 153 148 163 157 137
160 239 80 177 117 169 242 96 181 246
VarHleft
VarHright
12 11 14 10 14 13 12 28 13 16
15 17 17 15 15 18 19 10 14 18
TolH
20 36 18 34 7 28 37 65 8 12
Orientasi Variance
Arah Variance
vertical vertical vertical vertical vertical vertical vertical vertical vertical vertical
atas atas atas atas atas bawah bawah bawah bawah bawah
Hasil : Benar = 100 % ; Salah = 0 %
LA-56
•
Hasil data variance arah panah atas dan bawah untuk pengambilan gambar dengan jarak 60 cm antara kamera dan objek dengan intensitas 75 Lux:
Threshold
111 101 108 112 103 107 94 103 104 106
Pos MaxV Value
MaxV value 61 53 89 63 61 63 54 90 62 64
82 82 1 83 84 85 89 1 88 88
VarVleft
VarVright
19 18 793 21 19 155 114 810 177 196
138 98 908 169 136 20 18 832 19 19
MaxH value
TolV
87 82 13 88 87 88 85 3 90 91
145 84 88 143 97 137 84 170 97 92
Pos MaxH Value 145 267 39 140 205 146 267 2 197 103
VarHleft
VarHright
831 23 16 775 24 2106 22
483 23 23 560 16 356 11 2490 19 18
22 4
TolH
42 0 31 28 34 84 50 100 14 78
Orientasi Variance
Arah Variance
vertical vertical horizontal vertical vertical vertical vertical horizontal vertical vertical
atas atas kiri atas atas bawah bawah kanan bawah bawah
Hasil : Benar = 80 % ; Salah = 20 %
LA-57
•
Hasil data variance arah panah atas dan bawah untuk pengambilan gambar dengan jarak 90 cm antara kamera dan objek dengan intensitas 70 Lux:
Threshold
104 96 94 99 102 107 97 90 99 97
Pos MaxV Value
MaxV value 44 35 37 42 43 44 33 37 45 40
79 84 83 81 77 82 88 85 80 83
VarVleft
VarVright
18 17 17 21 20 86 45 55 95 61
53 43 49 69 73 21 17 15 21 18
MaxH value
TolV
67 61 66 70 73 76 63 73 78 71
62 55 59 60 62 61 56 58 64 60
Pos MaxH Value 149 282 1 200 114 161 284 35 111 220
VarHleft
VarHright
14 17 225305 14 14 12 46 19 14 15
15 152 366 17 18 16 22 20 18 17
TolH
7 89 100 18 23 25 53 5 23 12
Orientasi Variance
Arah Variance
vertical horizontal horizontal vertical vertical vertical vertical vertical vertical vertical
atas kiri kanan atas atas bawah bawah bawah bawah bawah
Hasil : Benar = 80 % ; Salah = 20 %
LA-58
Hasil Data Lamanya Waktu Proses (Stop Watch) Percobaan I II III IV V VI VII VIII IX X
Waktu Proses 3,7 s 3,9 s 3,5 s 3,2 s 3,85 s 3s 3,75 s 3,9 s 4s 3,85 s
LA-59
LD-1 // // // //
(C) ARC Thesis. 2004 Version: 0.0 16/12/2004 14:30:17 Revised: 22/01/2005
// // // //
(C) VB Thesis 2005 Version: 1.3 Start Revised By Valent: 19/10/2005 End Of Ver 1.3 Revised: 22/10/2005
// // // // // // // // //
Target : ATMega8535 Crystal: 4.0000Mhz Feature that have not been used is ADC blom dipake I2C blom dipake Real Time Clock blom dipake SPI blom dipake Timer 1 and Timer 2 free like a bird IMPORTANT KALO PINDAH KOMP SET OPTION PATH ID PROJECT
#include
#include <macros.h> #include "sbit.h" //Keterangan buat pin output dari modul //Enable Motor Kanan //PA0 //Sens Motor Kanan //PA1 //In Maju Motor Kanan //PA2 //In Mundur Motor Kanan //PA3 //In Maju Motor Kiri //PA4 //In Mundur Motor Kiri //PA5 //Sens Motor Kiri //PA6 //Enable Motor Kiri //PA7 //INT0 Feedback Motor Kanan dari encoder //INT1 Feedback Motor Kiri dari encoder // Variable yang dipake dicoding #define FINISH 1 #define CLEAR 0 volatile char Timer_Temp = 0x00; volatile char Count_Kr,Count_Kn,PWM_Kr,PWM_Kn,Count_Set_Kr,Count_Set_Kn; static char Kp =1; static char Temp[4]={0,0,0,0}; static char Temp_Kr= CLEAR; static char Temp_Kn= CLEAR; static char Count_Data = CLEAR;
LD-2 static char Status_Kiri = CLEAR; static char Status_Kanan = CLEAR; static char sensor; static char sensor1; static char sensor2; static char flag; static char status_sensor; unsigned int i; void delay(unsigned int waktu) { for(i=0;i<waktu;i++); } void Kanan_Maju (void){ if(Timer_Temp <= PWM_Kn) else CBITPA2(); } void Kanan_Mundur(void){ if(Timer_Temp <= PWM_Kn) else CBITPA3(); } void Kiri_Maju (void){ if(Timer_Temp <= PWM_Kr) else CBITPA4(); } void Kiri_Mundur(void){ if(Timer_Temp <= PWM_Kr) else CBITPA5(); } void Enable_Kanan(void){ SBITPA0();} void Enable_Kiri(void){ SBITPA7();} void Disable_Kanan(void){ CBITPA0();} void Disable_Kiri(void){ CBITPA7();} void belok_kiri(void){ Enable_Kanan(); while(Count_Kn!=88) { Kanan_Maju(); //delay();
SBITPA2();
SBITPA3();
SBITPA4();
SBITPA5();
LD-3 } Enable_Kanan(); Enable_Kiri(); Kanan_Maju(); Kiri_Maju(); } void belok_kanan(void){ Enable_Kiri(); while(Count_Kr!=86) { Kiri_Maju(); //delay(); } Enable_Kanan(); Enable_Kiri(); Kanan_Maju(); Kiri_Maju(); }
void Stop(void){ CBITPA2(); CBITPA3(); CBITPA4(); CBITPA5(); CBITPA0(); CBITPA7(); } void port_init(void) { PORTA = 0x00; DDRA = 0xBD; PORTB = 0x00; DDRB = 0x00; PORTC = 0x00; DDRC = 0x00; PORTD = 0x00; DDRD = 0x00; } //TIMER0 initialize - prescale:1 //Wave Generation Mode : Normal //Desired value: 102000Hz => nilai ini didapat dari 400Hz PWM dikali dengan 256(8Bit)
LD-4 //Maksudnya dalam 1 perioda timer terdapat timer lagi yaitu sebanyak 8bit (256) //Actual value: 102564.103Hz (0.5%) //PWM Hz nya 400Hz periode 2.5ms besarnya error yang ada 0.5% void timer0_init(void) { TCCR0 = 0x00; //stop TCNT0 = 0xD9; //set count OCR0 = 0x34; //set compare TCCR0 = 0x01; //start timer } #pragma interrupt_handler timer0_ovf_isr:10 void timer0_ovf_isr(void) { TCNT0 = 0xD9; //reload counter value Timer_Temp++; if(Timer_Temp >= 0xFF) Timer_Temp = 0; sensor=PIND; sensor1=sensor & 0x80; } /* Prototypes */ void USART_Init( unsigned int baudrate ); char USART_Receive(void); void USART_Transmit( unsigned char data ); /* Initialize USART */ void USART_Init( unsigned int baudrate ) { UBRRH = (unsigned char) (baudrate>>8); UBRRL = (unsigned char) baudrate; UCSRB = ( ( 1 << RXEN ) | ( 1 << TXEN ) | (1<
LD-5
/* Sub-Routine Serial Transmit */ void USART_Transmit( unsigned char data ) { while ( !(UCSRA & (1<
LD-6 Count_Kr = 0; Count_Kn = 0; Count_Set_Kr = 252; Count_Set_Kn = 207; Temp_Kr=0; Temp_Kn=0; } void main(void) { init_devices(); Refresh_Device(); Enable_Kanan(); Enable_Kiri(); for(;;) { Kanan_Maju(); Kiri_Maju(); if (sensor1==0x80) { Disable_Kanan(); Disable_Kiri(); USART_Transmit(0x37); TIMSK=0x00; sensor1=0x00; sensor2=0x00; } else { Refresh_Device(); if(flag==1) { /* Buat Terima Arah*/ if (Temp[0]==0x31) //Belok Kanan { TIMSK=0x01; Disable_Kanan(); //Refresh_Device(); belok_kanan(); USART_Transmit('K'); USART_Transmit('N'); USART_Transmit(' '); flag=0; }
LD-7
if (Temp[0]==0x33) //Belok Kiri { TIMSK=0x01; Disable_Kiri(); //Refresh_Device(); belok_kiri(); USART_Transmit('K'); USART_Transmit('R'); USART_Transmit(' '); flag=0; } else { Temp[0]=0x00; } } } } }
LD-8 unit capture1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, CAPTUREPRO3Lib_TLB, StdCtrls, ExtCtrls, DB, TeEngine, Series, ADODB, TeeProcs, Chart, DbChart,math, MSCommLib_TLB,StrUtils; type trgb = record r,g,b:byte; end; PRGB = ^TRGBScan; TRGBScan = array [0..0] of TRGB; Tcapture = class(TForm) btnconnect: TButton; btncapture: TButton; CapturePRO1: TCapturePRO; Label1: TLabel; btnsourceprop: TButton; btnvideoprop: TButton; Image1: TImage; Label2: TLabel; DBChart1: TDBChart; RadioButton1: TRadioButton; RadioButton2: TRadioButton; RadioButton3: TRadioButton; RadioButton4: TRadioButton; btnhistogram: TButton; ADOConnection1: TADOConnection; ADODataSet1: TADODataSet; DataSource1: TDataSource; btnclose: TButton; btngrey: TButton; Edit1: TEdit; Label3: TLabel; Image2: TImage; btnblackwhite: TButton; btnwhitecount: TButton; Getdir: TButton; Sendcomm: TButton;
LD-9 edtMaxH: TEdit; edtPosMaxH: TEdit; EdtVarH1: TEdit; EdtVarH2: TEdit; EdtMaxV: TEdit; EdtPosMaxV: TEdit; EdtVarV1: TEdit; EdtVarV2: TEdit; EdtTolH: TEdit; EdtTolV: TEdit; EdtOrientasi: TEdit; EdtArah: TEdit; Label7: TLabel; Label8: TLabel; Label9: TLabel; Label10: TLabel; Label11: TLabel; Label12: TLabel; Label13: TLabel; Label14: TLabel; Label15: TLabel; MSComm1: TMSComm; Timer1: TTimer; Edit2: TEdit; Edit3: TEdit; Timer2: TTimer; SaveDialog1: TSaveDialog; Button1: TButton; Button2: TButton; Getdirm: TButton; Startvar: TButton; Startmomen: TButton; EdtTL: TEdit; EdtTr: TEdit; EdtBl: TEdit; EdtBr: TEdit; Label6: TLabel; Label16: TLabel; Label17: TLabel; Label18: TLabel; EdtTotal: TEdit; Label19: TLabel; EdtOrientasiMomen: TEdit; EdtArahMomen: TEdit; Label20: TLabel; Label21: TLabel; Label22: TLabel;
LD-10 Label23: TLabel; save_data: TButton; clear_data: TButton; DataSource2: TDataSource; DataSource3: TDataSource; ADODataSet2: TADODataSet; ADODataSet3: TADODataSet; ADOConnection2: TADOConnection; ADOConnection3: TADOConnection; Button3: TButton; DBChart2: TDBChart; DBChart3: TDBChart; Series3: TAreaSeries; DataSource4: TDataSource; DataSource5: TDataSource; ADODataSet4: TADODataSet; ADODataSet5: TADODataSet; ADOConnection4: TADOConnection; ADOConnection5: TADOConnection; Button4: TButton; GroupBox1: TGroupBox; GroupBox2: TGroupBox; Series2: TAreaSeries; OpenDialog1: TOpenDialog; Button5: TButton; Series1: TAreaSeries; procedure FormCreate(Sender: TObject); procedure btnconnectClick(Sender: TObject); procedure CapproConnect(Device:TCapturePRO{default 0};Connection:integer;Resolution:integer;preview:boolean;vi deoinputindex:integer;visible:boolean;height:integer{153};w idth:integer{169}); procedure btncaptureClick(Sender: TObject); procedure CapproCaptureFrame(Device:tcapturepro;filename:string); procedure delay(p:integer); procedure caripanah; procedure btnsourcepropClick(Sender: TObject); procedure btnvideopropClick(Sender: TObject); procedure btnhistogramClick(Sender: TObject); procedure DelIntent(color:integer); procedure CountIntent(source:tbitmap;Color:integer); procedure DelDatasetArray (x : TDataSet; i : Boolean); procedure FillDatasetArray( x: Tdataset; j : integer ); procedure btngreyClick(Sender: TObject); procedure RadioButton1Click(Sender: TObject); procedure RadioButton2Click(Sender: TObject);
LD-11 procedure RadioButton3Click(Sender: TObject); procedure RadioButton4Click(Sender: TObject); procedure AssignGrey(source:tbitmap;image:timage;count:boolean); procedure btncloseClick(Sender: TObject); procedure btnblackwhiteClick(Sender: TObject); procedure btnwhitecountClick(Sender: TObject); procedure GetdirClick(Sender: TObject); procedure SendcommClick(Sender: TObject); procedure Timer1Timer(Sender: TObject); procedure Timer2Timer(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure GetdirmClick(Sender: TObject); procedure StartvarClick(Sender: TObject); procedure StartmomenClick(Sender: TObject); procedure save_dataClick(Sender: TObject); procedure Button3Click(Sender: TObject); procedure clear_dataClick(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button5Click(Sender: TObject); private { Private declarations } public procedure AssignMeanFilter(source:tbitmap;destination:tbitmap;image:t image); procedure AssignMedianFilter(source:tbitmap;destination:tbitmap;image :timage); procedure AssignBW(source:tbitmap;destination:tbitmap;image:timage;lo wthresval:integer;highthresval:integer;normal:boolean;inver t:Boolean); procedure GetBinaryOfImage(source:tbitmap;lowthresval:integer;highthr esval:integer); procedure RebuildBinaryImage(destination:tbitmap;negative:boolean); procedure WhiteCountV(source:tbitmap); procedure WhiteCountH(source:tbitmap); procedure CommSendChar(Comm:TMSComm{comm object};char:String{character}); //send character via comm procedure buildlist(source : tbitmap); procedure regiongrowingkananatas(source:tbitmap); procedure regiongrowingkiriatas(source:tbitmap);
LD-12 procedure regiongrowingkananbawah(source:tbitmap); procedure regiongrowingkiribawah(source:tbitmap); procedure cekhitam (source : tbitmap ); function CutImage(source:tbitmap;lowx:integer;highx:integer{width};l owy:integer;highy:integer{height};black:boolean):tbitmap; function WhitePixelCount(source:tbitmap;LowX,HighX,LowY,HighY:intege r):integer; Function CreateGrey(source:tbitmap):tbitmap; function CreateMeanFilter(source:tbitmap):tbitmap; function CreateMedianFilter(source:tbitmap):tbitmap; function CreateBW(source:tbitmap;lowthresval:integer;highthresval:in teger;Normal:boolean;invert:Boolean):tbitmap; Function RebuildBinImage(destination:tbitmap;negative:boolean):tbitm ap; function tHreshold:integer;
{ Public declarations } end; var capture: Tcapture; gambarori,gambargrey,gambarbw,bantugambarbw,gambarcount : TBitmap ; temp1 : string; pixel : array [0..639] of array [0..639] of integer; intent :array [0.. 255] of integer; intentRed :array [0.. 255] of integer; intentGreen:array [0.. 255] of integer; intentBlue :array [0.. 255] of integer; topl,topr,total,bottoml,bottomr:integer; WhiteCntH : array[0..499] of Integer; WhiteCntV : array[0..499] of Integer; x1,y1,x2,y2:integer; orientasi,iterasi : Integer ; arah : String ; simpan,bantumomenvar,bantuthres,bantutnew,bantum1,bantum2 : Integer ; implementation
LD-13 {$R *.dfm} procedure Tcapture .delay(p:integer); var i,j:integer; begin for i:=0 to p do begin for j:=0 to p do begin end; end; end; procedure Tcapture .CapproCaptureFrame(Device:tcapturepro;filename:string); {device itu kata lain dari capturePro1} var a:integer; begin if Device.IsConnected then begin Device.FrameFile:=Filename; Device.GrabFrame; //Delay(500); Device.SaveFrame; end else begin a:=MessageDlg('Device is not connected, Connect ?',mtWarning,mbOKCancel,0); if a=1 then begin CapproConnect(CapturePRO1,0,4,true,1,true,225,249); //res 4 :=320 x 240; 1 = video composite Device.FrameFile:=Filename; Device.GrabFrame; Delay(500); Device.SaveFrame; end; end; end; procedure Tcapture .CapproConnect(Device:TCapturePRO{default
LD-14 0};Connection:integer;Resolution:integer;preview:boolean;vi deoinputindex:integer;visible:boolean;height:integer{153};w idth:integer{169}); begin if not device.IsConnected then begin Device.Connect(Connection); Device.VideoInputIndex:=VideoInputIndex; //1 = video composite Device.VideoResolutionIndex:=Resolution; //default 4 = 320x240 Device.Preview:=preview; Device.Visible:=visible; Device.PreviewHeight:= height; Device.PreviewWidth := width; end; end; procedure Tcapture.FormCreate(Sender: TObject); begin simpan:=0; bantumomenvar :=0; bantutnew :=0; bantum1 :=0; bantum2 :=0; // Edit4.Text :='d'; //Edit5 .Text := LeftbStr(Edit4 .Text ,1); Series1 .Active :=False ; gambarori :=TBitmap .Create(); gambarori.PixelFormat :=pf24bit ; gambargrey :=TBitmap .Create; gambargrey .PixelFormat :=pf24bit ; gambarbw :=TBitmap .Create; gambarbw .PixelFormat :=pf24bit ; bantugambarbw :=TBitmap .Create; bantugambarbw .PixelFormat :=pf24bit ; gambarcount :=TBitmap .create; gambarcount .PixelFormat :=pf24bit ; iterasi:=1; if CapturePRO1.IsConnected then begin CapturePRO1 .Disconnect ; btnconnect .Caption := ' connect ' ; label1.Caption := ' ---disconnect--- '; end;
LD-15 label1.Caption := ' ---disconnect--- '; MSComm1 .CommPort :=1; MSComm1 .PortOpen :=true; end;
procedure Tcapture.btnconnectClick(Sender: TObject); var a:integer; begin if not CapturePRO1.IsConnected then begin label1.Caption := ' ---connected--- '; CapproConnect(CapturePRO1,0,4,true,1,true,225,249); // a:=MessageDlg('Do you agree with these settings?',mtInformation,mbYesNoCancel ,0); a:=7; if a=MB_OK then begin CapturePRO1.ShowVideoSourceDlg; end; CapturePRO1.PreviewHeight:= 225; CapturePRO1.PreviewWidth := 249; btnconnect .Caption:=' disconnect ';
end else begin CapturePRO1.Disconnect; CapturePRO1.Visible:=false; label1.Caption:=' ---Not Connected--- '; btnconnect .Caption:=' connect '; end; // timer1.Enabled :=true; end; procedure Tcapture.btncaptureClick(Sender: TObject); begin //DelIntent(0); CapproCaptureFrame(CapturePRO1,'test.bmp'); Delay(500);
LD-16
if CapturePRO1.IsConnected then begin Image1.Picture.LoadFromFile('test.bmp'); Image2.Picture.LoadFromFile('test.bmp'); gambarori .Assign(Image1 .Picture.Bitmap); Label2 .Caption:=IntToStr(gambarori .Width) +' x '+ IntToStr(gambarori .Height); end; end; procedure Tcapture.btnsourcepropClick(Sender: TObject); begin if CapturePRO1.IsConnected then begin CapturePRO1.ShowVideoSourceDlg; CapturePRO1.PreviewHeight:= 225; CapturePRO1.PreviewWidth := 249; end; end; procedure Tcapture.btnvideopropClick(Sender: TObject); begin if CapturePRO1.IsConnected then begin CapturePRO1.ShowVideoFormatDlg; CapturePRO1.PreviewHeight:= 225; CapturePRO1.PreviewWidth := 249; end; end; procedure Tcapture .DelIntent(color:integer); {untuk buat supaya ngak ada sisa perhitungan intensitas yang lalu } var x : integer; begin for x:= 0 to 255 do begin if color=0 then intent[x]:=0 else if color=1 then intentRed[x]:=0 merah
//Untuk Intensitas
//Untuk Intensitas
LD-17 else if color=2 then intentGreen[x]:=0 hijau else if color=3 then intentBlue[x]:=0; end;
//Untuk Intensitas
//Untuk Intensitas biru
end; procedure Tcapture .CountIntent(source:tbitmap;Color:integer); var x,y : integer; warna : trgb; temp : integer; tamp : byte; destination : TBitmap; begin destination := TBitmap.Create; destination .PixelFormat :=pf24bit ; destination.Assign(source); for x:= 0 to (destination.width-1) do begin for y:=0 to (destination.height-1) do begin temp:=destination.Canvas.Pixels[x,y]; Move(temp,warna,3); if color = 0 then begin tamp:=(warna.r+warna.g+warna.b) div 3;; intent[tamp]:=intent[tamp]+1; //Untuk Intensitas end //1 = red else //2 = green if color = 1 then //3 = blue begin //0 = average tamp:=warna.r; intentRed[tamp]:=intentRed[tamp]+1; end else if color = 2 then begin tamp:=warna.g; intentGreen[tamp]:=intentgreen[tamp]+1;
LD-18 end else if color = 3 then begin tamp:=warna.b; intentblue[tamp]:=intentblue[tamp]+1; end
end; end; end; procedure tcapture.DelDatasetArray (x : TDataSet; i : Boolean); var index : integer; begin x.Close; x.Open; while not x.Eof do begin x.Delete; end; if i=true then //if true, all data will reset begin for index:=0 to 255 do begin intent[index]:=0; intentred[index]:=0; intentgreen[index]:=0; intentblue[index]:=0; end; end; end; procedure tcapture.FillDatasetArray( x: Tdataset; j : integer ); begin x.Insert; x.Fields[0].Value:=j; x.Fields[1].Value:=intent[j]; //INTENT[J]=INTENSITAS GREY ARRAY
LD-19 x.Fields[2].Value:=intentred[j]; x.Fields[3].Value:=intentgreen[j]; x.Fields[4].Value:=intentblue[j]; // x.Post; end;
procedure Tcapture.btnhistogramClick(Sender: TObject); var index : Integer
;
begin DelIntent(0); DelIntent(1); DelIntent(2); DelIntent(3); CountIntent(gambarori CountIntent(gambarori CountIntent(gambarori CountIntent(gambarori
,0); ,1); ,2); ,3);
//average //red //green //blue
ADOConnection1 .Close ; ADOConnection1 .Open ; ADODataSet1.Active; DelDatasetArray(ADODataSet1 ,false); erase dbase ADODataSet1 .Close ; ADODataSet1 .Open ;
//false = only
for index:= 0 to 255 do begin FillDatasetArray(ADODataSet1 ,index); end; Series1 .Active :=True ; // FrmChrtHisto.FormCreate(Self); // FrmChrtHisto.show; end; Function Tcapture .CreateGrey(source:tbitmap):tbitmap; var x,y : integer; warna : trgb;
LD-20 temp : integer; tamp : byte; destination: TBitmap; begin destination:=TBitmap .Create; destination .PixelFormat :=pf24bit; destination.Assign(source); for x:= 0 to (destination.width-1) do begin for y:=0 to (destination.height-1) do begin temp:=destination.Canvas.Pixels[x,y]; Move(temp,warna,3); tamp := ((warna.r + warna.g + warna.b ) div 3); warna.r := tamp; warna.g := tamp; warna.b := tamp; move(warna,temp,3); destination.Canvas.Pixels[x,y] := temp; end; end; result:=destination; end; procedure Tcapture .AssignGrey(source:tbitmap;image:timage;count:boolean); var
destination : TBitmap ; begin destination:=TBitmap .create; destination .PixelFormat :=pf24bit ; //destination.Assign(source); destination.Assign(CreateGrey(source)); gambargrey .Assign(destination ); Image2 .Picture.Assign(destination); end; function Tcapture .tHreshold:integer; var thres,tnew,m1,m2,cumtotal,k,help : integer; a : Boolean; begin thres :=0;
LD-21 help :=0; tnew := 128; while tnew <> thres do begin thres := tnew; cumtotal := 0; m1 := 0; m2 := 0; for k := 0 to thres do begin m1 := m1 + (intent[k] * k); cumtotal := cumtotal + intent[k]; end; m1 := ceil(m1 / cumtotal); cumtotal := 0 ; for k := (thres + 1) to 255 do begin m2 := m2 + (intent[k] * k); cumtotal := cumtotal + intent[k]; end; m2 := ceil(m2 / cumtotal); tnew := ceil((m1 + m2) / 2) ; if help < 1 then begin bantum1 :=m1 +10 ; help := help + 1 ; end; if m2 > m1 then tnew :=tnew + 10 else tnew :=m1 + 10 ; end; bantutnew :=tnew ; //bantum1 :=m1 - 10; bantum2 :=m2; result := tnew ; end; procedure Tcapture.btngreyClick(Sender: TObject); begin Image2 .Picture .Assign(gambarori ); DelIntent(0); AssignGrey(Image2 .Picture .Bitmap ,Image2 ,true); CountIntent(gambarori ,0);
LD-22 Edit1 .Text :=IntToStr(tHreshold); end; procedure Tcapture.RadioButton1Click(Sender: TObject); begin Series1 .YValues . ValueSource :='grey' ; end; procedure Tcapture.RadioButton2Click(Sender: TObject); begin Series1 .YValues . ValueSource :='red' ; end; procedure Tcapture.RadioButton3Click(Sender: TObject); begin Series1 .YValues . ValueSource :='green' ; end; procedure Tcapture.RadioButton4Click(Sender: TObject); begin Series1 .YValues . ValueSource :='blue' ; end; procedure Tcapture.btncloseClick(Sender: TObject); begin capture.Close; end; function Tcapture .CreateMeanFilter(source:tbitmap):tbitmap; var x,y: integer; p1,p2,p3: PByteArray; destination:tbitmap; begin destination :=TBitmap .create; destination .PixelFormat :=pf24bit; destination.Assign(source); for x:=2 to destination.width-3 do begin for y:=2 to destination.height-3 do begin p1:=destination.ScanLine[y-1]; p2:=destination.ScanLine[y]; p3:=destination.ScanLine[y+1]; p2[(x)*3] := (p1[(x-1)*3] + p1[(x)*3] + p1[(x+1)*3] + p2[(x-1)*3] + p2[(x)*3] + p2[(x+1)*3] + p3[(x-1)*3] + p3[(x)*3] + p3[(x+1)*3] ) div 9;
LD-23 p2[(x)*3+1]:= (p1[(x-1)*3+1] + p1[(x)*3+1]+ p1[(x+1)*3+1] + p2[(x-1)*3+1] + p2[(x)*3+1] + p2[(x+1)*3+1] + p3[(x-1)*3+1] + p3[(x)*3+1] + p3[(x+1)*3+1]) div 9; p2[(x)*3+2]:= (p1[(x-1)*3+2] + p1[(x)*3+2]+ p1[(x+1)*3+2] + p2[(x-1)*3+2] + p2[(x)*3+2] + p2[(x+1)*3+2] + p3[(x-1)*3+2] + p3[(x)*3+2] + p3[(x+1)*3+2]) div 9; end; end; result:=destination; end; procedure Tcapture .AssignMeanFilter(source:tbitmap;destination:tbitmap;image: timage); var x,y: integer; p1,p2,p3: PByteArray; begin destination.Assign(source); destination.assign(createMeanFilter(destination)); image.picture.assign(destination); end; function Tcapture .CreateMedianFilter(source:tbitmap):tbitmap; var x,y, baris : integer; p1,p2,p3: PByteArray; data:array [0..8] of integer; n, i, j, minim, temp : integer; destination:tbitmap; begin destination :=TBitmap .create; destination .PixelFormat :=pf24bit ; destination.Assign(source); for x:=2 to destination.width-3 do begin for y:=2 to destination.height-3 do begin p1:=destination.ScanLine[y-1]; p2:=destination.ScanLine[y]; p3:=destination.ScanLine[y+1]; for baris := 0 to 2 do begin n := 9; data[0] := p1[(x-1)*3+baris]; data[1] := p1[(x)*3+baris] ; data[2] := p1[(x+1)*3+baris] ; data[3] := p2[(x-1)*3+baris];
LD-24 data[4] := p2[(x)*3+baris]; data[5] := p2[(x+1)*3+baris]; data[6] := p3[(x-1)*3+baris] ; data[7] := p3[(x)*3+baris]; data[8] := p3[(x+1)*3+baris]; for i := 0 to n-2 do begin minim := i; for j := i+1 to n-1 do begin if data[j] < data[minim] then Begin minim := j ; end; end; temp := data[i]; data[i] := data[minim]; data[minim] := temp; end; p2[(x)*3+baris] := data[4]; end; end; result:=destination; end; end; procedure Tcapture .AssignMedianFilter(source:tbitmap;destination:tbitmap;imag e:timage); var x,y: integer; p1,p2,p3: PByteArray; begin destination.Assign(source); destination.assign(CreateMedianFilter(destination)); image.picture.Assign(destination); end; function Tcapture .CreateBW(source:tbitmap;lowthresval:integer;highthresval:i nteger;Normal:boolean;invert:Boolean):tbitmap; var c,r :integer; wrn : integer; cl :Trgb;
LD-25 destination: tbitmap; begin destination :=TBitmap .create; destination .PixelFormat :=pf24bit ; destination.Assign(source); for r:=0 to destination.Height-1 do //r=y for c:=0 to destination.Width-1 do //c=x begin wrn := destination.Canvas.pixels[c,r]; Move(wrn,cl,3); if normal=false then begin if (cl.r>=lowthresval) and (cl.r<=highthresval) then cl.r:=0 else cl.r:=255; if (cl.g>=lowthresval) and (cl.g<=highthresval) then cl.g:=0 else cl.g:=255; if (cl.b>=lowthresval) and (cl.b<=highthresval) then cl.b:=0 else cl.b:=255; end else begin if (cl.r>=lowthresval) and (cl.r<=highthresval) and (cl.g>=lowthresval) and (cl.g<=highthresval) and (cl.b>=lowthresval) and (cl.b<=highthresval) then begin if invert=false then begin cl.r:=0; cl.g:=0; cl.b:=0; end else begin cl.r:=255; cl.g:=255; cl.b:=255; end; end else begin
LD-26 if invert = false then begin cl.r:=255; cl.g:=255; cl.b:=255; end else begin cl.r:=0; cl.g:=0; cl.b:=0; end; end; move(cl,wrn,3); destination.Canvas.pixels[c,r] := wrn; end; end; result:=destination; end;
procedure Tcapture .AssignBW(source:tbitmap;destination:tbitmap;image:timage;l owthresval:integer;highthresval:integer;normal:boolean;inve rt:Boolean); var c,r :integer; wrn : integer; cl :Trgb; begin destination.Assign(source); destination.Assign(CreateBW(destination,lowthresval,highthr esval,normal,invert)); image.Picture.Assign(destination); end; procedure Tcapture .GetBinaryOfImage(source:tbitmap;lowthresval:integer;highth resval:integer); var c,r :integer; wrn : integer; cl :Trgb; begin for r:=0 to source.Height-1 do //r=y for c:=0 to source.Width-1 do //c=x
LD-27 begin wrn := source.Canvas.pixels[c,r]; Move(wrn,cl,3); if (cl.r>=lowthresval) and (cl.r<=highthresval) and (cl.g>=lowthresval) and (cl.g<=highthresval) and (cl.b>=lowthresval) and (cl.b<=highthresval) then begin pixel[r,c]:=0 end else begin pixel[r,c]:=1 end; end; end; Function Tcapture .RebuildBinImage(destination:tbitmap;negative:boolean):tbit map; var c,r :integer; wrn : integer; cl :Trgb; begin //destination.Assign(source); for r:=0 to destination.Height-1 do //r=y for c:=0 to destination.Width-1 do //c=x begin wrn := destination.Canvas.pixels[c,r]; Move(wrn,cl,3); if negative=false then begin if pixel[r,c]=1 then begin cl.r:=255; cl.g:=255; cl.b:=255; end else begin cl.r:=0; cl.g:=0; cl.b:=0; end; end
LD-28
else begin if pixel[r,c]=0 then begin cl.r:=255; cl.g:=255; cl.b:=255; end else begin cl.r:=0; cl.g:=0; cl.b:=0; end; end; move(cl,wrn,3); destination.Canvas.pixels[c,r] := wrn; end; result:=destination; // image.Picture.Assign(destination); end; procedure Tcapture .buildlist(source : tbitmap); var x,y,warna1,warna2 : integer ; clr1,clr2 : trgb ; begin for x:=0 to source .Width -1 do begin warna1:=source.Canvas .Pixels [x,0]; warna2:=source .Canvas .Pixels [x,source .Height -1]; move (warna1,clr1,3); clr1.r :=0; clr1.g :=0; clr1.b :=0; move (warna2,clr2,3); clr2.r :=0; clr2.g :=0; clr2.b :=0; Move(clr1,warna1 ,3); Move(clr2,warna2 ,3); source .Canvas .Pixels [x,0]:=warna1 ;
LD-29 source .Canvas .Pixels [x,source .Height -1]:=warna2 ; end; for y:=0 to source .Height -1 do begin warna1:=source.Canvas .Pixels [0,y]; warna2:=source .Canvas .Pixels [source .Width -1,y]; move (warna1,clr1,3); clr1.r :=0; clr1.g :=0; clr1.b :=0; move (warna2,clr2,3); clr2.r :=0; clr2.g :=0; clr2.b :=0; Move(clr1,warna1 ,3); Move(clr2,warna2 ,3); source .Canvas .Pixels [0,y]:=warna1 ; source .Canvas .Pixels [source .Width -1,y]:=warna2 ; end; gambarbw .Assign(source ); end; procedure Tcapture .RebuildBinaryImage(destination:tbitmap;negative:boolean); var c,r :integer; wrn : integer; begin destination:=RebuildBinImage(destination,negative); Image2 .Picture .Assign(destination); end; /////////////////////////////////////////////////////////// //////////////////////////////////////////// procedure Tcapture .regiongrowingkananatas(source:tbitmap); var pixel : array [0..32760] of array [0..32760] of Integer ; x,y : array [0..100000] of Integer ; index,index1,indextambah,flag : Integer ; i,j,warna : Integer ; clr : trgb ; begin x[1]:=310; // 318
LD-30 y[1]:=15; // 1 index :=1; index1 :=1; indextambah :=1; while index1 <= indextambah do begin i:=x[index1]; j:=y[index1]; /////////////////////////////////////////////////////////// ///////////////////// (x,y) warna :=source .Canvas .Pixels [i,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j]:=warna; end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y-1) warna :=source .Canvas .Pixels [i-1,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1;
LD-31 y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x,y-1)
warna :=source .Canvas .Pixels [i,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i; y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y-1)
warna :=source .Canvas .Pixels [i+1,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i+1,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i+1; y[index ]:=j-1;
LD-32 end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y)
warna :=source .Canvas .Pixels [i-1,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1; y[index ]:=j; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y)
warna :=source .Canvas .Pixels [i+1,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i+1,j]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i+1; y[index ]:=j;
LD-33 end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y+1)
warna :=source .Canvas .Pixels [i-1,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// (x,y+1)
warna :=source .Canvas .Pixels [i,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i;
LD-34 y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y+1)
warna :=source .Canvas .Pixels [i+1,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i+1,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i+1; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// index1 := index1 +1; end; gambarbw .Assign(source ); end; /////////////////////////////////////////////////////////// //////////////////////////////////////////// /////////////////////////////////////////////////////////// //////////////////////////////////////////// procedure Tcapture .regiongrowingkiriatas(source:tbitmap); var pixel : array [0..32760] of array [0..32760] of Integer ; x,y : array [0..100000] of Integer ; index,index1,indextambah,flag : Integer ; i,j,warna : Integer ; clr : trgb ;
LD-35 begin x[1]:=30; y[1]:=30; index :=1; index1 :=1; indextambah :=1; while index1 <= indextambah do begin i:=x[index1]; j:=y[index1]; /////////////////////////////////////////////////////////// ///////////////////// (x,y) warna :=source .Canvas .Pixels [i,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j]:=warna; end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y-1) warna :=source .Canvas .Pixels [i-1,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j-1]:=warna; indextambah :=indextambah +1 ;
LD-36 index := index + 1 ; x[index ]:=i-1; y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x,y-1)
warna :=source .Canvas .Pixels [i,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i; y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y-1)
warna :=source .Canvas .Pixels [i+1,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i+1,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ;
LD-37 x[index ]:=i+1; y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y)
warna :=source .Canvas .Pixels [i-1,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1; y[index ]:=j; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y)
warna :=source .Canvas .Pixels [i+1,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i+1,j]:=warna; indextambah :=indextambah +1 ; index := index + 1 ;
LD-38 x[index ]:=i+1; y[index ]:=j; end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y+1)
warna :=source .Canvas .Pixels [i-1,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// (x,y+1)
warna :=source .Canvas .Pixels [i,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j+1]:=warna; indextambah :=indextambah +1 ;
LD-39 index := index + 1 ; x[index ]:=i; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y+1)
warna :=source .Canvas .Pixels [i+1,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i+1,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i+1; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// index1 := index1 +1; end; gambarbw .Assign(source ); end; /////////////////////////////////////////////////////////// //////////////////////////////////////////// /////////////////////////////////////////////////////////// //////////////////////////////////////////// procedure Tcapture .regiongrowingkananbawah(source:tbitmap); var pixel : array [0..32760] of array [0..32760] of Integer ; x,y : array [0..100000] of Integer ;
LD-40 index,index1,indextambah,flag : Integer i,j,warna : Integer ; clr : trgb ; begin x[1]:=310; // 318 y[1]:=230; // 238 index :=1; index1 :=1; indextambah :=1;
;
while index1 <= indextambah do begin i:=x[index1]; j:=y[index1]; /////////////////////////////////////////////////////////// ///////////////////// (x,y) warna :=source .Canvas .Pixels [i,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j]:=warna; end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y-1) warna :=source .Canvas .Pixels [i-1,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0;
LD-41 move (clr,warna,3); source .Canvas .Pixels [i-1,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1; y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x,y-1)
warna :=source .Canvas .Pixels [i,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i; y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y-1)
warna :=source .Canvas .Pixels [i+1,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3);
LD-42 source .Canvas .Pixels [i+1,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i+1; y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y)
warna :=source .Canvas .Pixels [i-1,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1; y[index ]:=j; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y)
warna :=source .Canvas .Pixels [i+1,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3);
LD-43 source .Canvas .Pixels [i+1,j]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i+1; y[index ]:=j; end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y+1)
warna :=source .Canvas .Pixels [i-1,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// (x,y+1)
warna :=source .Canvas .Pixels [i,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0;
LD-44 move (clr,warna,3); source .Canvas .Pixels [i,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y+1)
warna :=source .Canvas .Pixels [i+1,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i+1,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i+1; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// index1 := index1 +1; end; gambarbw .Assign(source ); end; /////////////////////////////////////////////////////////// //////////////////////////////////////////// /////////////////////////////////////////////////////////// //////////////////////////////////////////// procedure Tcapture .regiongrowingkiribawah(source:tbitmap); var
LD-45 pixel : array [0..32760] of array [0..32760] of Integer ; x,y : array [0..100000] of Integer ; index,index1,indextambah,flag : Integer ; i,j,warna : Integer ; clr : trgb ; begin x[1]:=30; y[1]:=238; index :=1; index1 :=1; indextambah :=1; while index1 <= indextambah do begin i:=x[index1]; j:=y[index1]; /////////////////////////////////////////////////////////// ///////////////////// (x,y) warna :=source .Canvas .Pixels [i,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j]:=warna; end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y-1) warna :=source .Canvas .Pixels [i-1,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin
LD-46 clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1; y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x,y-1)
warna :=source .Canvas .Pixels [i,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i; y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y-1)
warna :=source .Canvas .Pixels [i+1,j-1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0;
LD-47 clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i+1,j-1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i+1; y[index ]:=j-1; end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y)
warna :=source .Canvas .Pixels [i-1,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1; y[index ]:=j; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y)
warna :=source .Canvas .Pixels [i+1,j]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0;
LD-48 clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i+1,j]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i+1; y[index ]:=j; end; /////////////////////////////////////////////////////////// ///////////////////// (x-1,y+1)
warna :=source .Canvas .Pixels [i-1,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i-1,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i-1; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// (x,y+1)
warna :=source .Canvas .Pixels [i,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin
LD-49 clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// (x+1,y+1)
warna :=source .Canvas .Pixels [i+1,j+1]; move(warna,clr,3); if ((clr.r =0) and (clr.g=0) and (clr.b=0)) then begin flag:=1; end else begin clr.r :=0; clr.g :=0; clr.b :=0; move (clr,warna,3); source .Canvas .Pixels [i+1,j+1]:=warna; indextambah :=indextambah +1 ; index := index + 1 ; x[index ]:=i+1; y[index ]:=j+1; end; /////////////////////////////////////////////////////////// ///////////////////// index1 := index1 +1; end; gambarbw .Assign(source ); end; /////////////////////////////////////////////////////////// //////////////////////////////////////////// procedure Tcapture .cekhitam (source : tbitmap ); var destination : tbitmap ;
LD-50 x, y ,warna: Integer ; cl : trgb ; temp : Integer ; begin destination:= TBitmap .Create(); destination .PixelFormat :=pf24bit ; destination .Assign(gambarbw ); temp := 0; for x:= 0 to destination .Width -1 do begin for y:=0 to destination .Height -1 do begin warna := destination .Canvas .Pixels [x,y]; move(warna,cl,3); if((cl.r = 0) and (cl.g = 0) and (cl.b = 0) ) then begin temp := temp + 1; end; end; end; if temp > 76700 then begin Edit1 .Text :=IntToStr(bantum1 ); AssignBW(bantugambarbw ,gambarbw ,Image2 ,0,bantum1,true,false ); GetBinaryOfImage(gambarbw ,0,bantum1 ); RebuildBinaryImage(gambarbw ,true); Buildlist(gambarbw ); Regiongrowingkananatas(gambarbw ); Regiongrowingkiriatas(gambarbw ); Regiongrowingkananbawah(gambarbw ); Regiongrowingkiribawah(gambarbw ); end; end; /////////////////////////////////////////////////////////// ///////////////////// procedure Tcapture.btnblackwhiteClick(Sender: TObject); var destination : TBitmap;
LD-51 begin destination :=TBitmap .Create; destination .PixelFormat :=pf24bit; AssignMeanFilter(gambargrey ,destination ,Image2 ); AssignMedianFilter(gambargrey ,destination ,Image2 ); bantugambarbw .Assign(gambargrey ); AssignBW(destination ,gambarbw ,Image2 ,0,StrToInt(Edit1 .Text ),true,false ); GetBinaryOfImage(gambarbw ,0,StrToInt(Edit1 .Text ) ); RebuildBinaryImage(gambarbw ,true); Buildlist(gambarbw ); Regiongrowingkananatas(gambarbw ); Regiongrowingkiriatas(gambarbw ); Regiongrowingkananbawah(gambarbw ); Regiongrowingkiribawah(gambarbw ); cekhitam(gambarbw);
Image2 .Picture .Assign(gambarbw ); end; procedure Tcapture .caripanah; begin x1:=0; x2:=gambarori .Width-1; y1:=0; y2:=gambarori .Height-1; repeat x1:=x1+1; //x1.. yang deket dengan nol until (WhiteCntH[x1]>5); X1:=X1; if (x1<0) or (x2>gambarori .Width-1) then X1:=0; repeat x2:=x2-1; //x2 deket dengan lebar gambar until WhiteCntH[x2]>5; X2:=X2; if (x2>gambarori .Width-1) or (x2=0) then X2:=gambarori .Width-1; repeat y1:=y1+1; nol until (Whitecntv[y1]>5);
//y1.. yang deket dengan
LD-52 y1:=y1; if (y1<0) or (y2>gambarori .height-1) then y1:=0; repeat y2:=y2-1; //y2 deket dengan lebar gambar until Whitecntv[y2]>5; y2:=y2; if (y2>gambarori .height-1) or (y2=0) then y2:=gambarori .height-1; end; procedure Tcapture .WhiteCountV(source:tbitmap); var x,y : integer; warna : trgb; tamp : integer; begin for x:= 0 To 500 do begin WhiteCntV[x]:=0; end; for y:= 0 To source.Height -1 do begin for x:= 0 To source.Width -1 do begin tamp:=source.Canvas.Pixels[x,y]; Move(tamp,warna,3); if (warna.r=255) and (warna.g=255) and (warna.b=255) then begin whiteCntV[y]:=WhiteCntV[y]+1; end else begin whiteCntV[y]:=WhiteCntV[y]; end; end; end; end; procedure Tcapture .WhiteCountH(source:tbitmap); var
LD-53 x,y warna tamp
: integer; : trgb; : integer;
begin for x:= 0 To 500 do begin WhiteCntH[x]:=0; end; for x:= 0 To source.width-1 do begin for y:= 0 To source.height-1 do begin tamp:=source.Canvas.Pixels[x,y]; Move(tamp,warna,3); if (warna.r=255) and (warna.g=255) and (warna.b=255) then begin whiteCntH[x]:=WhiteCntH[x]+1; end else begin whiteCntH[x]:=WhiteCntH[x]; end; end; end; end; function Tcapture .WhitePixelCount(source:tbitmap;LowX,HighX,LowY,HighY:integ er):integer; var x,y : integer; warna : trgb; tamp : integer; destination : tbitmap; a:integer; begin destination:=tbitmap.create(); destination .PixelFormat :=pf24bit ; destination.Assign(source); a := 0; for x:= Lowx To highx do begin
LD-54 for y:= lowy To highy do begin tamp:=destination.Canvas.Pixels[x,y]; Move(tamp,warna,3); if (warna.r=255) and (warna.g=255) and (warna.b=255) then a:=a+1 else a:=a; end; end; result:=a; end; function Tcapture .CutImage(source:tbitmap;lowx:integer;highx:integer{width}; lowy:integer;highy:integer{height};black:boolean):tbitmap; var x,y : integer; tamp : integer; destination : tbitmap; begin destination:=TBitmap .create; destination .PixelFormat :=pf24bit ; for x:= Lowx To highx do begin for y:= lowy To highy do begin tamp:=source.Canvas.Pixels[x,y]; destination.Canvas.Pixels[x,y]:=tamp; end; end; //gambarori :=destination ; Result:=destination; end; procedure Tcapture.btnwhitecountClick(Sender: TObject); begin gambarcount .Assign(gambarbw ); WhiteCountH(gambarcount ); WhiteCountV(gambarcount ); caripanah; TopL :=WhitePixelCount(gambarbw ,x1,x1 +((X2-X1) div 2) -1 ,Y1,y1 + ((Y2-Y1) div 2 )-1 );
LD-55 TopR :=WhitePixelCount(gambarbw ,x1+ ((X2-X1) div 2), X2-1,Y1,y1 + ((Y2-Y1) div 2) -1 ); BottomL:=WhitePixelCount(gambarbw ,X1,x1 + ((X2-X1) div 2) -1 ,(y1+(Y2-Y1) div 2),Y2-1); BottomR:=WhitePixelCount(gambarbw ,x1+ ((X2-X1) div 2), X2-1,(y1+(Y2-Y1) div 2),Y2-1); Total :=WhitePixelCount(gambarbw ,x1,x2-1,y1,y2-1); {Image3 .Picture .Assign (}CutImage (gambarori ,x1,x2,y1,y2,false); //Image3 .Picture .Assign(gambarori ); end; procedure Tcapture.GetdirClick(Sender: TObject); var varih1,varih2, variv1, variv2 :array [0.. 9] of double; maxih ,posmaxih, i,j, varianceh1, varianceh2: integer ; maxiv ,posmaxiv, k,l, variancev1, variancev2: integer ; toleransiv, toleransih: integer ; begin maxih := maxintvalue(WhiteCntH); { mencari nilai tertinggi} for i:= 0 to gambarbw .Width-1 do begin if maxih = WhiteCntH[i] then {mencari posisi nilai tertinggi} begin posmaxih := i; edtMaxH.text := inttostr(maxih); edtPosMaxH.text := inttostr(posmaxih); end end; for j := 0 to 9 do begin varih1[j] := WhiteCntH[(posmaxih-j)] ; varih2[j] := WhiteCntH[(posmaxih+J)] ; end; varianceh1 := ceil(variance(varih1)); varianceh2 := ceil(variance(varih2)); EdtVarH1.Text := inttostr(varianceh1); EdtVarH2.Text := inttostr(varianceh2);
LD-56 maxiv := maxintvalue(WhiteCntV); { mencari nilai tertinggi} for i:= 0 to gambarbw .Width-1 do begin if maxiv = WhiteCntV[i] then {mencari posisi nilai tertinggi} begin posmaxiv := i; EdtMaxV.text := inttostr(maxiv); EdtPosMaxV.text := inttostr(posmaxiv); end end; for j := 0 to 9 do begin variv1[j] := WhiteCntV[(posmaxiv-j)] ; variv2[j] := WhiteCntV[(posmaxiv+J)] ; end; variancev1 := ceil(variance(variv1)); variancev2 := ceil(variance(variv2)); EdtVarV1.Text := inttostr(variancev1); EdtVarV2.Text := inttostr(variancev2); toleransiv := ceil( (abs(variancev1 - variancev2)) / (max(variancev1, variancev2))* 100) ; toleransih := ceil( (abs(varianceh1 - varianceh2)) / (max(varianceh1, varianceh2))* 100) ; EdtTolH.Text := inttostr(toleransih); EdtTolV.Text := inttostr(toleransiv); arah := 'unidentified'; EdtOrientasi.text := 'horizontal'; if (varianceh1 < varianceh2) then begin arah:='kiri'; EdtArah.Text := 'kiri'; end; if (varianceh1 > varianceh2) then begin arah:='kanan'; EdtArah.Text := 'kanan'; end; end; procedure Tcapture .CommSendChar(Comm:TMSComm{comm object};char:String{character}); //send character via comm
LD-57 var test1:string; begin if Length(char)<7 then Comm .Output:=char; Edit3 .Text :=char
;
end; procedure Tcapture.SendcommClick(Sender: TObject); begin //MSComm1.PortOpen:=true; if EdtArah.Text='kanan' then begin CommSendChar(MSComm1 ,'1'); end else if EdtArah.Text='kiri' then begin CommSendChar(MSComm1,'3'); end else if EdtArah.Text='atas' then begin CommSendChar(MSComm1,'0'); end else if EdtArah.Text='bawah' then begin CommSendChar(MSComm1,'2'); end else if EdtArah.Text='unidentified' then begin CommSendChar(MSComm1,'4'); end; //MSComm1.PortOpen:=false; end; procedure Tcapture.Timer1Timer(Sender: TObject); var test : string; dodol : integer; begin //Edit3 .Text :='dodol'; //MSComm1 .PortOpen :=true; MSComm1 .DTREnable :=false;
LD-58 delay (100); MSComm1 .DTREnable :=True ; delay(100); if MSComm1 .InBufferCount > 0 then begin test := MSComm1 .Input ; Edit2 .Text := test; end; Edit2.Text :=LeftBStr(test,1); if Edit2 .text = '7' then begin if iterasi = 1 then begin Timer2 .Enabled :=True ; end; end; //MSComm1 .PortOpen :=False ; end; procedure Tcapture.Timer2Timer(Sender: TObject); var destination : TBitmap; varih1,varih2, variv1, variv2 :array [0.. 9] of double; maxih ,posmaxih, i,j, varianceh1, varianceh2: integer ; maxiv ,posmaxiv, k,l, variancev1, variancev2: integer ; toleransiv, toleransih: integer ; selatas,selbwh,selkanan,selkiri:integer; begin CapproCaptureFrame(CapturePRO1,'test1.bmp'); Delay(500); if CapturePRO1.IsConnected then begin Image1.Picture.LoadFromFile('test1.bmp'); Image2.Picture.LoadFromFile('test1.bmp'); gambarori .Assign(Image1 .Picture.Bitmap); Label2 .Caption:=IntToStr(gambarori .Width) +' x '+ IntToStr(gambarori .Height); end; /////////////////////////////////////////////////////////// /////////////////////
LD-59
DelIntent(0); AssignGrey(Image2 .Picture .Bitmap ,Image2 ,true); CountIntent(gambarori ,0); Edit1 .Text :=IntToStr(tHreshold); /////////////////////////////////////////////////////////// ///////////////////// destination :=TBitmap .Create; destination .PixelFormat :=pf24bit; AssignMeanFilter(gambargrey ,destination ,Image2 ); AssignMedianFilter(gambargrey ,destination ,Image2 ); bantugambarbw .Assign(gambargrey ); AssignBW(destination ,gambarbw ,Image2 ,0,StrToInt(Edit1 .Text ),true,false ); GetBinaryOfImage(gambarbw ,0,StrToInt(Edit1 .Text ) ); RebuildBinaryImage(gambarbw ,true); Buildlist(gambarbw ); Regiongrowingkananatas(gambarbw ); Regiongrowingkiriatas(gambarbw ); Regiongrowingkananbawah(gambarbw ); Regiongrowingkiribawah(gambarbw ); cekhitam(gambarbw); Image2 .Picture .Assign(gambarbw ); /////////////////////////////////////////////////////////// ///////////////////// gambarcount .Assign(gambarbw ); WhiteCountH(gambarcount ); WhiteCountV(gambarcount ); caripanah; /////////////////////////////////////////////////////////// ///////////////////// TopL :=WhitePixelCount(gambarbw 1 ,Y1,y1 + ((Y2-Y1) div 2 )-1 ); TopR :=WhitePixelCount(gambarbw 1,Y1,y1 + ((Y2-Y1) div 2) -1 ); BottomL:=WhitePixelCount(gambarbw -1 ,(y1+(Y2-Y1) div 2),Y2-1); BottomR:=WhitePixelCount(gambarbw 1,(y1+(Y2-Y1) div 2),Y2-1); Total :=WhitePixelCount(gambarbw
,x1,x1 +((X2-X1) div 2) ,x1+ ((X2-X1) div 2), X2,X1,x1 + ((X2-X1) div 2) ,x1+ ((X2-X1) div 2), X2,x1,x2-1,y1,y2-1);
LD-60 /////////////////////////////////////////////////////////// ///////////////////// if bantumomenvar = 1 then begin /////////////////////////////////////////////////////////// ///////////////////// maxih := maxintvalue(WhiteCntH); { mencari nilai tertinggi} for i:= 0 to gambarbw .Width-1 do begin if maxih = WhiteCntH[i] then {mencari posisi nilai tertinggi} begin posmaxih := i; edtMaxH.text := inttostr(maxih); edtPosMaxH.text := inttostr(posmaxih); end end; for j := 0 to 9 do begin varih1[j] := WhiteCntH[(posmaxih-j)] ; varih2[j] := WhiteCntH[(posmaxih+J)] ; end; varianceh1 := ceil(variance(varih1)); varianceh2 := ceil(variance(varih2)); EdtVarH1.Text := inttostr(varianceh1); EdtVarH2.Text := inttostr(varianceh2); maxiv := maxintvalue(WhiteCntV); { mencari nilai tertinggi} for i:= 0 to gambarbw .Width-1 do begin if maxiv = WhiteCntV[i] then {mencari posisi nilai tertinggi} begin posmaxiv := i; EdtMaxV.text := inttostr(maxiv); EdtPosMaxV.text := inttostr(posmaxiv); end end; for j := 0 to 9 do begin
LD-61 variv1[j] := WhiteCntV[(posmaxiv-j)] ; variv2[j] := WhiteCntV[(posmaxiv+J)] ; end; variancev1 := variancev2 := EdtVarV1.Text EdtVarV2.Text
ceil(variance(variv1)); ceil(variance(variv2)); := inttostr(variancev1); := inttostr(variancev2);
toleransiv := ceil( (abs(variancev1 - variancev2)) / (max(variancev1, variancev2))* 100) ; toleransih := ceil( (abs(varianceh1 - varianceh2)) / (max(varianceh1, varianceh2))* 100) ; EdtTolH.Text := inttostr(toleransih); EdtTolV.Text := inttostr(toleransiv); arah := 'unidentified'; EdtOrientasi.text := 'horizontal'; if (varianceh1 < varianceh2) then begin arah:='kiri'; EdtArah.Text := 'kiri'; end; if (varianceh1 > varianceh2) then begin arah:='kanan'; EdtArah.Text := 'kanan'; end; /////////////////////////////////////////////////////////// //////////////////// end else begin /////////////////////////////////////////////////////////// //////////////////// orientasi:=0; selatas:=abs(topl-topr); //e=a-b selbwh:=abs(bottoml-bottomr); //f=c-d selkanan:=abs(topr-bottomr); //h=b-d selkiri:=abs(topl-bottoml); //g=a-c i:=abs(selatas-selbwh); j:=abs(selkanan-selkiri); EdtTL.Text:=IntToStr(topl);
LD-62 EdtTr.Text:=IntToStr(topr); EdtBl.Text:=IntToStr(bottoml); EdtBr.Text:=IntToStr(bottomr); EdtTotal.Text:=IntToStr(Total); if (i>j) then begin if ((topl+bottoml)>(topr+bottomr)) and ((toprtopl) or (bottomr>bottoml)) then begin EdtArahMomen.Text:='kanan'; EdtOrientasiMomen.Text:='horizontal'; end; end else if (i<j) then begin if ((topl+topr)>(bottoml+bottomr)) and ((topl>bottoml) or (topr>bottomr)) then begin EdtArahMomen.Text:='atas'; EdtOrientasiMomen.Text:='vertical'; end; if ((topl+topr)<(bottoml+bottomr)) and ((toplbottoml) and (topr>bottomr) then begin EdtArahMomen.Text:='atas'; EdtOrientasiMomen.Text:='vertical'; end else
LD-63 if (topltopl) and (bottomr>bottoml) then begin EdtArahMomen.Text:='kanan'; EdtOrientasiMomen.Text:='horizontal'; end else if (topr
/////////////////////////////////////////////////////////// //////////////////// end ; if bantumomenvar = 1 then begin /////////////////////////////////////////////////////////// //////////////////// if EdtArah.Text='kanan' then begin CommSendChar(MSComm1 ,'1'); end else if EdtArah.Text='kiri' then begin CommSendChar(MSComm1,'3'); end else if EdtArah.Text='atas' then begin
LD-64 CommSendChar(MSComm1,'0'); end else if EdtArah.Text='bawah' then begin CommSendChar(MSComm1,'2'); end else if EdtArah.Text='unidentified' then begin CommSendChar(MSComm1,'4'); end; /////////////////////////////////////////////////////////// ///////////////////// end else begin /////////////////////////////////////////////////////////// ///////////////////// if edtarahmomen.Text='kanan' then begin CommSendChar(MSComm1,'1'); end else if edtarahmomen.Text='kiri' then begin CommSendChar(MSComm1,'3'); end else if edtarahmomen.Text='atas' then begin CommSendChar(MSComm1,'0'); end else if edtarahmomen.Text='bawah' then begin CommSendChar(MSComm1,'2'); end else if edtarahmomen.Text='unidentified' then begin CommSendChar(MSComm1,'4'); end; /////////////////////////////////////////////////////////// ///////////////////// end;
LD-65 /////////////////////////////////////////////////////////// /////////////////////
if bantumomenvar = 1 then begin /////////////////////////////////////////////////////////// //////////////////// ADODataSet3 .Active :=True ; ADODataSet3 .Open ; ADODataSet3 .Insert ; ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3
.Fields[0].Value :=Edit1 .Text ; .Fields[1].Value :=EdtMaxV .Text ; .Fields[2].Value :=EdtPosMaxV .Text ; .Fields[3].Value :=EdtVarV1 .Text ; .Fields[4].Value :=EdtVarV2 .Text ; .Fields[5].Value :=EdtTolV .Text ; .Fields[6].Value :=edtMaxH .Text ; .Fields[7].Value :=edtPosMaxH .Text ; .Fields[8].Value :=EdtVarH1 .Text ; .Fields[9].Value :=EdtVarH2 .Text ; .Fields[10].Value :=EdtTolH .Text ; .Fields[11].Value :=EdtOrientasi .Text ; .Fields[12].Value :=EdtArah .Text ;
ADODataSet3 .Post ; ADODataSet3 .Close ;
/////////////////////////////////////////////////////////// ///////////////////// end else begin /////////////////////////////////////////////////////////// ///////////////////// ADODataSet2 .Active :=True; ADODataSet2 .Open ; ADODataSet2 .Insert ; ADODataSet2 ADODataSet2 ADODataSet2 ADODataSet2
.Fields .Fields .Fields .Fields
[0].Value [1].Value [2].Value [3].Value
:= := := :=
Edit1 .Text ; EdtTL .Text ; EdtTr .Text ; EdtBl .Text ;
LD-66 ADODataSet2 .Fields [4].Value := EdtBr .Text ; ADODataSet2 .Fields [5].Value := EdtOrientasiMomen .Text ; ADODataSet2 .Fields [6].Value := EdtArahMomen .Text ; ADODataSet2 .Post ; ADODataSet2 .Close ; /////////////////////////////////////////////////////////// ///////////////////// end; /////////////////////////////////////////////////////////// ///////////////////// gambarori .SaveToFile('ori'+ IntToStr (simpan) +'.bmp') ; gambarbw .SaveToFile('result'+ IntToStr (simpan) +'.bmp'); simpan:=simpan+1; /////////////////////////////////////////////////////////// ///////////////////// Timer2 .Enabled :=false; edit2.Text :=''; iterasi:=1; end; procedure Tcapture.Button1Click(Sender: TObject); begin gambarori .SaveToFile('ori'+ IntToStr (simpan) +'.bmp') ; gambarbw .SaveToFile('result'+ IntToStr (simpan) +'.bmp'); simpan:=simpan+1; end; procedure Tcapture.Button2Click(Sender: TObject); begin simpan :=0; end; procedure Tcapture.GetdirmClick(Sender: TObject); var temp : integer; selatas,selbwh,selkanan,selkiri:integer; i,j:integer; bndtb,bndlr:integer; begin orientasi:=0; selatas:=abs(topl-topr); //e=a-b selbwh:=abs(bottoml-bottomr); //f=c-d selkanan:=abs(topr-bottomr); //h=b-d selkiri:=abs(topl-bottoml); //g=a-c
LD-67
i:=abs(selatas-selbwh); j:=abs(selkanan-selkiri); EdtTL.Text:=IntToStr(topl); EdtTr.Text:=IntToStr(topr); EdtBl.Text:=IntToStr(bottoml); EdtBr.Text:=IntToStr(bottomr); EdtTotal.Text:=IntToStr(Total); if (i>j) then begin if ((topl+bottoml)>(topr+bottomr)) and ((toprtopl) or (bottomr>bottoml)) then begin EdtArahMomen.Text:='kanan'; EdtOrientasiMomen.Text:='horizontal'; end; end else if (i<j) then begin if ((topl+topr)>(bottoml+bottomr)) and ((topl>bottoml) or (topr>bottomr)) then begin EdtArahMomen.Text:='atas'; EdtOrientasiMomen.Text:='vertical'; end; if ((topl+topr)<(bottoml+bottomr)) and ((toplbottoml) and (topr>bottomr) then
LD-68 begin EdtArahMomen.Text:='atas'; EdtOrientasiMomen.Text:='vertical'; end else if (topltopl) and (bottomr>bottoml) then begin EdtArahMomen.Text:='kanan'; EdtOrientasiMomen.Text:='horizontal'; end else if (topr
LD-69 ADODataSet2 .Insert ; ADODataSet2 ADODataSet2 ADODataSet2 ADODataSet2 ADODataSet2 ADODataSet2 ADODataSet2
.Fields .Fields .Fields .Fields .Fields .Fields .Fields
[0].Value [1].Value [2].Value [3].Value [4].Value [5].Value [6].Value
:= := := := := := :=
Edit1 .Text ; EdtTL .Text ; EdtTr .Text ; EdtBl .Text ; EdtBr .Text ; EdtOrientasiMomen .Text ; EdtArahMomen .Text ;
ADODataSet2 .Post ; ADODataSet2 .Close ; end; procedure Tcapture.Button3Click(Sender: TObject); begin ADODataSet3 .Active :=True ; ADODataSet3 .Open ; ADODataSet3 .Insert ; ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3 ADODataSet3
.Fields[0].Value :=Edit1 .Text ; .Fields[1].Value :=EdtMaxV .Text ; .Fields[2].Value :=EdtPosMaxV .Text ; .Fields[3].Value :=EdtVarV1 .Text ; .Fields[4].Value :=EdtVarV2 .Text ; .Fields[5].Value :=EdtTolV .Text ; .Fields[6].Value :=edtMaxH .Text ; .Fields[7].Value :=edtPosMaxH .Text ; .Fields[8].Value :=EdtVarH1 .Text ; .Fields[9].Value :=EdtVarH2 .Text ; .Fields[10].Value :=EdtTolH .Text ; .Fields[11].Value :=EdtOrientasi .Text ; .Fields[12].Value :=EdtArah .Text ;
ADODataSet3 .Post ; ADODataSet3 .Close ;
end; procedure Tcapture.clear_dataClick(Sender: TObject); begin ADODataSet2 .Active :=True ; ADODataSet2 .Open;
LD-70 while not ADODataSet2 .Eof do begin ADODataSet2 .Delete ; end; ADODataSet3 .Active :=True ; ADODataSet3 .Open ; while not ADODataSet3 .Eof do begin ADODataSet3 .Delete ; end; end; procedure Tcapture.Button4Click(Sender: TObject); var x,y : Integer ; begin /////////////////////////////////////////////////////////// ADODataSet4 .Active :=True ; ADODataSet4 .Close ; ADODataSet4 .Open ; y:=1; while not ADODataSet4 .Eof do begin ADODataSet4 .Delete ; end; for x:=0 to gambarbw .Height -1 do begin if WhiteCntV[x] <> 0 then begin ADODataSet4 .Insert ; ADODataSet4 .Fields[0].Value :=y ; y:=y+1; ADODataSet4 .Fields[1].Value :=x ; ADODataSet4 .Fields[2].Value :=WhiteCntV[x]; end; end; // ADODataSet4 .close; /////////////////////////////////////////////////////////// ADODataSet5 ADODataSet5
.Active :=True ; .Close ;
LD-71 ADODataSet5 y:=1;
.Open ;
while not ADODataSet5 .Eof do begin ADODataSet5 .Delete ; end; for x:=0 to gambarbw.Width begin if WhiteCntH[x] <> 0 then begin ADODataSet5 .Insert ; ADODataSet5 .Fields[0].Value y:=y+1; ADODataSet5 .Fields[1].Value ADODataSet5 .Fields[2].Value end; end; // ADODataSet4 .close;
-1 do
:=y ; :=x ; :=WhiteCntH[x];
/////////////////////////////////////////////////////////// Series2 .Active :=True ; //Series3 .Active :=True ; end; procedure Tcapture.Button5Click(Sender: TObject); var destination : TBitmap ; begin // file database harus satu folder dengan file gambar yang mau dioleh destination :=TBitmap .Create(); destination .PixelFormat :=pf24bit ; if OpenDialog1 .Execute then begin destination .LoadFromFile(OpenDialog1 .FileName ); Image1 .Picture .Assign(destination ); Image2 .Picture .Assign(destination ); gambarori .Assign(Image1 .Picture .Bitmap ); end; end; end.