Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sjingsya opened this issue Nov 30, 2023 · 2 comments

Comments

@sjingsya
Copy link

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 还是返回了值。

@yihleego
Copy link
Owner

yihleego commented Dec 5, 2023

您好,您描述想要实现的功能应该属于Airtest,可以参考官网文档,根据我对官网文档的理解应该是支持的:
https://airtest.doc.io.netease.com/IDEdocs/3.6settings/2_script_settings/#rgb

@sjingsya
Copy link
Author

sjingsya commented Dec 6, 2023

好的谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants