Skip to content

你好,请问AirApp 图片识别,可以用灰色无图案的图去目标截图里是否存在吗,就是想判断目标区域是否没有任何图案。 #9

@sjingsya

Description

@sjingsya

def loop_find_assign(query, width, height, origin: tuple, timeout=ST.FIND_TIMEOUT, threshold=None, interval=0.2, intervalfunc=None):
start_time = time.time()
while True:
screen = G.DEVICE.assign_snapshot( width, height, origin, filename=None, quality=ST.SNAPSHOT_QUALITY)
if screen is None:
G.LOGGING.warning("Screen is None, may be locked")
else:
if threshold:
query.threshold = threshold
match_pos = query.match_in(screen)
if match_pos:
try_log_screen(screen)
return match_pos screen 截取到目标区域的图片,灰色有图案,query纯灰色的图query.match_in(screen),match_pos 还是返回了值。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions