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
| # 图像识别颜色定义
# 数字1-8 周围雷数
# 0 未被打开
# ed 被打开 空白
# flag 红旗
# boom 普通雷
# boom_red 踩中的雷
# qm 问号
# 雷块
rgba_ed = [(225, (192, 192, 192)), (31, (128, 128, 128))]
rgba_flag = [(54, (255, 255, 255)), (17, (255, 0, 0)), (109, (192, 192, 192)), (54, (128, 128, 128)), (22, (0, 0, 0))]
rgba_0 = [(54, (255, 255, 255)), (148, (192, 192, 192)), (54, (128, 128, 128))]
rgba_1 = [(185, (192, 192, 192)), (31, (128, 128, 128)), (40, (0, 0, 255))]
rgba_2 = [(160, (192, 192, 192)), (31, (128, 128, 128)), (65, (0, 128, 0))]
rgba_3 = [(62, (255, 0, 0)), (163, (192, 192, 192)), (31, (128, 128, 128))]
rgba_4 = [(169, (192, 192, 192)), (31, (128, 128, 128)), (56, (0, 0, 128))]
rgba_5 = [(70, (128, 0, 0)), (155, (192, 192, 192)), (31, (128, 128, 128))]
rgba_6 = [(153, (192, 192, 192)), (31, (128, 128, 128)), (72, (0, 128, 128))]
rgba_7 = [(181, (192, 192, 192)), (31, (128, 128, 128)), (44, (0, 0, 0))]
rgba_8 = [(149, (192, 192, 192)), (107, (128, 128, 128))]
rgba_boom = [(4, (255, 255, 255)), (144, (192, 192, 192)), (31, (128, 128, 128)), (77, (0, 0, 0))]
rgba_boom_red = [(4, (255, 255, 255)), (144, (255, 0, 0)), (31, (128, 128, 128)), (77, (0, 0, 0))]
rgba_wrong_boom = [(1, (255, 255, 255)), (46, (255, 0, 0)), (126, (192, 192, 192)), (31, (128, 128, 128)), (52, (0, 0, 0))]
rgba_qm = [(54, (255, 255, 255)), (124, (192, 192, 192)), (54, (128, 128, 128)), (24, (0, 0, 0))]
# 雷数
# 2、3、5
# 6和9
# 3、5
num_0 = [(126, (255, 0, 0)), (10, (128, 0, 0)), (163, (0, 0, 0))]
num_1 = [(42, (255, 0, 0)), (52, (128, 0, 0)), (205, (0, 0, 0))]
num_2 = [(107, (255, 0, 0)), (24, (128, 0, 0)), (168, (0, 0, 0))]
num2_3 = [(10, (255, 0, 0)), (24, (128, 0, 0)), (29, (0, 0, 0))]
num_4 = [(86, (255, 0, 0)), (30, (128, 0, 0)), (183, (0, 0, 0))]
num3_5 = [(27, (255, 0, 0)), (6, (0, 0, 0))]
num_6 = [(128, (255, 0, 0)), (12, (128, 0, 0)), (159, (0, 0, 0))]
num_7 = [(63, (255, 0, 0)), (43, (128, 0, 0)), (193, (0, 0, 0))]
num_8 = [(149, (255, 0, 0)), (150, (0, 0, 0))]
num2_9 = [(31, (255, 0, 0)), (12, (128, 0, 0)), (20, (0, 0, 0))] |