示例#1
0
def click_goto_fb(team_mode):
    if team_mode == 1:
        print("click zudui")
        return gc.click_pic("teamatdoor")
    else:
        print("click tansuo")
        return gc.click_pic("exploreratdoor")
示例#2
0
def is_at_has_enemy_window():
    return gc.has_pic("enemy")
示例#3
0
def is_left_0_break_count():
    if bc.has_pic("num0") == 0:
        return 1
    else:
        return 0
示例#4
0
def click_2_union():
    return bc.click_pic_plus("unionmode", -200, 250)
示例#5
0
def is_at_breaked_window():
    return bc.has_pic("breakwin")
示例#6
0
def is_at_1_union_window():
    return bc.has_pic("union1")
示例#7
0
def click_enemy():
    return gc.click_pic("enemy")
示例#8
0
def click_boss():
    return gc.click_pic("boss")
示例#9
0
def is_at_union_break_door_window():
    return gc.has_pic("unionmode")
示例#10
0
def is_at_self_break_door_window():
    return gc.has_pic("selfmode")
示例#11
0
def is_at_enchantment_break_door_window():
    return gc.has_pic("enchantmentbreakdoor")
示例#12
0
def is_at_open_box_window():
    return gc.has_pic("openbox")
示例#13
0
def is_at_end_fight_window():
    return gc.has_pic("endfight")
示例#14
0
def is_at_has_box_window():
    return gc.has_pic("box")
示例#15
0
def is_at_has_boss_window():
    return gc.has_pic("boss")
示例#16
0
def has_section(section_num):
    return gc.has_pic("section%s" % section_num)
示例#17
0
def click_box():
    return gc.click_pic("box")
示例#18
0
def is_at_attack_break_window():
    res = gc.has_pic("attackbreak")
    return res
示例#19
0
def is_at_section_door():
    return gc.has_pic("exploreratdoor")
示例#20
0
def is_at_explorer_window():
    return gc.has_pic("enchantmentbreak")
示例#21
0
def click_pve_cost():
    return gc.click_pic("pvecost")
示例#22
0
def is_at_readyforfight_window():
    return gc.has_pic("readyforfight")
示例#23
0
def is_at_3_union_window():
    return bc.has_pic("union3")
示例#24
0
def is_at_lose_window():
    return gc.has_pic("losewindow")
示例#25
0
def click_1_union():
    return bc.click_pic_plus("unionmode", -200, 100)
示例#26
0
def click_section17():
    return gc.click_pic("section17")
示例#27
0
def click_3_union():
    return bc.click_pic_plus("unionmode", -200, 420)
示例#28
0
def click_section(section_num):
    return gc.click_pic("section%s" % section_num)
示例#29
0
import os
import cv2
from matplotlib import pyplot as plt
from Biz import BaseControl

BaseControl.save_screentshot()
project_dir = os.path.dirname(os.getcwd()) + "\\Resource"
img = cv2.imread(project_dir + "\\1.png", 0)

img2 = img.copy()
template = cv2.imread(project_dir + "\\attackbreak.png", 0)
w, h = template.shape[::-1]

# 6 中匹配效果对比算法
methods = ['cv2.TM_CCOEFF_NORMED']
#methods = [ 'cv2.TM_CCOEFF_NORMED', 'cv2.TM_CCORR_NORMED', 'cv2.TM_SQDIFF_NORMED']
# methods = ['cv2.TM_CCOEFF', 'cv2.TM_CCOEFF_NORMED', 'cv2.TM_CCORR', 'cv2.TM_CCORR_NORMED', 'cv2.TM_SQDIFF', 'cv2.TM_SQDIFF_NORMED']

for meth in methods:
    img = img2.copy()

    method = eval(meth)

    res = cv2.matchTemplate(img, template, method)

    min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res)

    if method in [cv2.TM_SQDIFF, cv2.TM_SQDIFF_NORMED]:
        top_left = min_loc
        print(1 - min_val)
    else:
示例#30
0
def click_win_window():
    return gc.db_click_pic("winwindow")