asmrobot
2019-11-13 576b92fd82f568572bc4beb125fa0ba0191a602f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
using RichCreator.Utility.CV;
using RichCreator.Utility.Structs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Emgu.CV;
using Emgu.CV.Structure;
using System.Threading;
using RichCreator.Utility.Captures;
using ZTImage.Configuration;
using RichCreator.Utility.Utilitys;
using System.Diagnostics;
using ZTImage.Collections;
 
namespace RichCreator.Utility.CV
{
    /// <summary>
    /// DNF识别
    /// </summary>
    public class DnfCVHelper
    {
 
        /// <summary>
        /// 选择角色界面中的“开始游戏”按钮
        /// </summary>
        private static ColorArray startGameButton = ColorArray.FromThresholdString(130, "1055,813,255,255,255$1034,813,0,0,0$1035,813,0,0,0$1036,813,0,0,0$1037,813,0,0,0$1038,813,0,0,0$1040,813,255,255,255$1041,813,255,255,255$1044,813,0,0,0$1045,813,0,0,0$1047,813,255,255,255$1048,813,255,255,255$1049,813,255,255,255$1051,813,0,0,0$1052,813,0,0,0$1053,813,255,255,255$1054,813,255,255,255$1057,813,0,0,0$1058,813,0,0,0$1059,813,0,0,0$1062,813,255,255,255$1063,813,255,255,255$1064,813,255,255,255$1065,813,255,255,255$1066,813,255,255,255$1067,813,255,255,255$1068,813,255,255,255$1072,813,255,255,255$1073,813,255,255,255$1074,813,255,255,255$1075,813,0,0,0$1076,813,0,0,0$1078,813,255,255,255$1082,813,255,255,255$1083,813,255,255,255$1084,813,255,255,255$1085,813,255,255,255$1086,813,255,255,255$1087,813,255,255,255$1088,813,255,255,255$1089,813,255,255,255$1090,813,255,255,255$1091,813,255,255,255$1092,813,255,255,255$1093,813,255,255,255$1094,813,255,255,255$1095,813,255,255,255$1096,813,255,255,255$1097,813,255,255,255$1098,813,255,255,255$1099,813,255,255,255$1102,813,0,0,0$1104,813,255,255,255$1105,813,255,255,255$1109,813,255,255,255$1110,813,255,255,255$1112,813,0,0,0$1113,813,0,0,0$1115,813,255,255,255$1116,813,255,255,255$1117,813,255,255,255$1119,813,0,0,0$1120,813,0,0,0$1121,813,0,0,0$1122,813,0,0,0$1123,813,0,0,0$1124,813,0,0,0$1125,813,0,0,0$1126,813,0,0,0$1127,813,0,0,0$1128,813,0,0,0$1034,814,0,0,0$1035,814,0,0,0$1036,814,0,0,0$1037,814,0,0,0$1038,814,0,0,0$1040,814,255,255,255$1041,814,255,255,255$1047,814,255,255,255$1048,814,255,255,255$1049,814,255,255,255$1053,814,255,255,255$1054,814,255,255,255$1055,814,255,255,255$1056,814,255,255,255$1057,814,255,255,255$1058,814,255,255,255$1061,814,255,255,255$1062,814,255,255,255$1063,814,255,255,255$1064,814,255,255,255$1065,814,255,255,255$1066,814,255,255,255$1067,814,255,255,255$1068,814,255,255,255$1070,814,0,0,0$1072,814,255,255,255$1073,814,255,255,255$1074,814,255,255,255$1077,814,255,255,255$1078,814,255,255,255$1082,814,255,255,255$1083,814,255,255,255$1084,814,255,255,255$1085,814,255,255,255$1086,814,255,255,255$1087,814,255,255,255$1088,814,255,255,255$1089,814,255,255,255$1090,814,255,255,255$1091,814,255,255,255$1092,814,255,255,255$1093,814,255,255,255$1094,814,255,255,255$1095,814,255,255,255$1096,814,255,255,255$1097,814,255,255,255$1098,814,255,255,255$1099,814,255,255,255$1100,814,255,255,255$1104,814,255,255,255$1105,814,255,255,255$1108,814,255,255,255$1109,814,255,255,255$1110,814,255,255,255$1112,814,0,0,0$1115,814,255,255,255$1116,814,255,255,255$1119,814,0,0,0$1120,814,0,0,0$1121,814,0,0,0$1122,814,0,0,0$1123,814,0,0,0$1124,814,0,0,0$1125,814,0,0,0$1126,814,0,0,0$1127,814,0,0,0$1128,814,0,0,0$1034,815,0,0,0$1035,815,0,0,0$1036,815,0,0,0$1037,815,0,0,0$1038,815,0,0,0$1041,815,255,255,255$1042,815,255,255,255$1045,815,255,255,255$1046,815,255,255,255$1047,815,255,255,255$1048,815,255,255,255$1049,815,255,255,255$1050,815,255,255,255$1051,815,255,255,255$1052,815,255,255,255$1053,815,255,255,255$1054,815,255,255,255$1055,815,255,255,255$1056,815,255,255,255$1057,815,255,255,255$1058,815,255,255,255$1062,815,255,255,255$1063,815,255,255,255$1064,815,255,255,255$1065,815,255,255,255$1066,815,255,255,255$1067,815,255,255,255$1068,815,255,255,255$1070,815,0,0,0$1071,815,0,0,0$1073,815,255,255,255$1074,815,255,255,255$1076,815,255,255,255$1077,815,255,255,255$1080,815,0,0,0$1083,815,255,255,255$1084,815,255,255,255$1085,815,255,255,255$1086,815,255,255,255$1096,815,255,255,255$1097,815,255,255,255$1098,815,255,255,255$1099,815,255,255,255$1104,815,255,255,255$1105,815,255,255,255$1106,815,255,255,255$1107,815,255,255,255$1108,815,255,255,255$1109,815,255,255,255$1110,815,255,255,255$1111,815,255,255,255$1114,815,255,255,255$1115,815,255,255,255$1116,815,255,255,255$1122,815,0,0,0$1123,815,0,0,0$1124,815,0,0,0$1125,815,0,0,0$1126,815,0,0,0$1127,815,0,0,0$1128,815,0,0,0$1034,816,0,0,0$1035,816,0,0,0$1036,816,0,0,0$1037,816,0,0,0$1038,816,0,0,0$1039,816,0,0,0$1041,816,255,255,255$1042,816,255,255,255$1043,816,255,255,255$1045,816,255,255,255$1046,816,255,255,255$1047,816,255,255,255$1048,816,255,255,255$1049,816,255,255,255$1050,816,255,255,255$1051,816,255,255,255$1052,816,255,255,255$1066,816,255,255,255$1067,816,255,255,255$1068,816,255,255,255$1072,816,255,255,255$1073,816,255,255,255$1074,816,255,255,255$1076,816,255,255,255$1077,816,255,255,255$1080,816,0,0,0$1081,816,0,0,0$1084,816,255,255,255$1085,816,255,255,255$1097,816,255,255,255$1098,816,255,255,255$1099,816,255,255,255$1101,816,0,0,0$1103,816,255,255,255$1104,816,255,255,255$1105,816,255,255,255$1106,816,255,255,255$1107,816,255,255,255$1108,816,255,255,255$1109,816,255,255,255$1110,816,255,255,255$1111,816,255,255,255$1114,816,255,255,255$1115,816,255,255,255$1117,816,0,0,0$1119,816,255,255,255$1120,816,255,255,255$1122,816,0,0,0$1123,816,0,0,0$1124,816,0,0,0$1125,816,0,0,0$1126,816,0,0,0$1127,816,0,0,0$1128,816,0,0,0$1034,817,0,0,0$1035,817,0,0,0$1036,817,0,0,0$1037,817,0,0,0$1038,817,0,0,0$1039,817,0,0,0$1040,817,0,0,0$1042,817,255,255,255$1046,817,255,255,255$1047,817,255,255,255$1054,817,0,0,0$1055,817,0,0,0$1056,817,0,0,0$1057,817,0,0,0$1058,817,0,0,0$1059,817,0,0,0$1060,817,0,0,0$1067,817,255,255,255$1068,817,255,255,255$1071,817,255,255,255$1072,817,255,255,255$1073,817,255,255,255$1074,817,255,255,255$1075,817,255,255,255$1076,817,255,255,255$1077,817,255,255,255$1078,817,255,255,255$1080,817,0,0,0$1081,817,0,0,0$1082,817,0,0,0$1084,817,255,255,255$1085,817,255,255,255$1087,817,0,0,0$1088,817,0,0,0$1089,817,0,0,0$1090,817,0,0,0$1091,817,0,0,0$1092,817,0,0,0$1093,817,0,0,0$1094,817,0,0,0$1095,817,0,0,0$1097,817,255,255,255$1098,817,255,255,255$1099,817,255,255,255$1100,817,0,0,0$1101,817,0,0,0$1104,817,255,255,255$1105,817,255,255,255$1106,817,255,255,255$1108,817,255,255,255$1109,817,255,255,255$1110,817,255,255,255$1113,817,255,255,255$1114,817,255,255,255$1115,817,255,255,255$1117,817,0,0,0$1119,817,255,255,255$1120,817,255,255,255$1122,817,0,0,0$1123,817,0,0,0$1124,817,0,0,0$1125,817,0,0,0$1126,817,0,0,0$1127,817,0,0,0$1128,817,0,0,0$1034,818,0,0,0$1035,818,0,0,0$1036,818,0,0,0$1037,818,0,0,0$1038,818,0,0,0$1039,818,0,0,0$1040,818,0,0,0$1041,818,0,0,0$1042,818,0,0,0$1043,818,0,0,0$1044,818,0,0,0$1046,818,255,255,255$1047,818,255,255,255$1049,818,0,0,0$1050,818,0,0,0$1051,818,0,0,0$1053,818,255,255,255$1054,818,255,255,255$1055,818,255,255,255$1056,818,255,255,255$1057,818,255,255,255$1058,818,255,255,255$1060,818,0,0,0$1062,818,255,255,255$1063,818,255,255,255$1066,818,255,255,255$1067,818,255,255,255$1069,818,0,0,0$1071,818,255,255,255$1072,818,255,255,255$1073,818,255,255,255$1074,818,255,255,255$1075,818,255,255,255$1076,818,255,255,255$1077,818,255,255,255$1078,818,255,255,255$1080,818,0,0,0$1081,818,0,0,0$1082,818,0,0,0$1084,818,255,255,255$1085,818,255,255,255$1087,818,0,0,0$1088,818,0,0,0$1089,818,0,0,0$1090,818,0,0,0$1091,818,0,0,0$1092,818,0,0,0$1093,818,0,0,0$1094,818,0,0,0$1095,818,0,0,0$1097,818,255,255,255$1098,818,255,255,255$1100,818,0,0,0$1101,818,0,0,0$1102,818,0,0,0$1104,818,255,255,255$1105,818,255,255,255$1107,818,0,0,0$1109,818,255,255,255$1110,818,255,255,255$1113,818,255,255,255$1114,818,255,255,255$1116,818,0,0,0$1117,818,0,0,0$1119,818,255,255,255$1120,818,255,255,255$1122,818,0,0,0$1123,818,0,0,0$1124,818,0,0,0$1125,818,0,0,0$1126,818,0,0,0$1127,818,0,0,0$1128,818,0,0,0$1034,819,0,0,0$1035,819,0,0,0$1036,819,0,0,0$1037,819,0,0,0$1038,819,0,0,0$1040,819,255,255,255$1041,819,255,255,255$1043,819,0,0,0$1044,819,0,0,0$1046,819,255,255,255$1047,819,255,255,255$1048,819,255,255,255$1049,819,255,255,255$1050,819,255,255,255$1052,819,255,255,255$1053,819,255,255,255$1054,819,255,255,255$1055,819,255,255,255$1056,819,255,255,255$1057,819,255,255,255$1058,819,255,255,255$1060,819,0,0,0$1062,819,255,255,255$1063,819,255,255,255$1066,819,255,255,255$1067,819,255,255,255$1069,819,0,0,0$1070,819,0,0,0$1071,819,0,0,0$1073,819,255,255,255$1074,819,255,255,255$1076,819,0,0,0$1077,819,0,0,0$1078,819,0,0,0$1079,819,0,0,0$1080,819,0,0,0$1081,819,0,0,0$1082,819,0,0,0$1084,819,255,255,255$1085,819,255,255,255$1087,819,0,0,0$1088,819,0,0,0$1089,819,0,0,0$1090,819,0,0,0$1091,819,0,0,0$1092,819,0,0,0$1093,819,0,0,0$1094,819,0,0,0$1095,819,0,0,0$1097,819,255,255,255$1098,819,255,255,255$1100,819,0,0,0$1101,819,0,0,0$1102,819,0,0,0$1104,819,255,255,255$1105,819,255,255,255$1107,819,0,0,0$1109,819,255,255,255$1110,819,255,255,255$1112,819,255,255,255$1113,819,255,255,255$1114,819,255,255,255$1119,819,255,255,255$1120,819,255,255,255$1122,819,0,0,0$1123,819,0,0,0$1124,819,0,0,0$1125,819,0,0,0$1126,819,0,0,0$1127,819,0,0,0$1128,819,0,0,0$1034,820,0,0,0$1035,820,0,0,0$1036,820,0,0,0$1037,820,0,0,0$1038,820,0,0,0$1039,820,0,0,0$1040,820,255,255,255$1041,820,255,255,255$1046,820,255,255,255$1047,820,255,255,255$1048,820,255,255,255$1049,820,255,255,255$1050,820,255,255,255$1052,820,0,0,0$1053,820,0,0,0$1054,820,0,0,0$1056,820,255,255,255$1057,820,255,255,255$1060,820,0,0,0$1063,820,255,255,255$1064,820,255,255,255$1065,820,255,255,255$1066,820,255,255,255$1069,820,0,0,0$1070,820,0,0,0$1071,820,0,0,0$1073,820,255,255,255$1074,820,255,255,255$1076,820,0,0,0$1080,820,0,0,0$1081,820,0,0,0$1082,820,0,0,0$1084,820,255,255,255$1085,820,255,255,255$1087,820,0,0,0$1088,820,0,0,0$1089,820,0,0,0$1090,820,0,0,0$1091,820,0,0,0$1092,820,0,0,0$1093,820,0,0,0$1094,820,0,0,0$1095,820,0,0,0$1097,820,255,255,255$1098,820,255,255,255$1100,820,0,0,0$1101,820,0,0,0$1102,820,0,0,0$1104,820,255,255,255$1105,820,255,255,255$1107,820,0,0,0$1109,820,255,255,255$1110,820,255,255,255$1112,820,255,255,255$1113,820,255,255,255$1114,820,255,255,255$1115,820,255,255,255$1116,820,255,255,255$1117,820,255,255,255$1118,820,255,255,255$1119,820,255,255,255$1120,820,255,255,255$1122,820,0,0,0$1123,820,0,0,0$1124,820,0,0,0$1125,820,0,0,0$1126,820,0,0,0$1127,820,0,0,0$1128,820,0,0,0$1034,821,0,0,0$1035,821,0,0,0$1036,821,0,0,0$1037,821,0,0,0$1038,821,0,0,0$1039,821,0,0,0$1041,821,255,255,255$1042,821,255,255,255$1046,821,255,255,255$1047,821,255,255,255$1050,821,255,255,255$1052,821,0,0,0$1056,821,255,255,255$1057,821,255,255,255$1059,821,0,0,0$1060,821,0,0,0$1061,821,0,0,0$1063,821,255,255,255$1064,821,255,255,255$1065,821,255,255,255$1066,821,255,255,255$1068,821,0,0,0$1069,821,0,0,0$1070,821,0,0,0$1071,821,0,0,0$1074,821,255,255,255$1077,821,255,255,255$1080,821,0,0,0$1081,821,0,0,0$1083,821,255,255,255$1084,821,255,255,255$1085,821,255,255,255$1086,821,255,255,255$1096,821,255,255,255$1097,821,255,255,255$1098,821,255,255,255$1099,821,255,255,255$1101,821,0,0,0$1102,821,0,0,0$1104,821,255,255,255$1105,821,255,255,255$1107,821,0,0,0$1109,821,255,255,255$1110,821,255,255,255$1112,821,255,255,255$1113,821,255,255,255$1114,821,255,255,255$1115,821,255,255,255$1116,821,255,255,255$1117,821,255,255,255$1118,821,255,255,255$1119,821,255,255,255$1122,821,0,0,0$1123,821,0,0,0$1124,821,0,0,0$1125,821,0,0,0$1126,821,0,0,0$1127,821,0,0,0$1128,821,0,0,0$1034,822,0,0,0$1035,822,0,0,0$1036,822,0,0,0$1037,822,0,0,0$1038,822,0,0,0$1039,822,0,0,0$1040,822,0,0,0$1046,822,255,255,255$1050,822,255,255,255$1052,822,0,0,0$1054,822,255,255,255$1055,822,255,255,255$1056,822,255,255,255$1057,822,255,255,255$1058,822,0,0,0$1059,822,0,0,0$1060,822,0,0,0$1061,822,0,0,0$1063,822,255,255,255$1064,822,255,255,255$1065,822,255,255,255$1066,822,255,255,255$1068,822,0,0,0$1069,822,0,0,0$1070,822,0,0,0$1071,822,0,0,0$1074,822,255,255,255$1075,822,255,255,255$1077,822,255,255,255$1080,822,0,0,0$1081,822,0,0,0$1082,822,255,255,255$1083,822,255,255,255$1084,822,255,255,255$1085,822,255,255,255$1086,822,255,255,255$1087,822,255,255,255$1088,822,255,255,255$1089,822,255,255,255$1090,822,255,255,255$1091,822,255,255,255$1092,822,255,255,255$1093,822,255,255,255$1094,822,255,255,255$1095,822,255,255,255$1096,822,255,255,255$1097,822,255,255,255$1098,822,255,255,255$1099,822,255,255,255$1100,822,255,255,255$1102,822,0,0,0$1104,822,255,255,255$1105,822,255,255,255$1107,822,0,0,0$1109,822,255,255,255$1110,822,255,255,255$1122,822,0,0,0$1123,822,0,0,0$1124,822,0,0,0$1125,822,0,0,0$1126,822,0,0,0$1127,822,0,0,0$1128,822,0,0,0$1034,823,0,0,0$1035,823,0,0,0$1036,823,0,0,0$1037,823,0,0,0$1038,823,0,0,0$1039,823,0,0,0$1040,823,0,0,0$1046,823,255,255,255$1050,823,255,255,255$1052,823,0,0,0$1056,823,255,255,255$1057,823,255,255,255$1058,823,0,0,0$1059,823,0,0,0$1060,823,0,0,0$1061,823,0,0,0$1062,823,0,0,0$1064,823,255,255,255$1065,823,255,255,255$1068,823,0,0,0$1069,823,0,0,0$1070,823,0,0,0$1071,823,0,0,0$1072,823,0,0,0$1074,823,255,255,255$1075,823,255,255,255$1077,823,255,255,255$1079,823,0,0,0$1080,823,0,0,0$1081,823,0,0,0$1083,823,255,255,255$1084,823,255,255,255$1085,823,255,255,255$1086,823,255,255,255$1096,823,255,255,255$1097,823,255,255,255$1098,823,255,255,255$1099,823,255,255,255$1101,823,0,0,0$1102,823,0,0,0$1104,823,255,255,255$1105,823,255,255,255$1107,823,0,0,0$1109,823,255,255,255$1122,823,0,0,0$1123,823,0,0,0$1124,823,0,0,0$1125,823,0,0,0$1126,823,0,0,0$1127,823,0,0,0$1128,823,0,0,0$1034,824,0,0,0$1035,824,0,0,0$1036,824,0,0,0$1037,824,0,0,0$1038,824,0,0,0$1039,824,0,0,0$1040,824,0,0,0$1041,824,0,0,0$1046,824,255,255,255$1050,824,255,255,255$1052,824,0,0,0$1053,824,0,0,0$1054,824,0,0,0$1056,824,255,255,255$1057,824,255,255,255$1058,824,0,0,0$1059,824,0,0,0$1060,824,0,0,0$1061,824,0,0,0$1062,824,0,0,0$1064,824,255,255,255$1065,824,255,255,255$1067,824,0,0,0$1068,824,0,0,0$1069,824,0,0,0$1070,824,0,0,0$1071,824,0,0,0$1072,824,0,0,0$1074,824,255,255,255$1075,824,255,255,255$1077,824,255,255,255$1079,824,0,0,0$1080,824,0,0,0$1081,824,0,0,0$1082,824,0,0,0$1084,824,255,255,255$1085,824,255,255,255$1087,824,0,0,0$1088,824,0,0,0$1089,824,0,0,0$1090,824,0,0,0$1091,824,0,0,0$1092,824,0,0,0$1093,824,0,0,0$1094,824,0,0,0$1095,824,0,0,0$1097,824,255,255,255$1098,824,255,255,255$1100,824,0,0,0$1101,824,0,0,0$1102,824,0,0,0$1104,824,255,255,255$1105,824,255,255,255$1107,824,0,0,0$1109,824,255,255,255$1113,824,255,255,255$1114,824,255,255,255$1115,824,255,255,255$1116,824,255,255,255$1117,824,255,255,255$1118,824,255,255,255$1119,824,255,255,255$1120,824,255,255,255$1122,824,0,0,0$1123,824,0,0,0$1124,824,0,0,0$1125,824,0,0,0$1126,824,0,0,0$1127,824,0,0,0$1128,824,0,0,0$1034,825,0,0,0$1035,825,0,0,0$1036,825,0,0,0$1037,825,0,0,0$1038,825,0,0,0$1039,825,0,0,0$1040,825,0,0,0$1046,825,255,255,255$1050,825,255,255,255$1056,825,255,255,255$1057,825,255,255,255$1059,825,0,0,0$1060,825,0,0,0$1061,825,0,0,0$1062,825,0,0,0$1064,825,255,255,255$1065,825,255,255,255$1067,825,0,0,0$1068,825,0,0,0$1069,825,0,0,0$1070,825,0,0,0$1071,825,0,0,0$1072,825,0,0,0$1074,825,255,255,255$1075,825,255,255,255$1076,825,255,255,255$1079,825,0,0,0$1080,825,0,0,0$1081,825,0,0,0$1082,825,0,0,0$1084,825,255,255,255$1085,825,255,255,255$1087,825,0,0,0$1088,825,0,0,0$1089,825,0,0,0$1090,825,0,0,0$1091,825,0,0,0$1092,825,0,0,0$1093,825,0,0,0$1094,825,0,0,0$1095,825,0,0,0$1097,825,255,255,255$1098,825,255,255,255$1100,825,0,0,0$1101,825,0,0,0$1102,825,0,0,0$1104,825,255,255,255$1105,825,255,255,255$1109,825,255,255,255$1111,825,0,0,0$1113,825,255,255,255$1114,825,255,255,255$1119,825,255,255,255$1120,825,255,255,255$1122,825,0,0,0$1123,825,0,0,0$1124,825,0,0,0$1125,825,0,0,0$1126,825,0,0,0$1127,825,0,0,0$1128,825,0,0,0$1034,826,0,0,0$1035,826,0,0,0$1036,826,0,0,0$1037,826,0,0,0$1038,826,0,0,0$1039,826,0,0,0$1040,826,0,0,0$1042,826,255,255,255$1046,826,255,255,255$1050,826,255,255,255$1055,826,255,255,255$1056,826,255,255,255$1057,826,255,255,255$1059,826,0,0,0$1060,826,0,0,0$1061,826,0,0,0$1062,826,0,0,0$1064,826,255,255,255$1065,826,255,255,255$1067,826,0,0,0$1068,826,0,0,0$1069,826,0,0,0$1074,826,255,255,255$1075,826,255,255,255$1076,826,255,255,255$1078,826,0,0,0$1079,826,0,0,0$1080,826,0,0,0$1081,826,0,0,0$1082,826,0,0,0$1087,826,0,0,0$1088,826,0,0,0$1089,826,0,0,0$1090,826,0,0,0$1091,826,0,0,0$1092,826,0,0,0$1093,826,0,0,0$1094,826,0,0,0$1095,826,0,0,0$1097,826,255,255,255$1098,826,255,255,255$1100,826,0,0,0$1101,826,0,0,0$1102,826,0,0,0$1103,826,0,0,0$1105,826,255,255,255$1106,826,255,255,255$1108,826,255,255,255$1111,826,0,0,0$1116,826,0,0,0$1117,826,0,0,0$1118,826,0,0,0$1120,826,255,255,255$1122,826,0,0,0$1123,826,0,0,0$1124,826,0,0,0$1125,826,0,0,0$1126,826,0,0,0$1127,826,0,0,0$1128,826,0,0,0$1034,827,0,0,0$1035,827,0,0,0$1036,827,0,0,0$1037,827,0,0,0$1038,827,0,0,0$1039,827,0,0,0$1040,827,0,0,0$1042,827,255,255,255$1044,827,0,0,0$1046,827,255,255,255$1056,827,255,255,255$1057,827,255,255,255$1059,827,0,0,0$1060,827,0,0,0$1061,827,0,0,0$1062,827,0,0,0$1064,827,255,255,255$1065,827,255,255,255$1068,827,0,0,0$1069,827,0,0,0$1073,827,255,255,255$1074,827,255,255,255$1075,827,255,255,255$1076,827,255,255,255$1078,827,0,0,0$1079,827,0,0,0$1080,827,0,0,0$1081,827,0,0,0$1082,827,0,0,0$1087,827,0,0,0$1088,827,0,0,0$1089,827,0,0,0$1090,827,0,0,0$1091,827,0,0,0$1092,827,0,0,0$1093,827,0,0,0$1094,827,0,0,0$1095,827,0,0,0$1097,827,255,255,255$1098,827,255,255,255$1100,827,0,0,0$1101,827,0,0,0$1102,827,0,0,0$1103,827,0,0,0$1106,827,255,255,255$1107,827,255,255,255$1108,827,255,255,255$1110,827,0,0,0$1111,827,0,0,0$1116,827,0,0,0$1117,827,0,0,0$1118,827,0,0,0$1120,827,255,255,255$1122,827,0,0,0$1123,827,0,0,0$1124,827,0,0,0$1125,827,0,0,0$1126,827,0,0,0$1127,827,0,0,0$1128,827,0,0,0$1034,828,0,0,0$1035,828,0,0,0$1036,828,0,0,0$1037,828,0,0,0$1038,828,0,0,0$1039,828,0,0,0$1040,828,0,0,0$1044,828,0,0,0$1052,828,0,0,0$1053,828,0,0,0$1056,828,255,255,255$1059,828,0,0,0$1060,828,0,0,0$1061,828,0,0,0$1062,828,0,0,0$1063,828,255,255,255$1064,828,255,255,255$1065,828,255,255,255$1066,828,255,255,255$1068,828,0,0,0$1069,828,0,0,0$1075,828,255,255,255$1077,828,0,0,0$1078,828,0,0,0$1079,828,0,0,0$1080,828,0,0,0$1081,828,0,0,0$1082,828,0,0,0$1087,828,0,0,0$1088,828,0,0,0$1089,828,0,0,0$1090,828,0,0,0$1091,828,0,0,0$1092,828,0,0,0$1093,828,0,0,0$1094,828,0,0,0$1095,828,0,0,0$1097,828,255,255,255$1100,828,0,0,0$1101,828,0,0,0$1102,828,0,0,0$1103,828,0,0,0$1104,828,0,0,0$1106,828,255,255,255$1107,828,255,255,255$1108,828,255,255,255$1110,828,0,0,0$1111,828,0,0,0$1116,828,0,0,0$1117,828,0,0,0$1118,828,0,0,0$1120,828,255,255,255$1122,828,0,0,0$1123,828,0,0,0$1124,828,0,0,0$1125,828,0,0,0$1126,828,0,0,0$1127,828,0,0,0$1128,828,0,0,0$1034,829,0,0,0$1035,829,0,0,0$1036,829,0,0,0$1037,829,0,0,0$1038,829,0,0,0$1039,829,0,0,0$1044,829,0,0,0$1052,829,0,0,0$1053,829,0,0,0$1054,829,0,0,0$1056,829,255,255,255$1058,829,0,0,0$1059,829,0,0,0$1060,829,0,0,0$1061,829,0,0,0$1063,829,255,255,255$1064,829,255,255,255$1065,829,255,255,255$1066,829,255,255,255$1068,829,0,0,0$1069,829,0,0,0$1070,829,0,0,0$1071,829,0,0,0$1072,829,0,0,0$1075,829,255,255,255$1077,829,0,0,0$1078,829,0,0,0$1079,829,0,0,0$1080,829,0,0,0$1081,829,0,0,0$1082,829,0,0,0$1087,829,0,0,0$1088,829,0,0,0$1089,829,0,0,0$1090,829,0,0,0$1091,829,0,0,0$1092,829,0,0,0$1093,829,0,0,0$1094,829,0,0,0$1095,829,0,0,0$1097,829,255,255,255$1100,829,0,0,0$1101,829,0,0,0$1102,829,0,0,0$1103,829,0,0,0$1104,829,0,0,0$1106,829,255,255,255$1107,829,255,255,255$1108,829,255,255,255$1111,829,0,0,0$1116,829,0,0,0$1117,829,0,0,0$1118,829,0,0,0$1120,829,255,255,255$1122,829,0,0,0$1123,829,0,0,0$1124,829,0,0,0$1125,829,0,0,0$1126,829,0,0,0$1127,829,0,0,0$1128,829,0,0,0$1034,830,0,0,0$1035,830,0,0,0$1036,830,0,0,0$1037,830,0,0,0$1038,830,0,0,0$1039,830,0,0,0$1041,830,255,255,255$1044,830,0,0,0$1046,830,255,255,255$1052,830,0,0,0$1056,830,255,255,255$1058,830,0,0,0$1059,830,0,0,0$1060,830,0,0,0$1063,830,255,255,255$1069,830,0,0,0$1070,830,0,0,0$1071,830,0,0,0$1072,830,0,0,0$1073,830,0,0,0$1075,830,255,255,255$1079,830,0,0,0$1080,830,0,0,0$1081,830,0,0,0$1084,830,255,255,255$1087,830,0,0,0$1088,830,0,0,0$1089,830,0,0,0$1090,830,0,0,0$1091,830,0,0,0$1092,830,0,0,0$1093,830,0,0,0$1094,830,0,0,0$1095,830,0,0,0$1097,830,255,255,255$1100,830,0,0,0$1101,830,0,0,0$1102,830,0,0,0$1105,830,255,255,255$1109,830,255,255,255$1120,830,255,255,255$1122,830,0,0,0$1123,830,0,0,0$1124,830,0,0,0$1125,830,0,0,0$1126,830,0,0,0$1127,830,0,0,0$1128,830,0,0,0$1034,831,0,0,0$1035,831,0,0,0$1036,831,0,0,0$1037,831,0,0,0$1038,831,0,0,0$1043,831,0,0,0$1052,831,0,0,0$1058,831,0,0,0$1059,831,0,0,0$1060,831,0,0,0$1070,831,0,0,0$1071,831,0,0,0$1072,831,0,0,0$1073,831,0,0,0$1080,831,0,0,0$1087,831,0,0,0$1088,831,0,0,0$1089,831,0,0,0$1090,831,0,0,0$1091,831,0,0,0$1092,831,0,0,0$1093,831,0,0,0$1094,831,0,0,0$1095,831,0,0,0$1100,831,0,0,0$1101,831,0,0,0$1102,831,0,0,0$1107,831,0,0,0$1122,831,0,0,0$1123,831,0,0,0$1124,831,0,0,0$1125,831,0,0,0$1126,831,0,0,0$1127,831,0,0,0$1128,831,0,0,0$1034,832,0,0,0$1035,832,0,0,0$1036,832,0,0,0$1037,832,0,0,0$1038,832,0,0,0$1039,832,0,0,0$1041,832,0,0,0$1042,832,0,0,0$1043,832,0,0,0$1044,832,0,0,0$1046,832,0,0,0$1047,832,0,0,0$1048,832,0,0,0$1050,832,0,0,0$1051,832,0,0,0$1052,832,0,0,0$1057,832,0,0,0$1058,832,0,0,0$1059,832,0,0,0$1060,832,0,0,0$1064,832,0,0,0$1065,832,0,0,0$1066,832,0,0,0$1069,832,0,0,0$1070,832,0,0,0$1071,832,0,0,0$1072,832,0,0,0$1073,832,0,0,0$1074,832,0,0,0$1075,832,0,0,0$1079,832,0,0,0$1080,832,0,0,0$1081,832,0,0,0$1085,832,0,0,0$1086,832,0,0,0$1087,832,0,0,0$1088,832,0,0,0$1089,832,0,0,0$1090,832,0,0,0$1091,832,0,0,0$1092,832,0,0,0$1093,832,0,0,0$1094,832,0,0,0$1095,832,0,0,0$1096,832,0,0,0$1097,832,0,0,0$1098,832,0,0,0$1099,832,0,0,0$1100,832,0,0,0$1101,832,0,0,0$1102,832,0,0,0$1106,832,0,0,0$1107,832,0,0,0$1108,832,0,0,0$1109,832,0,0,0$1120,832,0,0,0$1121,832,0,0,0$1122,832,0,0,0$1123,832,0,0,0$1124,832,0,0,0$1125,832,0,0,0$1126,832,0,0,0$1127,832,0,0,0$1128,832,0,0,0$1034,833,0,0,0$1035,833,0,0,0$1036,833,0,0,0$1037,833,0,0,0$1038,833,0,0,0$1039,833,0,0,0$1040,833,0,0,0$1041,833,0,0,0$1042,833,0,0,0$1043,833,0,0,0$1044,833,0,0,0$1045,833,0,0,0$1046,833,0,0,0$1047,833,0,0,0$1048,833,0,0,0$1049,833,0,0,0$1050,833,0,0,0$1051,833,0,0,0$1052,833,0,0,0$1053,833,0,0,0$1054,833,0,0,0$1055,833,0,0,0$1056,833,0,0,0$1057,833,0,0,0$1058,833,0,0,0$1059,833,0,0,0$1060,833,0,0,0$1061,833,0,0,0$1062,833,0,0,0$1063,833,0,0,0$1064,833,0,0,0$1065,833,0,0,0$1066,833,0,0,0$1067,833,0,0,0$1068,833,0,0,0$1069,833,0,0,0$1070,833,0,0,0$1071,833,0,0,0$1072,833,0,0,0$1073,833,0,0,0$1074,833,0,0,0$1075,833,0,0,0$1076,833,0,0,0$1077,833,0,0,0$1078,833,0,0,0$1079,833,0,0,0$1080,833,0,0,0$1081,833,0,0,0$1082,833,0,0,0$1083,833,0,0,0$1084,833,0,0,0$1085,833,0,0,0$1086,833,0,0,0$1087,833,0,0,0$1088,833,0,0,0$1089,833,0,0,0$1090,833,0,0,0$1091,833,0,0,0$1092,833,0,0,0$1093,833,0,0,0$1094,833,0,0,0$1095,833,0,0,0$1096,833,0,0,0$1097,833,0,0,0$1098,833,0,0,0$1099,833,0,0,0$1100,833,0,0,0$1101,833,0,0,0$1102,833,0,0,0$1103,833,0,0,0$1104,833,0,0,0$1105,833,0,0,0$1106,833,0,0,0$1107,833,0,0,0$1108,833,0,0,0$1109,833,0,0,0$1110,833,0,0,0$1111,833,0,0,0$1112,833,0,0,0$1113,833,0,0,0$1114,833,0,0,0$1115,833,0,0,0$1116,833,0,0,0$1117,833,0,0,0$1118,833,0,0,0$1119,833,0,0,0$1120,833,0,0,0$1121,833,0,0,0$1122,833,0,0,0$1123,833,0,0,0$1124,833,0,0,0$1125,833,0,0,0$1126,833,0,0,0$1127,833,0,0,0$1128,833,0,0,0");
        /// <summary>
        /// 查找DNF窗口
        /// </summary>
        /// <param name="cancelToken"></param>
        /// <param name="timeoutSecond"></param>
        /// <param name="gameRect"></param>
        /// <param name="loginMethod"></param>
        /// <param name="changeLMButtonRectangle"></param>
        /// <returns></returns>
        public static bool IsSelectRoleWindow(out ZTRectangle startGameButtonRect)
        {
 
            startGameButtonRect = ZTRectangle.Empty;
            System.Drawing.Bitmap bitmap = ScreenCapture.Instance.CaptureScreen();
            Image<Rgb, byte> image = new Image<Rgb, byte>(bitmap);
 
            ZTRectangle limit = new ZTRectangle(0, 0, image.Width, image.Height);
 
            //查找开始游戏按钮                    
            if (CVHelper.FindColorArrayForThreshold(out startGameButtonRect, image, startGameButton, limit))
            {
                return true;
            }
            return false;
        }
 
 
        /// <summary>
        /// 赛丽亚的房间邮件箱文字
        /// </summary>
        private static ColorArray MailText = ColorArray.FromThresholdString(94, "1568,530,0,0,0$1543,530,255,255,255$1546,530,0,0,0$1549,530,0,0,0$1554,530,0,0,0$1555,530,0,0,0$1556,530,0,0,0$1557,530,0,0,0$1558,530,0,0,0$1559,530,0,0,0$1560,530,0,0,0$1564,530,255,255,255$1566,530,0,0,0$1567,530,0,0,0$1569,530,0,0,0$1570,530,0,0,0$1572,530,255,255,255$1573,530,0,0,0$1574,530,0,0,0$1576,530,0,0,0$1579,530,0,0,0$1581,530,255,255,255$1583,530,0,0,0$1584,530,0,0,0$1585,530,0,0,0$1586,530,0,0,0$1587,530,0,0,0$1588,530,255,255,255$1590,530,0,0,0$1591,530,0,0,0$1592,530,0,0,0$1593,530,0,0,0$1594,530,0,0,0$1595,530,0,0,0$1596,530,0,0,0$1598,530,255,255,255$1599,530,255,255,255$1600,530,255,255,255$1601,530,255,255,255$1602,530,255,255,255$1546,531,0,0,0$1549,531,0,0,0$1554,531,0,0,0$1556,531,255,255,255$1557,531,255,255,255$1558,531,255,255,255$1560,531,0,0,0$1561,531,0,0,0$1562,531,0,0,0$1564,531,255,255,255$1566,531,0,0,0$1569,531,0,0,0$1570,531,0,0,0$1572,531,255,255,255$1573,531,0,0,0$1574,531,0,0,0$1575,531,0,0,0$1576,531,0,0,0$1577,531,0,0,0$1578,531,0,0,0$1579,531,0,0,0$1581,531,255,255,255$1582,531,255,255,255$1583,531,255,255,255$1584,531,255,255,255$1585,531,255,255,255$1587,531,0,0,0$1588,531,255,255,255$1589,531,255,255,255$1590,531,255,255,255$1591,531,255,255,255$1592,531,255,255,255$1593,531,255,255,255$1594,531,255,255,255$1596,531,0,0,0$1598,531,255,255,255$1599,531,255,255,255$1600,531,255,255,255$1601,531,255,255,255$1602,531,255,255,255$1546,532,0,0,0$1549,532,0,0,0$1550,532,0,0,0$1553,532,0,0,0$1555,532,255,255,255$1556,532,255,255,255$1558,532,255,255,255$1560,532,0,0,0$1561,532,0,0,0$1567,532,255,255,255$1569,532,0,0,0$1570,532,0,0,0$1572,532,255,255,255$1573,532,0,0,0$1574,532,0,0,0$1575,532,0,0,0$1576,532,0,0,0$1577,532,0,0,0$1578,532,0,0,0$1583,532,255,255,255$1584,532,255,255,255$1591,532,255,255,255$1592,532,255,255,255$1596,532,0,0,0$1598,532,255,255,255$1599,532,255,255,255$1600,532,255,255,255$1601,532,255,255,255$1602,532,255,255,255$1541,533,0,0,0$1542,533,0,0,0$1543,533,0,0,0$1544,533,0,0,0$1545,533,0,0,0$1546,533,0,0,0$1548,533,255,255,255$1549,533,0,0,0$1550,533,0,0,0$1551,533,0,0,0$1552,533,0,0,0$1553,533,0,0,0$1555,533,255,255,255$1558,533,255,255,255$1560,533,0,0,0$1561,533,0,0,0$1563,533,255,255,255$1564,533,0,0,0$1565,533,0,0,0$1567,533,255,255,255$1569,533,0,0,0$1570,533,0,0,0$1572,533,255,255,255$1574,533,0,0,0$1575,533,0,0,0$1576,533,0,0,0$1577,533,0,0,0$1578,533,0,0,0$1579,533,255,255,255$1581,533,0,0,0$1582,533,0,0,0$1585,533,0,0,0$1588,533,0,0,0$1589,533,0,0,0$1590,533,0,0,0$1591,533,255,255,255$1593,533,0,0,0$1594,533,0,0,0$1595,533,0,0,0$1596,533,0,0,0$1598,533,255,255,255$1599,533,255,255,255$1600,533,255,255,255$1601,533,255,255,255$1602,533,255,255,255$1541,534,0,0,0$1544,534,255,255,255$1545,534,255,255,255$1546,534,255,255,255$1547,534,255,255,255$1548,534,255,255,255$1549,534,255,255,255$1550,534,255,255,255$1551,534,255,255,255$1552,534,255,255,255$1555,534,255,255,255$1558,534,255,255,255$1560,534,0,0,0$1561,534,0,0,0$1563,534,255,255,255$1564,534,0,0,0$1565,534,0,0,0$1567,534,255,255,255$1568,534,255,255,255$1569,534,255,255,255$1570,534,255,255,255$1571,534,255,255,255$1572,534,255,255,255$1573,534,255,255,255$1574,534,255,255,255$1575,534,255,255,255$1576,534,255,255,255$1578,534,0,0,0$1580,534,0,0,0$1581,534,0,0,0$1584,534,0,0,0$1585,534,0,0,0$1586,534,0,0,0$1587,534,0,0,0$1588,534,0,0,0$1589,534,0,0,0$1590,534,0,0,0$1591,534,0,0,0$1592,534,0,0,0$1593,534,0,0,0$1594,534,0,0,0$1595,534,0,0,0$1596,534,0,0,0$1598,534,255,255,255$1599,534,255,255,255$1600,534,255,255,255$1601,534,255,255,255$1602,534,255,255,255$1541,535,0,0,0$1543,535,255,255,255$1547,535,255,255,255$1548,535,255,255,255$1552,535,255,255,255$1555,535,255,255,255$1560,535,0,0,0$1562,535,255,255,255$1563,535,255,255,255$1564,535,0,0,0$1571,535,255,255,255$1572,535,255,255,255$1578,535,0,0,0$1579,535,0,0,0$1580,535,0,0,0$1581,535,0,0,0$1582,535,255,255,255$1584,535,0,0,0$1585,535,0,0,0$1596,535,0,0,0$1598,535,255,255,255$1599,535,255,255,255$1600,535,255,255,255$1601,535,255,255,255$1541,536,0,0,0$1543,536,255,255,255$1545,536,0,0,0$1546,536,0,0,0$1549,536,0,0,0$1550,536,0,0,0$1552,536,255,255,255$1555,536,255,255,255$1556,536,255,255,255$1557,536,255,255,255$1558,536,0,0,0$1559,536,0,0,0$1561,536,255,255,255$1562,536,255,255,255$1563,536,255,255,255$1564,536,0,0,0$1567,536,0,0,0$1568,536,0,0,0$1569,536,0,0,0$1570,536,0,0,0$1572,536,255,255,255$1573,536,0,0,0$1574,536,0,0,0$1575,536,0,0,0$1576,536,0,0,0$1577,536,0,0,0$1578,536,0,0,0$1579,536,0,0,0$1580,536,0,0,0$1582,536,255,255,255$1584,536,0,0,0$1585,536,0,0,0$1587,536,255,255,255$1588,536,255,255,255$1589,536,255,255,255$1590,536,255,255,255$1591,536,255,255,255$1592,536,255,255,255$1593,536,255,255,255$1594,536,255,255,255$1596,536,0,0,0$1598,536,255,255,255$1599,536,255,255,255$1600,536,255,255,255$1601,536,255,255,255$1541,537,0,0,0$1543,537,255,255,255$1545,537,0,0,0$1546,537,0,0,0$1549,537,0,0,0$1550,537,0,0,0$1552,537,255,255,255$1555,537,255,255,255$1556,537,255,255,255$1557,537,255,255,255$1558,537,0,0,0$1559,537,0,0,0$1560,537,0,0,0$1563,537,255,255,255$1564,537,0,0,0$1565,537,0,0,0$1566,537,0,0,0$1567,537,0,0,0$1568,537,0,0,0$1569,537,0,0,0$1570,537,0,0,0$1572,537,255,255,255$1573,537,0,0,0$1578,537,0,0,0$1580,537,255,255,255$1581,537,255,255,255$1582,537,255,255,255$1583,537,255,255,255$1584,537,255,255,255$1585,537,255,255,255$1586,537,255,255,255$1587,537,255,255,255$1594,537,255,255,255$1596,537,0,0,0$1598,537,255,255,255$1599,537,255,255,255$1600,537,255,255,255$1601,537,255,255,255$1541,538,0,0,0$1543,538,255,255,255$1547,538,255,255,255$1548,538,255,255,255$1552,538,255,255,255$1555,538,255,255,255$1556,538,255,255,255$1559,538,0,0,0$1560,538,0,0,0$1561,538,0,0,0$1563,538,255,255,255$1564,538,0,0,0$1565,538,0,0,0$1566,538,0,0,0$1567,538,0,0,0$1568,538,0,0,0$1569,538,0,0,0$1570,538,0,0,0$1572,538,255,255,255$1573,538,0,0,0$1578,538,0,0,0$1582,538,255,255,255$1583,538,255,255,255$1586,538,255,255,255$1587,538,255,255,255$1594,538,255,255,255$1596,538,0,0,0$1598,538,255,255,255$1599,538,255,255,255$1600,538,255,255,255$1601,538,255,255,255$1603,538,255,255,255$1541,539,0,0,0$1543,539,255,255,255$1544,539,255,255,255$1545,539,255,255,255$1546,539,255,255,255$1547,539,255,255,255$1548,539,255,255,255$1549,539,255,255,255$1550,539,255,255,255$1551,539,255,255,255$1552,539,255,255,255$1555,539,255,255,255$1558,539,255,255,255$1560,539,0,0,0$1561,539,0,0,0$1563,539,255,255,255$1564,539,0,0,0$1565,539,0,0,0$1566,539,0,0,0$1567,539,0,0,0$1568,539,0,0,0$1569,539,0,0,0$1570,539,0,0,0$1572,539,255,255,255$1573,539,0,0,0$1574,539,0,0,0$1575,539,0,0,0$1576,539,0,0,0$1577,539,0,0,0$1578,539,0,0,0$1579,539,0,0,0$1580,539,0,0,0$1582,539,255,255,255$1584,539,0,0,0$1585,539,0,0,0$1587,539,255,255,255$1588,539,255,255,255$1589,539,255,255,255$1590,539,255,255,255$1591,539,255,255,255$1592,539,255,255,255$1593,539,255,255,255$1594,539,255,255,255$1596,539,0,0,0$1598,539,255,255,255$1599,539,255,255,255$1600,539,255,255,255$1601,539,255,255,255$1603,539,255,255,255$1541,540,0,0,0$1543,540,255,255,255$1548,540,255,255,255$1552,540,255,255,255$1555,540,255,255,255$1558,540,255,255,255$1560,540,0,0,0$1561,540,0,0,0$1563,540,255,255,255$1564,540,0,0,0$1566,540,255,255,255$1567,540,255,255,255$1568,540,255,255,255$1569,540,255,255,255$1570,540,255,255,255$1571,540,255,255,255$1572,540,255,255,255$1573,540,255,255,255$1574,540,255,255,255$1575,540,255,255,255$1576,540,255,255,255$1578,540,0,0,0$1579,540,0,0,0$1581,540,255,255,255$1582,540,255,255,255$1583,540,255,255,255$1585,540,0,0,0$1587,540,255,255,255$1594,540,255,255,255$1596,540,0,0,0$1598,540,255,255,255$1599,540,255,255,255$1600,540,255,255,255$1601,540,255,255,255$1603,540,255,255,255$1541,541,0,0,0$1543,541,255,255,255$1545,541,0,0,0$1546,541,0,0,0$1549,541,0,0,0$1550,541,0,0,0$1552,541,255,255,255$1555,541,255,255,255$1558,541,255,255,255$1560,541,0,0,0$1561,541,0,0,0$1563,541,255,255,255$1564,541,0,0,0$1571,541,255,255,255$1572,541,255,255,255$1578,541,0,0,0$1582,541,255,255,255$1583,541,255,255,255$1587,541,255,255,255$1594,541,255,255,255$1596,541,0,0,0$1598,541,255,255,255$1599,541,255,255,255$1600,541,255,255,255$1601,541,255,255,255$1603,541,255,255,255$1543,542,255,255,255$1545,542,0,0,0$1546,542,0,0,0$1549,542,0,0,0$1550,542,0,0,0$1552,542,255,255,255$1555,542,255,255,255$1558,542,255,255,255$1560,542,0,0,0$1561,542,0,0,0$1563,542,255,255,255$1564,542,0,0,0$1565,542,0,0,0$1566,542,0,0,0$1567,542,0,0,0$1568,542,0,0,0$1569,542,0,0,0$1570,542,0,0,0$1572,542,255,255,255$1573,542,0,0,0$1574,542,0,0,0$1575,542,0,0,0$1576,542,0,0,0$1577,542,0,0,0$1578,542,0,0,0$1579,542,255,255,255$1581,542,0,0,0$1582,542,255,255,255$1584,542,0,0,0$1585,542,255,255,255$1586,542,255,255,255$1587,542,255,255,255$1588,542,255,255,255$1589,542,255,255,255$1590,542,255,255,255$1591,542,255,255,255$1592,542,255,255,255$1593,542,255,255,255$1594,542,255,255,255$1596,542,0,0,0$1598,542,255,255,255$1599,542,255,255,255$1600,542,255,255,255$1601,542,255,255,255$1543,543,255,255,255$1545,543,0,0,0$1546,543,0,0,0$1549,543,0,0,0$1550,543,0,0,0$1552,543,255,255,255$1555,543,255,255,255$1556,543,255,255,255$1559,543,0,0,0$1560,543,0,0,0$1561,543,0,0,0$1563,543,255,255,255$1564,543,0,0,0$1565,543,0,0,0$1570,543,0,0,0$1572,543,255,255,255$1573,543,0,0,0$1578,543,0,0,0$1580,543,0,0,0$1581,543,0,0,0$1582,543,255,255,255$1584,543,0,0,0$1587,543,255,255,255$1594,543,255,255,255$1596,543,0,0,0$1598,543,255,255,255$1599,543,255,255,255$1600,543,255,255,255$1601,543,255,255,255$1543,544,255,255,255$1547,544,255,255,255$1548,544,255,255,255$1552,544,255,255,255$1555,544,255,255,255$1556,544,255,255,255$1558,544,0,0,0$1559,544,0,0,0$1560,544,0,0,0$1561,544,0,0,0$1563,544,255,255,255$1564,544,0,0,0$1570,544,0,0,0$1572,544,255,255,255$1573,544,0,0,0$1575,544,255,255,255$1576,544,255,255,255$1580,544,0,0,0$1581,544,0,0,0$1582,544,255,255,255$1584,544,0,0,0$1585,544,0,0,0$1587,544,255,255,255$1594,544,255,255,255$1596,544,0,0,0$1597,544,255,255,255$1598,544,255,255,255$1599,544,255,255,255$1600,544,255,255,255$1601,544,255,255,255$1603,544,255,255,255$1539,545,255,255,255$1543,545,255,255,255$1544,545,255,255,255$1545,545,255,255,255$1546,545,255,255,255$1547,545,255,255,255$1548,545,255,255,255$1549,545,255,255,255$1550,545,255,255,255$1551,545,255,255,255$1552,545,255,255,255$1555,545,255,255,255$1557,545,0,0,0$1558,545,0,0,0$1559,545,0,0,0$1560,545,0,0,0$1561,545,0,0,0$1563,545,255,255,255$1564,545,0,0,0$1570,545,0,0,0$1572,545,255,255,255$1573,545,0,0,0$1575,545,255,255,255$1576,545,255,255,255$1577,545,255,255,255$1578,545,255,255,255$1579,545,255,255,255$1581,545,0,0,0$1582,545,255,255,255$1584,545,0,0,0$1585,545,0,0,0$1587,545,255,255,255$1588,545,255,255,255$1589,545,255,255,255$1590,545,255,255,255$1591,545,255,255,255$1592,545,255,255,255$1593,545,255,255,255$1594,545,255,255,255$1596,545,0,0,0$1597,545,255,255,255$1598,545,255,255,255$1599,545,255,255,255$1600,545,255,255,255$1601,545,255,255,255$1602,545,255,255,255$1603,545,255,255,255$1539,546,255,255,255$1540,546,255,255,255$1543,546,255,255,255$1552,546,255,255,255$1555,546,255,255,255$1557,546,0,0,0$1558,546,0,0,0$1559,546,0,0,0$1560,546,0,0,0$1561,546,0,0,0$1563,546,255,255,255$1564,546,0,0,0$1570,546,0,0,0$1572,546,255,255,255$1573,546,0,0,0$1575,546,255,255,255$1576,546,255,255,255$1577,546,255,255,255$1578,546,255,255,255$1581,546,0,0,0$1582,546,255,255,255$1584,546,0,0,0$1585,546,0,0,0$1587,546,255,255,255$1594,546,255,255,255$1596,546,0,0,0$1597,546,255,255,255$1598,546,255,255,255$1599,546,255,255,255$1600,546,255,255,255$1601,546,255,255,255$1602,546,255,255,255$1603,546,255,255,255$1539,547,255,255,255$1540,547,255,255,255$1542,547,0,0,0$1545,547,0,0,0$1546,547,0,0,0$1549,547,0,0,0$1550,547,0,0,0$1551,547,0,0,0$1554,547,0,0,0$1557,547,0,0,0$1558,547,0,0,0$1560,547,0,0,0$1561,547,0,0,0$1564,547,0,0,0$1570,547,0,0,0$1573,547,0,0,0$1575,547,255,255,255$1576,547,255,255,255$1577,547,255,255,255$1581,547,0,0,0$1584,547,0,0,0$1585,547,0,0,0$1588,547,0,0,0$1589,547,0,0,0$1590,547,0,0,0$1593,547,0,0,0$1596,547,0,0,0$1598,547,255,255,255$1599,547,255,255,255$1600,547,255,255,255$1601,547,255,255,255$1602,547,255,255,255$1603,547,255,255,255$1539,548,255,255,255$1540,548,255,255,255$1542,548,0,0,0$1543,548,0,0,0$1544,548,0,0,0$1545,548,0,0,0$1550,548,0,0,0$1551,548,0,0,0$1552,548,0,0,0$1553,548,0,0,0$1554,548,0,0,0$1555,548,0,0,0$1556,548,0,0,0$1557,548,0,0,0$1558,548,0,0,0$1561,548,0,0,0$1562,548,0,0,0$1563,548,0,0,0$1564,548,0,0,0$1570,548,0,0,0$1571,548,0,0,0$1572,548,0,0,0$1573,548,0,0,0$1575,548,255,255,255$1576,548,255,255,255$1577,548,255,255,255$1581,548,0,0,0$1582,548,0,0,0$1583,548,0,0,0$1584,548,0,0,0$1585,548,0,0,0$1586,548,0,0,0$1587,548,0,0,0$1588,548,0,0,0$1589,548,0,0,0$1591,548,255,255,255$1593,548,0,0,0$1594,548,0,0,0$1595,548,0,0,0$1596,548,0,0,0$1597,548,255,255,255$1598,548,255,255,255$1599,548,255,255,255$1600,548,255,255,255$1601,548,255,255,255$1602,548,255,255,255$1603,548,255,255,255$1539,549,255,255,255$1540,549,255,255,255$1541,549,255,255,255$1555,549,0,0,0$1556,549,0,0,0$1557,549,0,0,0$1558,549,0,0,0$1567,549,255,255,255$1568,549,255,255,255$1569,549,255,255,255$1575,549,255,255,255$1576,549,255,255,255$1591,549,255,255,255$1592,549,255,255,255$1597,549,255,255,255$1598,549,255,255,255$1599,549,255,255,255$1600,549,255,255,255$1601,549,255,255,255$1602,549,255,255,255$1603,549,255,255,255");
 
        //艾尔文防线文字
        private static ColorArray AierwenText = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "1199,47,230,200,155$1177,47,230,200,155$1180,47,230,200,155$1180,45,230,200,155$1184,45,230,200,155$1184,47,230,200,155$1187,47,230,200,155$1187,56,230,200,155$1177,56,230,200,155$1194,56,230,200,155$1194,49,230,200,155$1191,47,230,200,155$1191,45,230,200,155$1199,54,230,200,155$1201,56,230,200,155$1211,56,230,200,155$1206,53,230,200,155$1206,47,230,200,155$1201,47,230,200,155$1211,47,230,200,155$1205,45,230,200,155$1213,46,230,200,155$1213,56,230,200,155$1217,56,230,200,155$1221,56,230,200,155$1222,56,230,200,155$1223,55,230,200,155$1225,55,230,200,155$1231,55,230,200,155$1229,56,230,200,155$1235,56,230,200,155$1235,54,230,200,155$1235,50,230,200,155$1235,47,230,200,155$1235,46,230,200,155$1234,45,230,200,155$1232,45,230,200,155$1227,45,230,200,155$1219,45,230,200,155");
 
        /// <summary>
        /// 是否在赛丽亚的房间
        /// </summary>
        /// <returns></returns>
        public static bool IsInSaiLiYaHouse(ZTRectangle gameRect)
        {
            ZTRectangle mailText = ZTRectangle.Empty;
            Structs.ZTPoint limitPoint = gameRect.GetRatioPoint(0.667f);
            ZTRectangle limit = new ZTRectangle(limitPoint.X, gameRect.Start.Y, gameRect.End.X, gameRect.End.Y);
            //截图
            System.Drawing.Bitmap bitmap = ScreenCapture.Instance.CaptureScreen();
            Image<Rgb, byte> image = new Image<Rgb, byte>(bitmap);
 
            //查找地图右上边的艾尔文防线文字
            if (CVHelper.FindColorArray(out mailText, image, AierwenText, gameRect))
            {
                return true;
            }
            ////查找邮件箱                   
            //if (CVHelper.FindColorArrayForThreshold(out mailText, image, MailText,limit))
            //{
            //    return true;
            //}
            return false;
        }
 
        /// <summary>
        /// 弹出窗关闭按钮
        /// </summary>
        private static ColorArray AlterWindowCloseButton = ColorArray.FromThresholdString(107, "1153,291,255,255,255$1151,289,255,255,255$1152,289,255,255,255$1161,289,255,255,255$1162,289,255,255,255$1151,290,0,0,0$1152,290,255,255,255$1153,290,255,255,255$1160,290,255,255,255$1161,290,255,255,255$1152,291,0,0,0$1154,291,255,255,255$1159,291,255,255,255$1160,291,255,255,255$1161,291,0,0,0$1153,292,0,0,0$1154,292,255,255,255$1155,292,255,255,255$1158,292,255,255,255$1159,292,255,255,255$1160,292,0,0,0$1154,293,0,0,0$1155,293,255,255,255$1156,293,255,255,255$1157,293,255,255,255$1158,293,255,255,255$1159,293,0,0,0$1155,294,0,0,0$1156,294,255,255,255$1157,294,255,255,255$1158,294,0,0,0$1148,295,0,0,0$1149,295,0,0,0$1150,295,0,0,0$1151,295,0,0,0$1152,295,0,0,0$1153,295,0,0,0$1155,295,255,255,255$1156,295,255,255,255$1157,295,255,255,255$1158,295,255,255,255$1159,295,0,0,0$1160,295,0,0,0$1161,295,0,0,0$1162,295,0,0,0$1148,296,0,0,0$1149,296,0,0,0$1150,296,0,0,0$1151,296,0,0,0$1152,296,0,0,0$1154,296,255,255,255$1155,296,255,255,255$1156,296,0,0,0$1157,296,0,0,0$1158,296,255,255,255$1159,296,255,255,255$1161,296,0,0,0$1162,296,0,0,0$1148,297,0,0,0$1149,297,0,0,0$1150,297,0,0,0$1151,297,0,0,0$1153,297,255,255,255$1154,297,255,255,255$1155,297,0,0,0$1156,297,0,0,0$1157,297,0,0,0$1158,297,0,0,0$1159,297,255,255,255$1160,297,255,255,255$1162,297,0,0,0$1152,298,255,255,255$1153,298,255,255,255$1154,298,0,0,0$1159,298,0,0,0$1160,298,255,255,255$1161,298,255,255,255$1151,299,255,255,255$1152,299,255,255,255$1153,299,0,0,0$1160,299,0,0,0$1161,299,255,255,255$1162,299,255,255,255$1151,300,0,0,0$1152,300,0,0,0$1161,300,0,0,0$1162,300,0,0,0");
 
        /// <summary>
        /// 弹出公告的关闭按钮,比弹出窗的关闭按钮小一点
        /// </summary>
        private static ColorArray AlterNoticeWindowCloseButton = ColorArray.FromThresholdString(107, "1272,203,0,0,0$1263,203,0,0,0$1264,203,0,0,0$1265,203,0,0,0$1266,203,0,0,0$1267,203,0,0,0$1268,203,0,0,0$1269,203,0,0,0$1270,203,0,0,0$1271,203,0,0,0$1263,204,0,0,0$1264,204,0,0,0$1265,204,255,255,255$1266,204,255,255,255$1267,204,0,0,0$1268,204,0,0,0$1269,204,0,0,0$1270,204,0,0,0$1271,204,255,255,255$1272,204,255,255,255$1263,205,0,0,0$1264,205,0,0,0$1265,205,0,0,0$1266,205,255,255,255$1267,205,255,255,255$1268,205,0,0,0$1269,205,0,0,0$1270,205,255,255,255$1271,205,255,255,255$1272,205,0,0,0$1263,206,0,0,0$1264,206,0,0,0$1265,206,0,0,0$1266,206,0,0,0$1267,206,255,255,255$1268,206,255,255,255$1269,206,255,255,255$1270,206,255,255,255$1271,206,0,0,0$1272,206,0,0,0$1263,207,0,0,0$1264,207,0,0,0$1265,207,0,0,0$1266,207,0,0,0$1267,207,0,0,0$1268,207,255,255,255$1269,207,255,255,255$1270,207,0,0,0$1271,207,0,0,0$1272,207,0,0,0$1263,208,0,0,0$1264,208,0,0,0$1265,208,0,0,0$1266,208,0,0,0$1267,208,255,255,255$1268,208,255,255,255$1269,208,255,255,255$1270,208,255,255,255$1271,208,0,0,0$1272,208,0,0,0$1263,209,0,0,0$1264,209,0,0,0$1265,209,0,0,0$1266,209,255,255,255$1267,209,255,255,255$1268,209,0,0,0$1269,209,0,0,0$1270,209,255,255,255$1271,209,255,255,255$1272,209,0,0,0$1263,210,0,0,0$1264,210,0,0,0$1265,210,255,255,255$1266,210,255,255,255$1267,210,0,0,0$1268,210,0,0,0$1269,210,0,0,0$1270,210,0,0,0$1271,210,255,255,255$1272,210,255,255,255$1263,211,0,0,0$1264,211,0,0,0$1265,211,0,0,0$1266,211,0,0,0$1267,211,0,0,0$1268,211,0,0,0$1269,211,0,0,0$1270,211,0,0,0$1271,211,0,0,0$1272,211,0,0,0$1263,212,0,0,0$1264,212,0,0,0$1265,212,0,0,0$1266,212,0,0,0$1267,212,0,0,0$1268,212,0,0,0$1269,212,0,0,0$1270,212,0,0,0$1271,212,0,0,0$1272,212,0,0,0");
 
        /// <summary>
        /// 查找弹出窗
        /// </summary>
        /// <param name="closeButtonRect"></param>
        /// <param name="image"></param>
        /// <returns></returns>
        public static bool GetAlertWindow(out ZTRectangle closeButtonRect, Image<Rgb, byte> image, ZTRectangle gameRect)
        {
            closeButtonRect = ZTRectangle.Empty;
            if (!CVHelper.FindColorArrayForThreshold(out closeButtonRect, image, AlterWindowCloseButton, gameRect))
            {
                if (!CVHelper.FindColorArrayForThreshold(out closeButtonRect, image, AlterNoticeWindowCloseButton, gameRect))
                {
                    return false;
                }
            }
 
            ZTLine upLine = ZTLine.Empty;
            ZTRectangle limit = new ZTRectangle(closeButtonRect.Start.X, closeButtonRect.Start.Y - 14, closeButtonRect.Start.X + 25, closeButtonRect.Start.Y);
            //找上线
            if (!CVHelper.FindLine(out upLine, image, 10, limit, Orientation.Horizontal, new ZTColor(0, 0, 0)))
            {
                return false;
            }
 
            ZTLine rightLine = ZTLine.Empty;
            limit = new ZTRectangle(upLine.X + upLine.Length, upLine.Y, upLine.X + upLine.Length + 8, upLine.Y + 30);
            //找右线
            if (!CVHelper.FindLine(out rightLine, image, 10, limit, Orientation.Vertical, new ZTColor(0, 0, 0)))
            {
                return false;
            }
 
            ZTLine downLine = ZTLine.Empty;
            limit = new ZTRectangle(upLine.X, rightLine.Y + rightLine.Length, rightLine.X, rightLine.Y + rightLine.Length + 14);
            //找下线
            if (!CVHelper.FindLine(out downLine, image, 10, limit, Orientation.Horizontal, new ZTColor(0, 0, 0)))
            {
                return false;
            }
 
            return true;
        }
 
 
        private static ZTHsvFloatColor minPilaozhi = new ZTHsvFloatColor(0.566f, 0.998f, 0.943f);
        private static ZTHsvFloatColor maxPilaozhi = new ZTHsvFloatColor(0.570f, 1.0f, 0.947f);
 
        private static ZTHsvFloatColor minPilaozhi_last = new ZTHsvFloatColor(0.963f, 0.998f, 0.700f);
        private static ZTHsvFloatColor maxPilaozhi_last = new ZTHsvFloatColor(0.967f, 1.0f, 0.704f);
        /// <summary>
        /// 得到疲劳值
        /// </summary>
        /// <returns></returns>
        public static Int32 GetPiLaoZhi(ZTRectangle gameRect)
        {
            //疲劳值范围
            ZTRectangle findLimitRect = new ZTRectangle(gameRect.Start.X + 550, gameRect.End.Y - 55, gameRect.Start.X + 750, gameRect.End.Y - 35);
 
 
            //截图
            System.Drawing.Bitmap bitmap = ScreenCapture.Instance.CaptureScreen();
            Image<Rgb, byte> image = new Image<Rgb, byte>(bitmap);
            ZTLine line = ZTLine.Empty;
 
 
            bool findResult = CVHelper.FindLine(out line, image, 0, findLimitRect, Orientation.Horizontal, minPilaozhi, maxPilaozhi);
            if (findResult)
            {
                return line.Length;
            }
 
            findResult = CVHelper.FindLine(out line, image, 0, findLimitRect, Orientation.Horizontal, minPilaozhi_last, maxPilaozhi_last);
            if (findResult)
            {
                return line.Length;
            }
            return 0;
        }
 
        private static ZTHsvFloatColor rightMiniMapMin = new ZTHsvFloatColor(0.100, 0.312, 0.547);
        private static ZTHsvFloatColor rightMiniMapMax = new ZTHsvFloatColor(0.104, 0.316, 0.551);
 
 
        private static ZTHsvFloatColor bottomMiniMapMin = new ZTHsvFloatColor(0.109, 0.309, 0.414);
        private static ZTHsvFloatColor bottomMiniMapMax = new ZTHsvFloatColor(0.113, 0.313, 0.418);
 
 
        /// <summary>
        /// 查找小地图区域
        /// </summary>
        /// <param name="minimapRect"></param>
        /// <returns></returns>
        public static bool FindMiniMap(out ZTRectangle minimapRect, Image<Rgb, byte> image, ZTRectangle gameRect)
        {
            Int32 rightBorderLen = 104;//右边框最小长度
            Int32 bottomBorderLen = 70;//下边框最小长度
            ZTLine right = ZTLine.Empty;
            ZTLine bottom = ZTLine.Empty;
            ZTRectangle limit = new ZTRectangle(gameRect.Start.X + 640, gameRect.Start.Y, gameRect.End.X, gameRect.Start.Y + 360);
 
 
            if (CVHelper.FindLine(out bottom, image, bottomBorderLen, limit, Orientation.Horizontal, bottomMiniMapMin, bottomMiniMapMax))
            {
                if (CVHelper.FindLine(out right, image, rightBorderLen, limit, Orientation.Vertical, rightMiniMapMin, rightMiniMapMax))
                {
                    //匹配成功
                    minimapRect = new ZTRectangle(bottom.X, right.Y, right.X, bottom.Y);
                    return true;
 
                }
            }
            minimapRect = ZTRectangle.Empty;
            return false;
        }
 
 
        /// <summary>
        /// 所有房间刷完之后奖励文字
        /// </summary>
        public static ColorArray Jiangli = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "649,65,255,255,255$672,66,255,255,255$600,62,255,255,255$608,67,255,255,255$630,67,255,255,255$669,94,255,255,255$645,90,255,255,255$620,92,255,255,255$654,79,255,255,255");
        public static bool IsJiangli(Image<Rgb, byte> image, ZTRectangle gameRect)
        {
            ZTRectangle limit = new ZTRectangle(gameRect.Start.X + 575, gameRect.Start.Y + 35, gameRect.Start.X + 700, gameRect.Start.Y + 110);
            ZTRectangle position = ZTRectangle.Empty;
            return CVHelper.FindColorArray(out position, image, Jiangli, limit);
        }
 
 
        /// <summary>
        /// 凛冬所有房间刷完之后的那个加号
        /// </summary>
        public static ColorArray LindongPlus = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "1149,178,213,156,48$1148,174,255,201,99$1149,174,255,211,127$1148,178,217,159,50$1144,178,255,201,95$1144,177,255,201,99$1152,177,214,169,83$1152,178,191,139,37$1149,181,192,153,74$1148,181,189,137,36$1147,181,109,8,6$1147,174,115,9,5");
 
        public static bool IsCompleteRoom(Image<Rgb, byte> image, ZTRectangle gameRect)
        {
            ZTRectangle limit = new ZTRectangle(gameRect.End.X - 185, gameRect.Start.Y + 150, gameRect.End.X - 85, gameRect.Start.Y + 205);
            ZTRectangle position = ZTRectangle.Empty;
            return CVHelper.FindColorArray(out position, image, LindongPlus, limit);
        }
 
 
        /// <summary>
        /// 加百利关闭按钮
        /// </summary>
        public static ColorArray shopCloseButton = ColorArray.FromThresholdString(130, "550,457,255,255,255$542,450,255,255,255$543,450,255,255,255$552,450,255,255,255$553,450,255,255,255$542,451,0,0,0$543,451,255,255,255$544,451,255,255,255$551,451,255,255,255$552,451,255,255,255$553,451,0,0,0$543,452,0,0,0$544,452,255,255,255$545,452,255,255,255$550,452,255,255,255$551,452,255,255,255$552,452,0,0,0$544,453,0,0,0$545,453,255,255,255$546,453,255,255,255$549,453,255,255,255$550,453,255,255,255$551,453,0,0,0$545,454,0,0,0$546,454,255,255,255$547,454,255,255,255$548,454,255,255,255$549,454,255,255,255$550,454,0,0,0$546,455,0,0,0$547,455,255,255,255$548,455,255,255,255$549,455,0,0,0$546,456,255,255,255$547,456,255,255,255$548,456,255,255,255$549,456,255,255,255$545,457,255,255,255$546,457,255,255,255$547,457,0,0,0$548,457,0,0,0$549,457,255,255,255$544,458,255,255,255$545,458,255,255,255$546,458,0,0,0$549,458,0,0,0$550,458,255,255,255$551,458,255,255,255$543,459,255,255,255$544,459,255,255,255$545,459,0,0,0$550,459,0,0,0$551,459,255,255,255$552,459,255,255,255$542,460,255,255,255$543,460,255,255,255$544,460,0,0,0$551,460,0,0,0$552,460,255,255,255$553,460,255,255,255$542,461,0,0,0$543,461,0,0,0$552,461,0,0,0$553,461,0,0,0");
        /// <summary>
        /// 出售按钮
        /// </summary>
        public static ColorArray shopSaleButton = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "204,516,221,197,147$184,508,221,197,147$184,511,221,197,147$188,511,221,197,147$188,507,221,197,147$192,508,221,197,147$192,511,221,197,147$193,514,221,197,147$193,518,221,197,147$188,517,221,197,147$183,517,221,197,147$183,514,221,197,147$196,516,221,197,147$204,518,221,197,147$196,518,221,197,147$196,514,221,197,147$198,508,221,197,147$201,508,221,197,147$201,507,221,197,147$205,508,221,197,147$204,512,221,197,147$205,514,221,197,147");
        public static bool HasSaleButton(out ZTRectangle saleButtonPosition, out ZTRectangle closeButtonPosition, ZTRectangle gameRect)
        {
            Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage();
            saleButtonPosition = ZTRectangle.Empty;
            closeButtonPosition = ZTRectangle.Empty;
            if (CVHelper.FindColorArrayForThreshold(out closeButtonPosition, image, shopCloseButton, gameRect))
            {
                if (CVHelper.FindColorArray(out saleButtonPosition, image, shopSaleButton, gameRect))
                {
                    return true;
                }
            }
            return false;
        }
 
        /// <summary>
        /// 加百利对话框的出售按钮
        /// </summary>
 
        public static bool HasJiabailiSaleButton(out ZTRectangle buttonPosition, Image<Rgb, byte> image, ZTRectangle gameRect)
        {
            return CVHelper.FindColorArray(out buttonPosition, image, shopSaleButton, gameRect);
        }
 
 
        /// <summary>
        /// 魔王的契约黄金牌
        /// </summary>
        public static ColorArray glodMowangdeqiyueText = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "373,624,254,252,88$355,612,246,238,83$363,612,243,238,83$369,624,250,242,85$377,624,250,242,84$371,612,242,236,83$378,612,242,237,83$430,619,253,251,88");
 
        /// <summary>
        /// 是否有魔王契约卡牌
        /// </summary>
        /// <param name="image"></param>
        /// <param name="gameRect"></param>
        /// <returns></returns>
        public static bool HasMowangqiyueCard(ZTRectangle gameRect)
        {
            using (Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage())
            {
                ZTRectangle o = ZTRectangle.Empty;
                return CVHelper.FindColorArray(out o, image, glodMowangdeqiyueText, new ZTRectangle(gameRect.Start.X, gameRect.Start.Y + (gameRect.End.Y - gameRect.Start.Y) / 2, gameRect.End.X, gameRect.End.Y));
            }
 
        }
 
        /// <summary>
        /// 系统菜单面板
        /// </summary>
        public static ColorArray SystemPanelTitle = ColorArray.FromThresholdString(60, "674,173,0,0,0$627,173,0,0,0$628,173,0,0,0$629,173,0,0,0$630,173,0,0,0$647,173,0,0,0$648,173,0,0,0$661,173,0,0,0$662,173,0,0,0$673,173,0,0,0$675,173,0,0,0$682,173,0,0,0$683,173,0,0,0$684,173,0,0,0$685,173,0,0,0$686,173,0,0,0$697,173,0,0,0$698,173,0,0,0$699,173,0,0,0$700,173,0,0,0$701,173,0,0,0$609,174,0,0,0$610,174,0,0,0$611,174,0,0,0$612,174,0,0,0$613,174,0,0,0$614,174,0,0,0$615,174,0,0,0$616,174,0,0,0$617,174,0,0,0$618,174,0,0,0$619,174,0,0,0$620,174,0,0,0$621,174,0,0,0$622,174,0,0,0$623,174,0,0,0$624,174,0,0,0$625,174,0,0,0$626,174,0,0,0$627,174,0,0,0$628,174,0,0,0$629,174,0,0,0$630,174,0,0,0$631,174,0,0,0$635,174,0,0,0$636,174,0,0,0$637,174,0,0,0$638,174,0,0,0$639,174,0,0,0$640,174,0,0,0$645,174,0,0,0$646,174,0,0,0$647,174,0,0,0$648,174,0,0,0$649,174,0,0,0$650,174,0,0,0$659,174,0,0,0$660,174,0,0,0$661,174,0,0,0$662,174,0,0,0$663,174,0,0,0$664,174,0,0,0$671,174,0,0,0$672,174,0,0,0$673,174,0,0,0$674,174,0,0,0$675,174,0,0,0$676,174,0,0,0$677,174,0,0,0$681,174,0,0,0$682,174,0,0,0$683,174,0,0,0$684,174,0,0,0$685,174,0,0,0$686,174,0,0,0$687,174,0,0,0$696,174,0,0,0$697,174,0,0,0$698,174,0,0,0$699,174,0,0,0$700,174,0,0,0$701,174,0,0,0$702,174,0,0,0$608,175,0,0,0$609,175,0,0,0$610,175,0,0,0$611,175,0,0,0$612,175,0,0,0$613,175,0,0,0$614,175,0,0,0$615,175,0,0,0$616,175,0,0,0$617,175,0,0,0$618,175,0,0,0$619,175,0,0,0$620,175,0,0,0$621,175,0,0,0$622,175,0,0,0$623,175,0,0,0$624,175,0,0,0$625,175,0,0,0$626,175,0,0,0$631,175,0,0,0$632,175,0,0,0$634,175,0,0,0$635,175,0,0,0$636,175,0,0,0$637,175,0,0,0$638,175,0,0,0$639,175,0,0,0$640,175,0,0,0$641,175,0,0,0$642,175,0,0,0$643,175,0,0,0$644,175,0,0,0$645,175,0,0,0$646,175,0,0,0$647,175,0,0,0$648,175,0,0,0$649,175,0,0,0$650,175,0,0,0$651,175,0,0,0$652,175,0,0,0$653,175,0,0,0$654,175,0,0,0$655,175,0,0,0$656,175,0,0,0$657,175,0,0,0$658,175,0,0,0$659,175,0,0,0$660,175,0,0,0$661,175,0,0,0$662,175,0,0,0$663,175,0,0,0$664,175,0,0,0$665,175,0,0,0$666,175,0,0,0$667,175,0,0,0$668,175,0,0,0$669,175,0,0,0$670,175,0,0,0$671,175,0,0,0$672,175,0,0,0$673,175,0,0,0$674,175,0,0,0$675,175,0,0,0$676,175,0,0,0$677,175,0,0,0$678,175,0,0,0$679,175,0,0,0$680,175,0,0,0$681,175,0,0,0$686,175,0,0,0$687,175,0,0,0$688,175,0,0,0$689,175,0,0,0$690,175,0,0,0$691,175,0,0,0$692,175,0,0,0$693,175,0,0,0$694,175,0,0,0$695,175,0,0,0$696,175,0,0,0$697,175,0,0,0$702,175,0,0,0$703,175,0,0,0$607,176,0,0,0$608,176,0,0,0$628,176,255,255,255$629,176,255,255,255$631,176,0,0,0$632,176,0,0,0$633,176,0,0,0$634,176,0,0,0$635,176,0,0,0$636,176,255,255,255$637,176,255,255,255$638,176,255,255,255$640,176,0,0,0$641,176,0,0,0$642,176,0,0,0$643,176,0,0,0$644,176,0,0,0$645,176,0,0,0$646,176,255,255,255$647,176,255,255,255$648,176,255,255,255$649,176,255,255,255$650,176,0,0,0$651,176,0,0,0$652,176,0,0,0$653,176,0,0,0$654,176,0,0,0$655,176,0,0,0$656,176,0,0,0$657,176,0,0,0$658,176,0,0,0$659,176,0,0,0$660,176,255,255,255$661,176,255,255,255$662,176,255,255,255$663,176,255,255,255$664,176,0,0,0$665,176,0,0,0$666,176,0,0,0$667,176,0,0,0$668,176,0,0,0$669,176,0,0,0$670,176,0,0,0$671,176,0,0,0$673,176,255,255,255$674,176,255,255,255$675,176,255,255,255$676,176,0,0,0$677,176,0,0,0$678,176,0,0,0$679,176,0,0,0$680,176,0,0,0$681,176,0,0,0$683,176,255,255,255$684,176,255,255,255$685,176,255,255,255$687,176,0,0,0$688,176,0,0,0$689,176,0,0,0$690,176,0,0,0$691,176,0,0,0$692,176,0,0,0$693,176,0,0,0$694,176,0,0,0$695,176,0,0,0$696,176,0,0,0$698,176,255,255,255$699,176,255,255,255$700,176,255,255,255$702,176,0,0,0$703,176,0,0,0$607,177,0,0,0$608,177,0,0,0$610,177,255,255,255$611,177,255,255,255$612,177,255,255,255$613,177,255,255,255$614,177,255,255,255$615,177,255,255,255$616,177,255,255,255$617,177,255,255,255$618,177,255,255,255$619,177,255,255,255$620,177,255,255,255$621,177,255,255,255$622,177,255,255,255$623,177,255,255,255$624,177,255,255,255$625,177,255,255,255$626,177,255,255,255$627,177,255,255,255$628,177,255,255,255$629,177,255,255,255$631,177,0,0,0$632,177,0,0,0$633,177,0,0,0$634,177,0,0,0$636,177,255,255,255$637,177,255,255,255$638,177,255,255,255$640,177,0,0,0$642,177,255,255,255$643,177,255,255,255$644,177,255,255,255$645,177,255,255,255$646,177,255,255,255$647,177,255,255,255$648,177,255,255,255$649,177,255,255,255$650,177,255,255,255$651,177,255,255,255$652,177,255,255,255$653,177,255,255,255$654,177,255,255,255$655,177,0,0,0$656,177,0,0,0$658,177,255,255,255$659,177,255,255,255$660,177,255,255,255$661,177,255,255,255$662,177,255,255,255$663,177,255,255,255$664,177,255,255,255$665,177,255,255,255$666,177,255,255,255$667,177,255,255,255$668,177,255,255,255$669,177,255,255,255$670,177,255,255,255$671,177,255,255,255$672,177,255,255,255$673,177,255,255,255$674,177,255,255,255$675,177,255,255,255$676,177,255,255,255$677,177,255,255,255$679,177,0,0,0$680,177,0,0,0$682,177,255,255,255$683,177,255,255,255$684,177,255,255,255$685,177,255,255,255$686,177,255,255,255$687,177,255,255,255$688,177,255,255,255$689,177,255,255,255$690,177,255,255,255$691,177,255,255,255$692,177,255,255,255$693,177,255,255,255$694,177,255,255,255$695,177,255,255,255$696,177,255,255,255$697,177,255,255,255$698,177,255,255,255$699,177,255,255,255$700,177,255,255,255$701,177,255,255,255$703,177,0,0,0$607,178,0,0,0$608,178,0,0,0$610,178,255,255,255$611,178,255,255,255$612,178,255,255,255$613,178,255,255,255$614,178,255,255,255$615,178,255,255,255$616,178,255,255,255$617,178,255,255,255$618,178,255,255,255$619,178,255,255,255$620,178,255,255,255$621,178,255,255,255$622,178,255,255,255$623,178,255,255,255$624,178,255,255,255$625,178,255,255,255$626,178,255,255,255$627,178,255,255,255$628,178,255,255,255$629,178,255,255,255$631,178,0,0,0$632,178,0,0,0$633,178,0,0,0$634,178,0,0,0$635,178,255,255,255$636,178,255,255,255$637,178,255,255,255$639,178,0,0,0$640,178,0,0,0$642,178,255,255,255$643,178,255,255,255$644,178,255,255,255$645,178,255,255,255$646,178,255,255,255$647,178,255,255,255$648,178,255,255,255$649,178,255,255,255$650,178,255,255,255$651,178,255,255,255$652,178,255,255,255$653,178,255,255,255$654,178,255,255,255$655,178,0,0,0$656,178,0,0,0$658,178,255,255,255$659,178,255,255,255$660,178,255,255,255$661,178,255,255,255$662,178,255,255,255$663,178,255,255,255$664,178,255,255,255$665,178,255,255,255$666,178,255,255,255$667,178,255,255,255$668,178,255,255,255$669,178,255,255,255$670,178,255,255,255$671,178,255,255,255$672,178,255,255,255$673,178,255,255,255$674,178,255,255,255$675,178,255,255,255$676,178,255,255,255$677,178,255,255,255$679,178,0,0,0$680,178,0,0,0$682,178,255,255,255$683,178,255,255,255$684,178,255,255,255$685,178,255,255,255$686,178,255,255,255$687,178,255,255,255$688,178,255,255,255$689,178,255,255,255$690,178,255,255,255$691,178,255,255,255$692,178,255,255,255$693,178,255,255,255$694,178,255,255,255$695,178,255,255,255$696,178,255,255,255$697,178,255,255,255$698,178,255,255,255$699,178,255,255,255$700,178,255,255,255$701,178,255,255,255$703,178,0,0,0$607,179,0,0,0$608,179,0,0,0$613,179,255,255,255$614,179,255,255,255$615,179,255,255,255$616,179,255,255,255$617,179,255,255,255$618,179,255,255,255$630,179,0,0,0$631,179,0,0,0$632,179,0,0,0$633,179,0,0,0$635,179,255,255,255$636,179,255,255,255$637,179,255,255,255$638,179,0,0,0$639,179,0,0,0$640,179,0,0,0$642,179,255,255,255$643,179,255,255,255$644,179,255,255,255$645,179,255,255,255$646,179,255,255,255$647,179,255,255,255$648,179,255,255,255$649,179,255,255,255$650,179,255,255,255$651,179,255,255,255$652,179,255,255,255$653,179,255,255,255$654,179,255,255,255$655,179,0,0,0$656,179,0,0,0$658,179,255,255,255$659,179,255,255,255$660,179,255,255,255$661,179,255,255,255$662,179,255,255,255$663,179,255,255,255$664,179,255,255,255$665,179,255,255,255$666,179,255,255,255$667,179,255,255,255$668,179,255,255,255$669,179,255,255,255$670,179,255,255,255$671,179,255,255,255$672,179,255,255,255$673,179,255,255,255$674,179,255,255,255$675,179,255,255,255$676,179,255,255,255$677,179,255,255,255$679,179,0,0,0$680,179,0,0,0$682,179,255,255,255$683,179,255,255,255$684,179,255,255,255$685,179,255,255,255$686,179,255,255,255$687,179,255,255,255$688,179,255,255,255$689,179,255,255,255$690,179,255,255,255$691,179,255,255,255$692,179,255,255,255$693,179,255,255,255$694,179,255,255,255$695,179,255,255,255$696,179,255,255,255$697,179,255,255,255$698,179,255,255,255$699,179,255,255,255$700,179,255,255,255$701,179,255,255,255$703,179,0,0,0$607,180,0,0,0$608,180,0,0,0$609,180,0,0,0$610,180,0,0,0$613,180,255,255,255$614,180,255,255,255$615,180,255,255,255$616,180,255,255,255$619,180,0,0,0$620,180,0,0,0$621,180,0,0,0$622,180,0,0,0$623,180,0,0,0$624,180,0,0,0$625,180,0,0,0$626,180,0,0,0$627,180,0,0,0$628,180,0,0,0$629,180,0,0,0$630,180,0,0,0$631,180,0,0,0$632,180,0,0,0$633,180,0,0,0$634,180,255,255,255$635,180,255,255,255$636,180,255,255,255$642,180,0,0,0$644,180,255,255,255$645,180,255,255,255$646,180,255,255,255$647,180,0,0,0$648,180,0,0,0$649,180,0,0,0$650,180,0,0,0$651,180,0,0,0$652,180,0,0,0$653,180,0,0,0$654,180,0,0,0$655,180,0,0,0$656,180,0,0,0$657,180,0,0,0$658,180,0,0,0$659,180,0,0,0$660,180,255,255,255$661,180,255,255,255$662,180,255,255,255$663,180,255,255,255$664,180,0,0,0$665,180,0,0,0$666,180,0,0,0$667,180,0,0,0$668,180,0,0,0$669,180,0,0,0$670,180,0,0,0$671,180,0,0,0$673,180,255,255,255$674,180,255,255,255$675,180,255,255,255$676,180,0,0,0$677,180,0,0,0$678,180,0,0,0$679,180,0,0,0$680,180,0,0,0$682,180,255,255,255$683,180,255,255,255$685,180,0,0,0$686,180,0,0,0$687,180,0,0,0$688,180,0,0,0$689,180,0,0,0$691,180,255,255,255$692,180,255,255,255$694,180,0,0,0$695,180,0,0,0$696,180,0,0,0$697,180,0,0,0$698,180,0,0,0$700,180,255,255,255$701,180,255,255,255$703,180,0,0,0$607,181,0,0,0$608,181,0,0,0$611,181,255,255,255$612,181,255,255,255$613,181,255,255,255$614,181,255,255,255$615,181,255,255,255$617,181,0,0,0$618,181,0,0,0$619,181,0,0,0$620,181,0,0,0$621,181,0,0,0$623,181,255,255,255$624,181,255,255,255$625,181,255,255,255$626,181,255,255,255$627,181,255,255,255$629,181,0,0,0$630,181,0,0,0$631,181,0,0,0$632,181,0,0,0$634,181,255,255,255$635,181,255,255,255$636,181,255,255,255$637,181,0,0,0$638,181,255,255,255$639,181,255,255,255$640,181,255,255,255$642,181,0,0,0$643,181,255,255,255$644,181,255,255,255$645,181,255,255,255$647,181,0,0,0$648,181,0,0,0$649,181,0,0,0$650,181,0,0,0$651,181,0,0,0$652,181,255,255,255$653,181,255,255,255$654,181,255,255,255$655,181,0,0,0$656,181,0,0,0$657,181,0,0,0$658,181,0,0,0$659,181,0,0,0$664,181,0,0,0$665,181,0,0,0$666,181,0,0,0$667,181,0,0,0$668,181,0,0,0$669,181,0,0,0$670,181,0,0,0$671,181,0,0,0$679,181,0,0,0$680,181,0,0,0$682,181,255,255,255$683,181,255,255,255$685,181,0,0,0$686,181,0,0,0$687,181,0,0,0$688,181,0,0,0$689,181,0,0,0$691,181,255,255,255$692,181,255,255,255$694,181,0,0,0$695,181,0,0,0$696,181,0,0,0$697,181,0,0,0$698,181,0,0,0$700,181,255,255,255$701,181,255,255,255$703,181,0,0,0$607,182,0,0,0$608,182,0,0,0$610,182,255,255,255$611,182,255,255,255$612,182,255,255,255$613,182,255,255,255$614,182,255,255,255$615,182,255,255,255$616,182,255,255,255$617,182,255,255,255$618,182,255,255,255$619,182,255,255,255$620,182,255,255,255$621,182,255,255,255$622,182,255,255,255$623,182,255,255,255$624,182,255,255,255$625,182,255,255,255$627,182,0,0,0$628,182,0,0,0$629,182,0,0,0$630,182,0,0,0$631,182,0,0,0$632,182,0,0,0$633,182,255,255,255$634,182,255,255,255$635,182,255,255,255$636,182,255,255,255$637,182,255,255,255$638,182,255,255,255$639,182,255,255,255$640,182,255,255,255$641,182,0,0,0$643,182,255,255,255$644,182,255,255,255$645,182,255,255,255$646,182,0,0,0$647,182,0,0,0$648,182,0,0,0$649,182,0,0,0$650,182,0,0,0$651,182,0,0,0$652,182,255,255,255$653,182,255,255,255$654,182,255,255,255$655,182,0,0,0$656,182,0,0,0$675,182,255,255,255$676,182,255,255,255$677,182,255,255,255$679,182,0,0,0$680,182,0,0,0$682,182,255,255,255$683,182,255,255,255$684,182,255,255,255$690,182,255,255,255$691,182,255,255,255$692,182,255,255,255$693,182,255,255,255$699,182,255,255,255$700,182,255,255,255$701,182,255,255,255$703,182,0,0,0$607,183,0,0,0$608,183,0,0,0$610,183,255,255,255$611,183,255,255,255$612,183,255,255,255$613,183,255,255,255$614,183,255,255,255$615,183,255,255,255$616,183,255,255,255$617,183,255,255,255$618,183,255,255,255$619,183,255,255,255$620,183,255,255,255$621,183,255,255,255$622,183,255,255,255$623,183,255,255,255$625,183,0,0,0$626,183,0,0,0$627,183,0,0,0$628,183,0,0,0$629,183,0,0,0$630,183,0,0,0$631,183,0,0,0$632,183,0,0,0$633,183,255,255,255$634,183,255,255,255$635,183,255,255,255$636,183,255,255,255$637,183,255,255,255$638,183,255,255,255$639,183,255,255,255$641,183,0,0,0$642,183,255,255,255$643,183,255,255,255$644,183,255,255,255$646,183,0,0,0$647,183,0,0,0$648,183,0,0,0$649,183,0,0,0$650,183,0,0,0$651,183,0,0,0$652,183,255,255,255$653,183,255,255,255$654,183,255,255,255$655,183,0,0,0$656,183,0,0,0$658,183,255,255,255$659,183,255,255,255$660,183,255,255,255$661,183,255,255,255$662,183,255,255,255$663,183,255,255,255$664,183,255,255,255$665,183,255,255,255$666,183,255,255,255$667,183,255,255,255$668,183,255,255,255$669,183,255,255,255$670,183,255,255,255$671,183,255,255,255$672,183,255,255,255$673,183,255,255,255$674,183,255,255,255$675,183,255,255,255$676,183,255,255,255$677,183,255,255,255$679,183,0,0,0$680,183,0,0,0$682,183,255,255,255$683,183,255,255,255$684,183,255,255,255$685,183,255,255,255$686,183,255,255,255$687,183,255,255,255$688,183,255,255,255$689,183,255,255,255$690,183,255,255,255$691,183,255,255,255$692,183,255,255,255$693,183,255,255,255$694,183,255,255,255$695,183,255,255,255$696,183,255,255,255$697,183,255,255,255$698,183,255,255,255$699,183,255,255,255$700,183,255,255,255$701,183,255,255,255$703,183,0,0,0$607,184,0,0,0$608,184,0,0,0$616,184,255,255,255$617,184,255,255,255$618,184,255,255,255$619,184,255,255,255$620,184,255,255,255$621,184,255,255,255$623,184,0,0,0$624,184,0,0,0$625,184,0,0,0$626,184,0,0,0$628,184,255,255,255$629,184,255,255,255$631,184,0,0,0$632,184,0,0,0$633,184,255,255,255$634,184,255,255,255$635,184,255,255,255$636,184,255,255,255$637,184,255,255,255$638,184,255,255,255$639,184,255,255,255$640,184,0,0,0$642,184,255,255,255$643,184,255,255,255$644,184,255,255,255$645,184,255,255,255$646,184,255,255,255$647,184,255,255,255$648,184,255,255,255$649,184,255,255,255$650,184,255,255,255$651,184,255,255,255$652,184,255,255,255$653,184,255,255,255$654,184,255,255,255$655,184,0,0,0$656,184,0,0,0$658,184,255,255,255$659,184,255,255,255$660,184,255,255,255$661,184,255,255,255$662,184,255,255,255$663,184,255,255,255$664,184,255,255,255$665,184,255,255,255$666,184,255,255,255$667,184,255,255,255$668,184,255,255,255$669,184,255,255,255$670,184,255,255,255$671,184,255,255,255$672,184,255,255,255$673,184,255,255,255$674,184,255,255,255$675,184,255,255,255$676,184,255,255,255$677,184,255,255,255$678,184,0,0,0$679,184,0,0,0$680,184,0,0,0$682,184,255,255,255$683,184,255,255,255$684,184,255,255,255$685,184,255,255,255$686,184,255,255,255$687,184,255,255,255$688,184,255,255,255$689,184,255,255,255$690,184,255,255,255$691,184,255,255,255$692,184,255,255,255$693,184,255,255,255$694,184,255,255,255$695,184,255,255,255$696,184,255,255,255$697,184,255,255,255$698,184,255,255,255$699,184,255,255,255$700,184,255,255,255$701,184,255,255,255$703,184,0,0,0$607,185,0,0,0$608,185,0,0,0$609,185,0,0,0$610,185,0,0,0$611,185,0,0,0$612,185,0,0,0$614,185,255,255,255$615,185,255,255,255$616,185,255,255,255$617,185,255,255,255$618,185,255,255,255$619,185,255,255,255$621,185,0,0,0$622,185,0,0,0$623,185,0,0,0$624,185,0,0,0$625,185,0,0,0$626,185,0,0,0$628,185,255,255,255$629,185,255,255,255$631,185,0,0,0$632,185,0,0,0$636,185,255,255,255$637,185,255,255,255$638,185,255,255,255$640,185,0,0,0$642,185,255,255,255$643,185,255,255,255$644,185,255,255,255$645,185,255,255,255$646,185,255,255,255$647,185,255,255,255$648,185,255,255,255$649,185,255,255,255$650,185,255,255,255$651,185,255,255,255$652,185,255,255,255$653,185,255,255,255$654,185,255,255,255$655,185,0,0,0$656,185,0,0,0$657,185,0,0,0$658,185,0,0,0$659,185,0,0,0$660,185,255,255,255$661,185,255,255,255$662,185,255,255,255$663,185,255,255,255$665,185,255,255,255$669,185,0,0,0$670,185,0,0,0$671,185,0,0,0$672,185,255,255,255$673,185,255,255,255$674,185,255,255,255$676,185,0,0,0$677,185,0,0,0$678,185,0,0,0$679,185,0,0,0$680,185,0,0,0$682,185,255,255,255$683,185,255,255,255$684,185,255,255,255$690,185,255,255,255$691,185,255,255,255$692,185,255,255,255$693,185,255,255,255$699,185,255,255,255$700,185,255,255,255$701,185,255,255,255$703,185,0,0,0$607,186,0,0,0$608,186,0,0,0$609,186,0,0,0$612,186,255,255,255$613,186,255,255,255$614,186,255,255,255$615,186,255,255,255$616,186,255,255,255$617,186,255,255,255$620,186,0,0,0$621,186,0,0,0$622,186,0,0,0$623,186,0,0,0$624,186,0,0,0$625,186,0,0,0$627,186,255,255,255$628,186,255,255,255$629,186,255,255,255$631,186,0,0,0$632,186,0,0,0$633,186,0,0,0$634,186,0,0,0$635,186,255,255,255$636,186,255,255,255$637,186,255,255,255$639,186,0,0,0$640,186,0,0,0$642,186,255,255,255$643,186,255,255,255$644,186,255,255,255$645,186,255,255,255$646,186,255,255,255$647,186,255,255,255$648,186,255,255,255$649,186,255,255,255$650,186,255,255,255$651,186,255,255,255$652,186,255,255,255$653,186,255,255,255$655,186,0,0,0$656,186,0,0,0$659,186,255,255,255$660,186,255,255,255$661,186,255,255,255$662,186,255,255,255$664,186,0,0,0$666,186,255,255,255$667,186,255,255,255$668,186,255,255,255$669,186,255,255,255$673,186,255,255,255$674,186,255,255,255$675,186,255,255,255$676,186,255,255,255$679,186,0,0,0$680,186,0,0,0$682,186,255,255,255$683,186,255,255,255$685,186,0,0,0$686,186,0,0,0$687,186,0,0,0$688,186,0,0,0$689,186,0,0,0$691,186,255,255,255$692,186,255,255,255$694,186,0,0,0$695,186,0,0,0$696,186,0,0,0$697,186,0,0,0$698,186,0,0,0$700,186,255,255,255$701,186,255,255,255$703,186,0,0,0$607,187,0,0,0$608,187,0,0,0$610,187,255,255,255$611,187,255,255,255$612,187,255,255,255$613,187,255,255,255$614,187,255,255,255$615,187,255,255,255$616,187,255,255,255$617,187,255,255,255$618,187,255,255,255$619,187,255,255,255$620,187,255,255,255$621,187,255,255,255$622,187,255,255,255$623,187,255,255,255$624,187,255,255,255$625,187,255,255,255$626,187,255,255,255$627,187,255,255,255$628,187,255,255,255$629,187,255,255,255$631,187,0,0,0$632,187,0,0,0$633,187,0,0,0$635,187,255,255,255$636,187,255,255,255$637,187,255,255,255$638,187,0,0,0$639,187,0,0,0$640,187,0,0,0$641,187,0,0,0$642,187,0,0,0$643,187,0,0,0$648,187,0,0,0$649,187,255,255,255$650,187,255,255,255$651,187,255,255,255$652,187,0,0,0$653,187,0,0,0$654,187,0,0,0$655,187,0,0,0$656,187,0,0,0$657,187,255,255,255$658,187,255,255,255$659,187,255,255,255$660,187,255,255,255$661,187,255,255,255$663,187,0,0,0$664,187,0,0,0$665,187,0,0,0$666,187,255,255,255$667,187,255,255,255$668,187,255,255,255$669,187,255,255,255$670,187,255,255,255$672,187,0,0,0$673,187,255,255,255$674,187,255,255,255$675,187,255,255,255$676,187,255,255,255$677,187,255,255,255$679,187,0,0,0$680,187,0,0,0$682,187,255,255,255$683,187,255,255,255$685,187,0,0,0$686,187,0,0,0$687,187,0,0,0$688,187,0,0,0$689,187,0,0,0$691,187,255,255,255$692,187,255,255,255$694,187,0,0,0$695,187,0,0,0$696,187,0,0,0$697,187,0,0,0$698,187,0,0,0$699,187,255,255,255$700,187,255,255,255$701,187,255,255,255$703,187,0,0,0$607,188,0,0,0$608,188,0,0,0$610,188,255,255,255$611,188,255,255,255$612,188,255,255,255$613,188,255,255,255$614,188,255,255,255$615,188,255,255,255$616,188,255,255,255$617,188,255,255,255$618,188,255,255,255$619,188,255,255,255$620,188,255,255,255$621,188,255,255,255$622,188,255,255,255$623,188,255,255,255$624,188,255,255,255$625,188,255,255,255$626,188,255,255,255$627,188,255,255,255$628,188,255,255,255$629,188,255,255,255$631,188,0,0,0$632,188,0,0,0$634,188,255,255,255$635,188,255,255,255$636,188,255,255,255$638,188,0,0,0$639,188,0,0,0$640,188,0,0,0$641,188,0,0,0$642,188,0,0,0$643,188,0,0,0$644,188,255,255,255$645,188,255,255,255$646,188,255,255,255$648,188,0,0,0$649,188,255,255,255$650,188,255,255,255$651,188,255,255,255$652,188,0,0,0$653,188,0,0,0$654,188,0,0,0$655,188,0,0,0$656,188,0,0,0$658,188,255,255,255$659,188,255,255,255$660,188,255,255,255$662,188,0,0,0$663,188,0,0,0$664,188,0,0,0$665,188,0,0,0$668,188,255,255,255$669,188,255,255,255$670,188,255,255,255$672,188,0,0,0$673,188,0,0,0$675,188,255,255,255$676,188,255,255,255$677,188,255,255,255$679,188,0,0,0$680,188,0,0,0$682,188,255,255,255$683,188,255,255,255$684,188,255,255,255$685,188,255,255,255$686,188,255,255,255$687,188,255,255,255$688,188,255,255,255$689,188,255,255,255$690,188,255,255,255$691,188,255,255,255$692,188,255,255,255$693,188,255,255,255$694,188,255,255,255$695,188,255,255,255$696,188,255,255,255$697,188,255,255,255$698,188,255,255,255$699,188,255,255,255$700,188,255,255,255$701,188,255,255,255$703,188,0,0,0$607,189,0,0,0$608,189,0,0,0$618,189,255,255,255$619,189,255,255,255$620,189,255,255,255$621,189,255,255,255$630,189,0,0,0$631,189,0,0,0$632,189,0,0,0$633,189,255,255,255$634,189,255,255,255$635,189,255,255,255$636,189,255,255,255$642,189,0,0,0$643,189,0,0,0$644,189,255,255,255$645,189,255,255,255$646,189,255,255,255$648,189,0,0,0$649,189,255,255,255$650,189,255,255,255$651,189,255,255,255$652,189,0,0,0$653,189,0,0,0$654,189,0,0,0$655,189,0,0,0$656,189,0,0,0$657,189,0,0,0$658,189,0,0,0$659,189,0,0,0$660,189,0,0,0$661,189,0,0,0$662,189,0,0,0$663,189,0,0,0$664,189,0,0,0$665,189,0,0,0$667,189,255,255,255$668,189,255,255,255$670,189,0,0,0$671,189,0,0,0$672,189,0,0,0$673,189,0,0,0$674,189,0,0,0$675,189,0,0,0$676,189,0,0,0$677,189,0,0,0$678,189,0,0,0$679,189,0,0,0$680,189,0,0,0$682,189,255,255,255$683,189,255,255,255$684,189,255,255,255$685,189,255,255,255$686,189,255,255,255$687,189,255,255,255$688,189,255,255,255$689,189,255,255,255$690,189,255,255,255$691,189,255,255,255$692,189,255,255,255$693,189,255,255,255$694,189,255,255,255$695,189,255,255,255$696,189,255,255,255$697,189,255,255,255$698,189,255,255,255$699,189,255,255,255$700,189,255,255,255$701,189,255,255,255$703,189,0,0,0$607,190,0,0,0$608,190,0,0,0$609,190,0,0,0$610,190,0,0,0$611,190,0,0,0$612,190,0,0,0$617,190,0,0,0$618,190,255,255,255$619,190,255,255,255$620,190,255,255,255$622,190,0,0,0$627,190,0,0,0$628,190,0,0,0$629,190,0,0,0$630,190,0,0,0$631,190,0,0,0$632,190,0,0,0$633,190,255,255,255$634,190,255,255,255$635,190,255,255,255$636,190,255,255,255$637,190,255,255,255$638,190,255,255,255$639,190,255,255,255$640,190,255,255,255$642,190,0,0,0$643,190,0,0,0$644,190,255,255,255$645,190,255,255,255$646,190,255,255,255$647,190,0,0,0$648,190,0,0,0$649,190,255,255,255$650,190,255,255,255$651,190,255,255,255$652,190,0,0,0$653,190,0,0,0$654,190,0,0,0$655,190,0,0,0$656,190,0,0,0$658,190,255,255,255$659,190,255,255,255$660,190,255,255,255$661,190,255,255,255$662,190,255,255,255$663,190,255,255,255$664,190,255,255,255$665,190,255,255,255$666,190,255,255,255$667,190,255,255,255$668,190,255,255,255$669,190,255,255,255$670,190,255,255,255$671,190,255,255,255$672,190,255,255,255$673,190,255,255,255$674,190,255,255,255$675,190,255,255,255$676,190,255,255,255$677,190,255,255,255$679,190,0,0,0$680,190,0,0,0$690,190,255,255,255$691,190,255,255,255$692,190,255,255,255$693,190,255,255,255$702,190,0,0,0$703,190,0,0,0$608,191,0,0,0$609,191,0,0,0$610,191,0,0,0$611,191,0,0,0$612,191,0,0,0$613,191,255,255,255$614,191,255,255,255$615,191,255,255,255$617,191,0,0,0$618,191,255,255,255$619,191,255,255,255$620,191,255,255,255$622,191,0,0,0$624,191,255,255,255$625,191,255,255,255$626,191,255,255,255$627,191,0,0,0$628,191,0,0,0$629,191,0,0,0$630,191,0,0,0$631,191,0,0,0$632,191,0,0,0$633,191,255,255,255$634,191,255,255,255$635,191,255,255,255$636,191,255,255,255$637,191,255,255,255$638,191,255,255,255$639,191,255,255,255$640,191,255,255,255$642,191,0,0,0$644,191,255,255,255$645,191,255,255,255$646,191,255,255,255$647,191,0,0,0$648,191,0,0,0$649,191,255,255,255$650,191,255,255,255$651,191,255,255,255$652,191,0,0,0$653,191,0,0,0$654,191,0,0,0$655,191,0,0,0$656,191,0,0,0$658,191,255,255,255$659,191,255,255,255$660,191,255,255,255$661,191,255,255,255$662,191,255,255,255$663,191,255,255,255$664,191,255,255,255$665,191,255,255,255$666,191,255,255,255$667,191,255,255,255$668,191,255,255,255$669,191,255,255,255$670,191,255,255,255$671,191,255,255,255$672,191,255,255,255$673,191,255,255,255$674,191,255,255,255$675,191,255,255,255$676,191,255,255,255$677,191,255,255,255$679,191,0,0,0$680,191,0,0,0$681,191,0,0,0$682,191,0,0,0$683,191,0,0,0$684,191,0,0,0$685,191,0,0,0$686,191,0,0,0$687,191,0,0,0$688,191,0,0,0$689,191,0,0,0$691,191,255,255,255$692,191,255,255,255$694,191,0,0,0$695,191,0,0,0$696,191,0,0,0$697,191,0,0,0$698,191,0,0,0$699,191,0,0,0$700,191,0,0,0$701,191,0,0,0$702,191,0,0,0$703,191,0,0,0$609,192,0,0,0$610,192,0,0,0$611,192,0,0,0$613,192,255,255,255$614,192,255,255,255$615,192,255,255,255$617,192,0,0,0$618,192,255,255,255$619,192,255,255,255$620,192,255,255,255$622,192,0,0,0$624,192,255,255,255$625,192,255,255,255$626,192,255,255,255$628,192,0,0,0$629,192,0,0,0$631,192,0,0,0$632,192,0,0,0$642,192,0,0,0$644,192,255,255,255$645,192,255,255,255$647,192,0,0,0$648,192,0,0,0$649,192,255,255,255$650,192,255,255,255$651,192,255,255,255$652,192,0,0,0$653,192,0,0,0$654,192,0,0,0$655,192,0,0,0$656,192,0,0,0$667,192,255,255,255$668,192,255,255,255$669,192,255,255,255$679,192,0,0,0$680,192,0,0,0$691,192,255,255,255$692,192,255,255,255$703,192,0,0,0$608,193,0,0,0$609,193,0,0,0$610,193,0,0,0$611,193,0,0,0$613,193,255,255,255$614,193,255,255,255$616,193,0,0,0$617,193,0,0,0$619,193,255,255,255$620,193,255,255,255$622,193,0,0,0$623,193,0,0,0$624,193,255,255,255$625,193,255,255,255$626,193,255,255,255$628,193,0,0,0$629,193,0,0,0$630,193,0,0,0$631,193,0,0,0$632,193,0,0,0$633,193,0,0,0$634,193,0,0,0$635,193,0,0,0$636,193,0,0,0$637,193,0,0,0$638,193,0,0,0$639,193,0,0,0$640,193,0,0,0$641,193,0,0,0$642,193,0,0,0$644,193,255,255,255$645,193,255,255,255$647,193,0,0,0$648,193,0,0,0$649,193,255,255,255$650,193,255,255,255$651,193,255,255,255$652,193,0,0,0$653,193,0,0,0$654,193,0,0,0$655,193,0,0,0$656,193,0,0,0$657,193,0,0,0$658,193,0,0,0$659,193,0,0,0$660,193,0,0,0$662,193,255,255,255$663,193,255,255,255$664,193,255,255,255$667,193,255,255,255$668,193,255,255,255$670,193,0,0,0$671,193,255,255,255$672,193,255,255,255$673,193,255,255,255$674,193,255,255,255$675,193,0,0,0$676,193,0,0,0$677,193,0,0,0$678,193,0,0,0$679,193,0,0,0$680,193,0,0,0$682,193,255,255,255$683,193,255,255,255$684,193,255,255,255$685,193,255,255,255$686,193,255,255,255$687,193,255,255,255$688,193,255,255,255$689,193,255,255,255$690,193,255,255,255$691,193,255,255,255$692,193,255,255,255$693,193,255,255,255$694,193,255,255,255$695,193,255,255,255$696,193,255,255,255$697,193,255,255,255$698,193,255,255,255$699,193,255,255,255$700,193,255,255,255$701,193,255,255,255$703,193,0,0,0$607,194,0,0,0$608,194,0,0,0$613,194,255,255,255$614,194,255,255,255$616,194,0,0,0$617,194,0,0,0$619,194,255,255,255$620,194,255,255,255$622,194,0,0,0$623,194,0,0,0$625,194,255,255,255$626,194,255,255,255$628,194,0,0,0$629,194,0,0,0$630,194,0,0,0$631,194,0,0,0$632,194,0,0,0$633,194,0,0,0$634,194,0,0,0$635,194,0,0,0$636,194,0,0,0$637,194,0,0,0$638,194,0,0,0$639,194,0,0,0$640,194,0,0,0$641,194,0,0,0$644,194,255,255,255$645,194,255,255,255$647,194,0,0,0$648,194,0,0,0$649,194,255,255,255$651,194,255,255,255$655,194,0,0,0$656,194,0,0,0$657,194,0,0,0$658,194,0,0,0$659,194,0,0,0$662,194,255,255,255$663,194,255,255,255$665,194,0,0,0$667,194,255,255,255$668,194,255,255,255$670,194,0,0,0$672,194,255,255,255$674,194,255,255,255$676,194,0,0,0$677,194,0,0,0$678,194,0,0,0$679,194,0,0,0$680,194,0,0,0$682,194,255,255,255$683,194,255,255,255$684,194,255,255,255$685,194,255,255,255$686,194,255,255,255$687,194,255,255,255$688,194,255,255,255$689,194,255,255,255$690,194,255,255,255$693,194,255,255,255$694,194,255,255,255$695,194,255,255,255$696,194,255,255,255$697,194,255,255,255$698,194,255,255,255$699,194,255,255,255$700,194,255,255,255$701,194,255,255,255$703,194,0,0,0$607,195,0,0,0$608,195,0,0,0$610,195,255,255,255$614,195,255,255,255$616,195,0,0,0$617,195,0,0,0$622,195,0,0,0$623,195,0,0,0$629,195,255,255,255$631,195,0,0,0$632,195,0,0,0$633,195,255,255,255$634,195,255,255,255$635,195,255,255,255$636,195,255,255,255$637,195,255,255,255$638,195,255,255,255$639,195,255,255,255$640,195,255,255,255$642,195,255,255,255$645,195,255,255,255$647,195,0,0,0$648,195,0,0,0$649,195,255,255,255$654,195,255,255,255$655,195,0,0,0$656,195,0,0,0$665,195,0,0,0$670,195,0,0,0$671,195,0,0,0$679,195,0,0,0$680,195,0,0,0$703,195,0,0,0$607,196,0,0,0$608,196,0,0,0$615,196,0,0,0$616,196,0,0,0$617,196,0,0,0$622,196,0,0,0$623,196,0,0,0$624,196,0,0,0$631,196,0,0,0$632,196,0,0,0$633,196,255,255,255$646,196,0,0,0$647,196,0,0,0$648,196,0,0,0$654,196,255,255,255$655,196,0,0,0$656,196,0,0,0$658,196,255,255,255$664,196,0,0,0$665,196,0,0,0$670,196,0,0,0$671,196,0,0,0$673,196,255,255,255$679,196,0,0,0$680,196,0,0,0$681,196,0,0,0$682,196,0,0,0$683,196,0,0,0$684,196,0,0,0$685,196,0,0,0$686,196,0,0,0$687,196,0,0,0$688,196,0,0,0$689,196,0,0,0$694,196,0,0,0$695,196,0,0,0$696,196,0,0,0$697,196,0,0,0$698,196,0,0,0$699,196,0,0,0$700,196,0,0,0$701,196,0,0,0$702,196,0,0,0$703,196,0,0,0$607,197,0,0,0$608,197,0,0,0$615,197,0,0,0$616,197,0,0,0$617,197,0,0,0$622,197,0,0,0$623,197,0,0,0$624,197,0,0,0$631,197,0,0,0$632,197,0,0,0$646,197,0,0,0$647,197,0,0,0$648,197,0,0,0$655,197,0,0,0$656,197,0,0,0$664,197,0,0,0$665,197,0,0,0$670,197,0,0,0$671,197,0,0,0$672,197,0,0,0$679,197,0,0,0$680,197,0,0,0$681,197,0,0,0$682,197,0,0,0$683,197,0,0,0$684,197,0,0,0$685,197,0,0,0$686,197,0,0,0$687,197,0,0,0$688,197,0,0,0$689,197,0,0,0$694,197,0,0,0$695,197,0,0,0$696,197,0,0,0$697,197,0,0,0$698,197,0,0,0$699,197,0,0,0$700,197,0,0,0$701,197,0,0,0$702,197,0,0,0$607,198,0,0,0$608,198,0,0,0$609,198,0,0,0$610,198,0,0,0$611,198,0,0,0$612,198,0,0,0$613,198,0,0,0$614,198,0,0,0$615,198,0,0,0$616,198,0,0,0$617,198,0,0,0$618,198,0,0,0$619,198,0,0,0$620,198,0,0,0$621,198,0,0,0$622,198,0,0,0$623,198,0,0,0$624,198,0,0,0$625,198,0,0,0$626,198,0,0,0$627,198,0,0,0$628,198,0,0,0$629,198,0,0,0$630,198,0,0,0$631,198,0,0,0$632,198,0,0,0$633,198,0,0,0$634,198,0,0,0$635,198,0,0,0$636,198,0,0,0$637,198,0,0,0$638,198,0,0,0$639,198,0,0,0$640,198,0,0,0$641,198,0,0,0$642,198,0,0,0$643,198,0,0,0$644,198,0,0,0$645,198,0,0,0$646,198,0,0,0$647,198,0,0,0$648,198,0,0,0$649,198,0,0,0$650,198,0,0,0$651,198,0,0,0$652,198,0,0,0$653,198,0,0,0$654,198,0,0,0$655,198,0,0,0$656,198,0,0,0$657,198,0,0,0$658,198,0,0,0$659,198,0,0,0$660,198,0,0,0$661,198,0,0,0$662,198,0,0,0$663,198,0,0,0$664,198,0,0,0$665,198,0,0,0$666,198,0,0,0$667,198,0,0,0$668,198,0,0,0$669,198,0,0,0$670,198,0,0,0$671,198,0,0,0$672,198,0,0,0$673,198,0,0,0$674,198,0,0,0$675,198,0,0,0$676,198,0,0,0$677,198,0,0,0$678,198,0,0,0$679,198,0,0,0$680,198,0,0,0$688,198,0,0,0$689,198,0,0,0$690,198,0,0,0$691,198,0,0,0$692,198,0,0,0$693,198,0,0,0$694,198,0,0,0$695,198,0,0,0$608,199,0,0,0$609,199,0,0,0$610,199,0,0,0$611,199,0,0,0$612,199,0,0,0$613,199,0,0,0$614,199,0,0,0$615,199,0,0,0$617,199,0,0,0$618,199,0,0,0$619,199,0,0,0$620,199,0,0,0$621,199,0,0,0$622,199,0,0,0$625,199,0,0,0$626,199,0,0,0$627,199,0,0,0$628,199,0,0,0$629,199,0,0,0$630,199,0,0,0$631,199,0,0,0$632,199,0,0,0$633,199,0,0,0$634,199,0,0,0$635,199,0,0,0$636,199,0,0,0$637,199,0,0,0$638,199,0,0,0$639,199,0,0,0$640,199,0,0,0$641,199,0,0,0$642,199,0,0,0$643,199,0,0,0$644,199,0,0,0$645,199,0,0,0$649,199,0,0,0$650,199,0,0,0$651,199,0,0,0$652,199,0,0,0$653,199,0,0,0$654,199,0,0,0$655,199,0,0,0$656,199,0,0,0$657,199,0,0,0$658,199,0,0,0$659,199,0,0,0$660,199,0,0,0$661,199,0,0,0$662,199,0,0,0$663,199,0,0,0$665,199,0,0,0$666,199,0,0,0$667,199,0,0,0$668,199,0,0,0$669,199,0,0,0$670,199,0,0,0$673,199,0,0,0$674,199,0,0,0$675,199,0,0,0$676,199,0,0,0$677,199,0,0,0$678,199,0,0,0$679,199,0,0,0$680,199,0,0,0$689,199,0,0,0$690,199,0,0,0$691,199,0,0,0$692,199,0,0,0$693,199,0,0,0$694,199,0,0,0$610,200,0,0,0$651,200,0,0,0$652,200,0,0,0$656,200,0,0,0$660,200,0,0,0$667,200,0,0,0$668,200,0,0,0$669,200,0,0,0$670,200,0,0,0$674,200,0,0,0$675,200,0,0,0$676,200,0,0,0$677,200,0,0,0$678,200,0,0,0$679,200,0,0,0$680,200,0,0,0$681,200,0,0,0$645,201,0,0,0$646,201,0,0,0$651,201,0,0,0$652,201,0,0,0$656,201,0,0,0$662,201,0,0,0$681,201,0,0,0$682,201,0,0,0$687,201,0,0,0$688,201,0,0,0$627,202,0,0,0$628,202,0,0,0$644,202,0,0,0$650,202,0,0,0$681,202,0,0,0$682,202,0,0,0");
        public static bool IsOpenSystemPanel(ZTRectangle gameRect)
        {
            Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage();
 
            ZTRectangle position = ZTRectangle.Empty;
            return CVHelper.FindColorArrayForThreshold(out position, image, SystemPanelTitle, gameRect);
        }
 
 
        public static ColorArray ExitPanelOkButtonText = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "647,448,221,197,147$637,443,221,197,147$640,443,221,197,147$640,447,221,197,147$638,447,221,197,147$638,451,221,197,147$640,451,221,197,147$642,450,221,197,147$642,452,221,197,147$644,452,221,197,147$647,452,221,197,147$647,450,221,197,147$644,450,221,197,147$644,448,221,197,147$647,446,221,197,147$642,446,221,197,147$643,443,221,197,147$646,443,221,197,147$651,443,221,197,147$651,446,221,197,147$651,452,221,197,147$653,453,221,197,147$659,453,221,197,147$656,442,221,197,147");
        /// <summary>
        /// 查找退出时的确认按钮
        /// </summary>
        /// <param name="okButtonRect"></param>
        /// <param name="gameRect"></param>
        /// <returns></returns>
        public static bool FindExitPanelOkButton(out ZTRectangle okButtonRect, ZTRectangle gameRect)
        {
            okButtonRect = ZTRectangle.Empty;
            Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage();
            return CVHelper.FindColorArray(out okButtonRect, image, ExitPanelOkButtonText, gameRect);
        }
 
        /// <summary>
        /// 个人面板右下角的金币文字
        /// </summary>
        public static ColorArray GoldText = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "957,616,230,200,155$957,609,230,200,155$967,609,230,200,155$962,605,230,200,155$962,609,230,200,155$962,612,230,200,155$966,612,230,200,155$958,612,230,200,155$967,616,230,200,155$970,615,230,200,155$974,616,230,200,155$977,615,230,200,155$978,615,230,200,155$978,609,230,200,155$974,609,230,200,155$974,606,230,200,155$969,606,230,200,155$979,605,230,200,155");
        public static bool GetGoldTextPosition(out ZTRectangle goldTextRect, ZTRectangle gameRect)
        {
            Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage();
 
            return CVHelper.FindColorArray(out goldTextRect, image, GoldText, gameRect);
        }
 
 
        /// <summary>
        /// 已选中的武器文字
        /// </summary>
        public static ColorArray SelectedEquipmentText = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "711,333,255,255,184$722,336,255,255,184$722,334,255,255,184$722,332,255,255,184$722,329,255,255,184$722,327,255,255,184$721,327,255,255,184$720,327,255,255,184$719,327,255,255,184$708,327,255,255,184$708,331,255,255,184$708,333,255,255,184$712,333,255,255,184$713,333,255,255,184$715,333,255,255,184$715,337,255,255,184$714,337,255,255,184$709,337,255,255,184$708,337,255,255,184$708,336,255,255,184$708,335,255,255,184$707,335,255,255,184$710,328,255,255,184$712,328,255,255,184$714,328,255,255,184$712,327,255,255,184$712,330,255,255,184$712,331,255,255,184$713,331,255,255,184$711,331,255,255,184");
        /// <summary>
        /// 未选中的武器文字
        /// </summary>
        public static ColorArray UnSelectedEquipmentText = ColorArray.FromHsvFloatString(0.002f, 0.002f, 0.002f, "710,331,221,197,147$708,326,221,197,147$708,328,221,197,147$708,331,221,197,147$710,328,221,197,147$712,328,221,197,147$715,328,221,197,147$712,326,221,197,147$712,331,221,197,147$714,331,221,197,147$710,332,221,197,147$710,333,221,197,147$712,333,221,197,147$715,333,221,197,147$705,333,221,197,147$709,334,221,197,147$709,337,221,197,147$708,337,221,197,147$714,337,221,197,147$715,337,221,197,147$719,336,221,197,147$722,336,221,197,147$725,336,221,197,147$725,334,221,197,147$722,334,221,197,147$719,334,221,197,147$719,332,221,197,147$722,332,221,197,147$725,332,221,197,147$725,330,221,197,147$724,330,221,197,147$723,329,221,197,147$721,329,221,197,147$722,329,221,197,147$725,327,221,197,147$723,327,221,197,147$721,327,221,197,147$720,327,221,197,147");
 
        /// <summary>
        /// 获取装备的选择状态
        /// </summary>
        /// <param name="rect"></param>
        /// <param name="selectStatus">0:未选中,1:已选中</param>
        /// <param name="gameRect"></param>
        /// <returns>true:获取成功,false:获取失败</returns>
        public static bool GetEquipmentSelectStatus(out ZTRectangle rect, out Int32 selectStatus, ZTRectangle gameRect)
        {
            selectStatus = 0;
            Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage();
 
            //已选中
            if (CVHelper.FindColorArray(out rect, image, SelectedEquipmentText, gameRect))
            {
                selectStatus = 1;
                return true;
            }
 
            //未选中
            if (CVHelper.FindColorArray(out rect, image, UnSelectedEquipmentText, gameRect))
            {
                selectStatus = 0;
                return true;
            }
            return false;
        }
 
 
 
        //min:(0,0.,0.0352941192686558),max:(0.,0.,0.0980392172932625)
        private static ZTHsvFloatColor equipmentColorMin = new ZTHsvFloatColor(0,0, 0);
        private static ZTHsvFloatColor equipmentColorMax = new ZTHsvFloatColor(1, 0.7827f, 0.1099f);
        private static Structs.ZTPoint[] equipmentComparePositionss;
        /// <summary>
        /// 获取有装备的所有点,只便利前两行
        /// </summary>
        /// <param name="startPoint"></param>
        /// <returns></returns>
        public static List<Int32> GetEquipmentIndexs(Structs.ZTPoint startPoint)
        {
            Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage();
            return GetEquipmentIndexs(image, startPoint);
        }
 
        public static List<Int32> GetEquipmentIndexs(Image<Rgb, byte> image, Structs.ZTPoint startPoint)
        {
            if (equipmentComparePositionss == null)
            {
                equipmentComparePositionss = new Structs.ZTPoint[15 * 15];
                for (int y = 0; y < 15; y++)
                {
                    for (int x = 0; x < 15; x++)
                    {
                        equipmentComparePositionss[y * 15 + x] = new Structs.ZTPoint(x, y);
                    }
                }
            }
 
            List<Int32> points = new List<int>();
            byte[,,] datas = image.Data;
            //每格步进30
            for (int i = 0; i < 16; i++)
            {
                int row = i / 8;
                int col = i % 8;
                int x = col * 30 + 7;
                int y = row * 30 + 7;
 
                if (!CVHelper.InRange(datas, startPoint.X + x, startPoint.Y + y, equipmentColorMin, equipmentColorMax, equipmentComparePositionss))
                {
                    points.Add(i);
                }
 
            }
 
            return points;
        }
        //灰
        //private static Hsv minRoleHsv = new Hsv(0, 0, 178);
        //private static Hsv maxRoleHsv = new Hsv(180, 0, 229);
        //蓝
 
        private static Hsv minRoleHsv = new Hsv(118, 250, 250);
        private static Hsv maxRoleHsv = new Hsv(122, 255, 255);
        //private static ZTSize roleBlockSize = new ZTSize(60, 22);
        private static ZTSize roleBlockSize = new ZTSize(40, 20);
        private static ZTSize rolePositionOffset = new ZTSize(60, 145);//查找到角色色块后,角色的水平和垂直偏移
 
        /// <summary>
        /// 查找主角
        /// </summary>
        /// <param name="image"></param>
        /// <returns></returns>
        public static ZTPoint FindRole(Image<Hsv, byte> image, ZTRectangle gameRect)
        {
            List<ZTRectangle> rects = CVHelper.FindBlocks(image, minRoleHsv, maxRoleHsv, roleBlockSize);
 
            if (rects.Count <= 0)
            {
                return ZTPoint.Empty;
            }
 
            //主角位置
            ZTPoint rolePosition = gameRect.Start.Add(rects[0].Start.X + rolePositionOffset.Width, rects[0].Start.Y + rolePositionOffset.Height);
 
            return rolePosition;
        }
 
 
        private const Int32 radisXMaxRange = 8;//x容差范围
        private const Int32 radisYMaxRange = 45;//y容差范围
        private const Int32 xLineMin = 46;//横向最小宽度
        private const Int32 yLineMin = 26;//纵向最小高度
        private const Int32 thingItemYOffset = 50;//查找的横线与物体垂直偏移
 
        //other remove:min:(0.0166666675359011,0.0584795325994492,0.564705908298492),max:(0.115740731358528,0.543589770793915,0.764705896377563)
        //min:(0.0454545430839062,0.148148149251938,0.454901963472366),max:(0.146666660904884,0.53804349899292,0.952941179275513)
        //边框颜色
        static ZTHsvFloatColor min = new ZTHsvFloatColor(0.0166f,  0.0584f, 0.5647f);
        static ZTHsvFloatColor max = new ZTHsvFloatColor(0.1467f, 0.5436f, 0.9530f);
 
        //other remove:min:(0,0.111111111938953,0.0666666701436043),max:(0.958333313465118,0.65625,0.129411771893501)
        //min:(0,0,0.0392156876623631),max:(0.833333313465118,1,0.219607844948769)
        //内部颜色
        static ZTHsvFloatColor innerMin = new ZTHsvFloatColor(0, 0f, 0.0392f);
        static ZTHsvFloatColor innerMax = new ZTHsvFloatColor(1, 1f, 0.2197f); 
        /// <summary>
        /// 获取物品项点位
        /// </summary>
        /// <param name="image"></param>
        /// <param name="gameRect"></param>
        /// <returns></returns>
        public static List<Structs.ZTPoint> GetThingItemPoints(Image<Rgb, byte> image, ZTRectangle gameRect)
        {
            List<ZTLine> lines = CVHelper.FindLines(image, xLineMin,gameRect, Orientation.Horizontal, min, max);
            List<ZTLine> filterLines = new List<ZTLine>();
            List<Structs.ZTPoint> points = new List<Structs.ZTPoint>();
            Func<ZTLine, bool> existsLines = (line) =>
            {
                for (int i = 0; i < filterLines.Count; i++)
                {
                    //离得太近
                    if (Math.Abs(filterLines[i].Y - line.Y) <= 3)
                    {
                        //横坐标是否重合
                        if ((line.X + line.Length) < filterLines[i].X || line.X > (filterLines[i].X + filterLines[i].Length))
                        {
                            //未重合
                            continue;
                        }
                        return true;
                    }
                }
                return false;
            };
 
            ZTRectangle limit = ZTRectangle.Empty;
            ZTLine vline = ZTLine.Empty;
            //bool isLeft = true;
            for (int i = 0; i < lines.Count; i++)
            {
                ZTLine line = lines[i];
                //是否存在距离比较近的线
                if (existsLines(line))
                {
                    continue;
                }
 
                //查找左边
                //isLeft = true;
                limit = new ZTRectangle(line.X - radisXMaxRange, line.Y, line.X, line.Y + radisYMaxRange);
                if (!CVHelper.FindLine(out vline, image, yLineMin, limit, RichCreator.Utility.Structs.Orientation.Vertical, min, max))
                {
                    limit = new ZTRectangle(line.X + line.Length, line.Y, line.X + line.Length + radisXMaxRange, line.Y + radisYMaxRange);
                    if (!CVHelper.FindLine(out vline, image, yLineMin, limit, Orientation.Vertical, min, max))
                    {
                        continue;
                    }
                    //isLeft = false;
                }
 
                //内部是否黑色
                if (!CVHelper.InRange(image.Data, line.X + 3, line.Y + 3, innerMin, innerMax))
                {
                    continue;
                }
                
                filterLines.Add(line);
                points.Add(new Structs.ZTPoint(line.X + line.Length / 2, line.Y + thingItemYOffset));
            }
            return points;
        }
 
 
        #region Location Point 1
        private static readonly Hsv LocationPointMinHsv = new Hsv(0, 0, 0);
        private static readonly Hsv LocationPointMaxHsv = new Hsv(0, 0, 5);
        private static readonly ZTSize LocationPointMinLimitSize = new ZTSize(33, 33);
        private static readonly ZTSize LocationPointMaxLimitSize = new ZTSize(55, 55);
 
        /// <summary>
        /// 获取定位点
        /// </summary>
        public static bool GetLocationPoint(out MultiList<ZTRectangle,Int32> list,Image<Hsv,byte> imageHsv,ZTRectangle gameRect)
        {
            list = new MultiList<ZTRectangle, int>();
            Image<Gray, byte> rangeImage = imageHsv.InRange(LocationPointMinHsv, LocationPointMaxHsv);
            //rangeImage.Save("gray.png");
 
            //查找边框
            Emgu.CV.Util.VectorOfVectorOfPoint contours = new Emgu.CV.Util.VectorOfVectorOfPoint();
            Image<Gray, byte> hierarchy = new Image<Gray, byte>(rangeImage.Size);
            CvInvoke.FindContours(rangeImage, contours, hierarchy, Emgu.CV.CvEnum.RetrType.External, Emgu.CV.CvEnum.ChainApproxMethod.ChainApproxSimple);
 
            for (int i = 0; i < contours.Size; i++)
            {
                System.Drawing.Rectangle rect = CvInvoke.BoundingRectangle(contours[i]);
                if (rect.Width < LocationPointMinLimitSize.Width ||//比下限小 
                    rect.Height < LocationPointMinLimitSize.Height||
                    rect.Width>LocationPointMaxLimitSize.Width||//比上限大
                    rect.Height>LocationPointMaxLimitSize.Height)
                {
                    continue;
                }
                ZTRectangle locationPointRect = new ZTRectangle(rect.X, rect.Y, rect.X + rect.Width - 1, rect.Y + rect.Height - 1);
                Int32 number = 0;
                if (ParseLocationPoint(out number, locationPointRect, rangeImage))
                {
                    list.Add(locationPointRect,number);
                }
            }
            if (list.Count > 0)
            {
                return true;
            }
            return false;
        }
 
        //0xff:黑,0x00:白
        private const byte black = 0xff;
        private const byte white = 0x00;
        /// <summary>
        /// 解析定位点
        /// </summary>
        /// <param name="locationPointRect"></param>
        /// <param name="number"></param>
        /// <param name="rangeImage"></param>
        /// <returns></returns>
        private static bool ParseLocationPoint(out Int32 number, ZTRectangle locationPointRect ,Image<Gray, byte> rangeImage)
        {
            number = 0;
            byte[,,] datas = rangeImage.Data;
            bool one = false, two = false, four = false, eight = false;
            Structs.ZTPoint center = locationPointRect.GetCenterPoint();
 
            //格1
            Structs.ZTPoint lefttop = center.Add(-11);
            if (!BlockOf6x6IsColor(datas, lefttop, black))
            {
                if (!BlockOf6x6IsColor(datas, lefttop, white))
                {
                    return false;
                }
                else
                {
                    one = false;
                }
            }
            else
            {
                one = true;
            }
            //格2
            Structs.ZTPoint righttop = center.Add(new Structs.ZTPoint(5,-11));
            if (!BlockOf6x6IsColor(datas, righttop, black))
            {
                if (!BlockOf6x6IsColor(datas, righttop, white))
                {
                    return false;
                }
                else
                {
                    two = false;
                }
            }
            else
            {
                two = true;
            }
 
            //格4
            Structs.ZTPoint leftbottom = center.Add(new Structs.ZTPoint(-11, 5));
            if (!BlockOf6x6IsColor(datas, leftbottom, black))
            {
                if (!BlockOf6x6IsColor(datas, leftbottom, white))
                {
                    return false;
                }
            }
            else
            {
                four = true;
            }
 
            //格8
            Structs.ZTPoint rightbottom = center.Add(5);
            if (!BlockOf6x6IsColor(datas, rightbottom, black))
            {
                if (!BlockOf6x6IsColor(datas, rightbottom, white))
                {
                    return false;
                }
            }
            else
            {
                eight = true;
            }
 
            number += (one ? 1 : 0);
            number += (two ? 2 : 0);
            number += (four ? 4 : 0);
            number += (eight ? 8 : 0);
            return true;
        }
 
        /// <summary>
        /// 是否整个6*6的方块是某种颜色
        /// </summary>
        /// <param name="datas"></param>
        /// <param name="startx"></param>
        /// <param name="starty"></param>
        /// <param name="color"></param>
        /// <returns></returns>
        private static bool BlockOf6x6IsColor(byte[,,] datas, Structs.ZTPoint start, byte color)
        {
            for (int y = start.Y; y < start.Y + 6; y++)
            {
                for (int x = start.X; x < start.X + 6; x++)
                {
                    if (datas[y, x, 0] != color)
                    {
                        return false;
                    }
                }
            }
 
            return true;
        }
 
        #endregion
 
        #region Location Point 2
        private static ColorArray LocationPoint = ColorArray.FromColorString(0, 0, "800,352,0,0,0$791,343,255,255,255$793,343,0,0,0$796,343,255,255,255$798,343,0,0,0$801,343,255,255,255$802,345,0,0,0$802,347,255,255,255$802,349,0,0,0$802,352,255,255,255$797,352,255,255,255$795,352,0,0,0$791,352,255,255,255$791,350,0,0,0$791,348,255,255,255$791,346,0,0,0$796,347,255,255,255$797,348,255,255,255");
        /// <summary>
        /// 获取定位点
        /// </summary>
        /// <param name="image"></param>
        /// <param name="gameRect"></param>
        /// <returns></returns>
        public static ParametersPoint GetLocationPoint(Image<Rgb,byte> image,ZTRectangle gameRect)
        {
            ZTRectangle rect = ZTRectangle.Empty;
            if (CVHelper.FindColorArray(out rect, image, LocationPoint, gameRect))
            {
                //获取定位标记,解析参数
                byte number = 0;
                bool bitValue = true;
 
                Int32 x = 0, y = 0;
                for (int bitIndex = 0; bitIndex <= 7; bitIndex++)
                {
                    //获取图像中存值的坐标
                    GetBitCoordinate(out x, out y, bitIndex);
                    
                    //解析并设置值
                    if (!ParseBit(out bitValue, image, rect.Start.Add(x, y)))
                    {
                        return ParametersPoint.Empty;
                    }
                    else
                    {
                        number=SetBit(number, bitIndex, bitValue);
                    }
                }
 
                return new ParametersPoint(rect.GetCenterPoint(), number);
                
            }
 
            return ParametersPoint.Empty;
        }
 
        /// <summary>
        /// 设置指定位
        /// </summary>
        /// <param name="number"></param>
        /// <param name="bitIndex"></param>
        /// <param name="bitValue"></param>
        /// <returns></returns>
        private static byte SetBit(byte number, Int32 bitIndex,bool bitValue)
        {
            byte twonumber = 0;
            switch (bitIndex)
            {
                case 0:
                    if (bitValue)
                    {
                        twonumber = 0b00000001;
                    }
                    else
                    {
                        twonumber = 0b11111110;
                    }                    
                    break;
                case 1:
                    if (bitValue)
                    {
                        twonumber = 0b00000010;
                    }
                    else
                    {
                        twonumber = 0b11111101;
                    }
                    break;
                case 2:
                    if (bitValue)
                    {
                        twonumber = 0b00000100;
                    }
                    else
                    {
                        twonumber = 0b11111011;
                    }
                    break;
                case 3:
                    if (bitValue)
                    {
                        twonumber = 0b00001000;
                    }
                    else
                    {
                        twonumber = 0b11110111;
                    }
                    break;
                case 4:
                    if (bitValue)
                    {
                        twonumber = 0b00010000;
                    }
                    else
                    {
                        twonumber = 0b11101111;
                    }
                    break;
                case 5:
                    if (bitValue)
                    {
                        twonumber = 0b00100000;
                    }
                    else
                    {
                        twonumber = 0b11011111;
                    }
                    break;
                case 6:
                    if (bitValue)
                    {
                        twonumber = 0b01000000;
                    }
                    else
                    {
                        twonumber = 0b10111111;
                    }
                    break;
                case 7:
                    if (bitValue)
                    {
                        twonumber = 0b10000000;
                    }
                    else
                    {
                        twonumber = 0b01111111;
                    }
                    break;
            }
 
            if (bitValue)
            {
                return (byte)(number | twonumber);
            }
            else
            {
                return (byte)(number & twonumber);
            }
        }
 
 
 
        /// <summary>
        /// 得到指定位坐标
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="bitIndex"></param>
        private static void GetBitCoordinate(out Int32 x, out Int32 y, Int32 bitIndex)
        {
            x = 0;
            y = 0;
            switch (bitIndex)
            {
                case 0:
                    x = 8;
                    y = 6;
                    break;
                case 1:
                    x = 6;
                    y = 6;
                    break;
                case 2:
                    x = 4;
                    y = 6;
                    break;
                case 3:
                    x = 2;
                    y = 6;
                    break;
                case 4:
                    x = 8;
                    y = 2;
                    break;
                case 5:
                    x = 6;
                    y = 2;
                    break;
                case 6:
                    x = 4;
                    y = 2;
                    break;
                case 7:
                    x = 2;
                    y = 2;
                    break;
            }
        }
        
        /// <summary>
        /// 解析位状态
        /// true:1
        /// false:0
        /// </summary>
        /// <param name="bit"></param>
        /// <param name="image"></param>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns>true:解析成功,false:解析失败</returns>
        private static bool ParseBit(out bool bit,Image<Rgb, byte> image, ZTPoint point)
        {
            bit = true;
            if (image.Data[point.Y, point.X, 0] == 0xff && image.Data[point.Y, point.X, 1] == 0xff && image.Data[point.Y, point.X, 2] == 0xff&&
                image.Data[point.Y, point.X+1, 0] == 0xff && image.Data[point.Y, point.X+1, 1] == 0xff && image.Data[point.Y, point.X+1, 2] == 0xff&&
                image.Data[point.Y+1, point.X, 0] == 0xff && image.Data[point.Y+1, point.X, 1] == 0xff && image.Data[point.Y+1, point.X, 2] == 0xff&&
                image.Data[point.Y+1, point.X+1, 0] == 0xff && image.Data[point.Y+1, point.X+1, 1] == 0xff && image.Data[point.Y+1, point.X+1, 2] == 0xff)
            {
                //白
                bit = true;
                return true;
            }
 
            if (image.Data[point.Y, point.X, 0] == 0x00 && image.Data[point.Y, point.X, 1] == 0x00 && image.Data[point.Y, point.X, 2] == 0x00 &&
                image.Data[point.Y, point.X + 1, 0] == 0x00 && image.Data[point.Y, point.X + 1, 1] == 0x00 && image.Data[point.Y, point.X + 1, 2] == 0x00 &&
                image.Data[point.Y + 1, point.X, 0] == 0x00 && image.Data[point.Y + 1, point.X, 1] == 0x00 && image.Data[point.Y + 1, point.X, 2] == 0x00 &&
                image.Data[point.Y + 1, point.X + 1, 0] == 0x00 && image.Data[point.Y + 1, point.X + 1, 1] == 0x00 && image.Data[point.Y + 1, point.X + 1, 2] == 0x00)
            {
                //黑
                bit = false;
                return true;
            }
            return false;
        }
 
        #endregion
        #region minimap
 
        /// <summary>
        /// 小方格色块偏移
        /// </summary>
        private static ZTPoint[] colorOffset = new ZTPoint[] {
            new ZTPoint(2,14),
            new ZTPoint(2,15),
            new ZTPoint(15,14),
            new ZTPoint(15,15),
        };
 
        /// <summary>
        /// 已经走过的房间颜色(青色)
        /// </summary>
        private static ZTHsvFloatColor crossedColorMin = new ZTHsvFloatColor(0.498, 0.998, 0.998);
        private static ZTHsvFloatColor crossedColorMax = new ZTHsvFloatColor(0.502, 1, 1);
        /// <summary>
        /// 是否穿越过的房间(青色)
        /// </summary>
        /// <param name="image"></param>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        public static bool IsCrossedHouseColor(Image<Rgb, byte> image, Int32 x, Int32 y)
        {
            if (CVHelper.InRange(image.Data, x, y, crossedColorMin, crossedColorMax, colorOffset))
            {
                return true;
            }
            return false;
        }
 
 
 
        /// <summary>
        /// 当前房间颜色(蓝色)
        /// </summary>
        private static ZTHsvFloatColor currentHouseColorMin = new ZTHsvFloatColor(0.665f, 0.998, 0.998);
        private static ZTHsvFloatColor currentHouseColorMax = new ZTHsvFloatColor(0.669f, 1, 1);
        /// <summary>
        /// 是否当前房间(蓝色)
        /// </summary>
        /// <param name="image"></param>
        /// <param name="minMapStart"></param>
        /// <param name="houseIndex"></param>
        /// <returns></returns>
        public static bool IsCurrentHouseColor(Image<Rgb, byte> image, Int32 x, Int32 y)
        {
            if (CVHelper.InRange(image.Data, x, y, currentHouseColorMin, currentHouseColorMax, colorOffset))
            {
                return true;
            }
            return false;
        }
 
 
        /// <summary>
        /// 下一房间颜色(绿色)
        /// </summary>
        private static ZTHsvFloatColor nextHouseColorMin = new ZTHsvFloatColor(0.298f, 0.998, 0.998);
        private static ZTHsvFloatColor nextHouseColorMax = new ZTHsvFloatColor(0.302, 1, 1);
        /// <summary>
        /// 是否下一房间,绿色
        /// </summary>
        /// <param name="image"></param>
        /// <param name="minMapStart"></param>
        /// <param name="houseIndex"></param>
        /// <returns></returns>
        public static bool IsNextHouseColor(Image<Rgb, byte> image, Int32 x, Int32 y)
        {
            if (CVHelper.InRange(image.Data, x, y, nextHouseColorMin, nextHouseColorMax, colorOffset))
            {
                return true;
            }
            return false;
        }
 
 
 
        /// <summary>
        /// 最终房间颜色(红色1)
        /// </summary>
        private static ZTHsvFloatColor overHouse1ColorMin = new ZTHsvFloatColor(0, 0.998, 0.998);
        private static ZTHsvFloatColor overHouse1ColorMax = new ZTHsvFloatColor(0.002, 1, 1);
 
        /// <summary>
        /// 最终房间颜色(红色2)
        /// </summary>
        private static ZTHsvFloatColor overHouse2ColorMin = new ZTHsvFloatColor(0.998, 0.998, 0.998);
        private static ZTHsvFloatColor overHouse2ColorMax = new ZTHsvFloatColor(1.0f, 1, 1);
 
        /// <summary>
        /// 是否最终房间
        /// </summary>
        /// <param name="image"></param>
        /// <param name="minMapStart"></param>
        /// <param name="houseIndex"></param>
        /// <returns></returns>
        public static bool IsOverHouseColor(Image<Rgb, byte> image, Int32 x, Int32 y)
        {
            if (CVHelper.InRange(image.Data, x, y, overHouse1ColorMin, overHouse1ColorMax, colorOffset)
                || CVHelper.InRange(image.Data, x, y, overHouse2ColorMin, overHouse2ColorMax, colorOffset))
            {
                return true;
            }
            return false;
        }
 
        #endregion
    }
}