ha4t.aircv.cv module
- class Template(filename, threshold=None, target_pos=5, record_pos=None, resolution=(), rgb=False, scale_max=800, scale_step=0.005)[源代码]
基类:
object
picture as touch/swipe/wait/exists target and extra info for cv match filename: pic filename target_pos: ret which pos in the pic record_pos: pos in screen when recording resolution: screen resolution when recording rgb: 识别结果是否使用rgb三通道进行校验. scale_max: 多尺度模板匹配最大范围. scale_step: 多尺度模板匹配搜索步长.
- property filepath
- class Predictor[源代码]
基类:
object
this class predicts the press_point and the area to search im_search.
- DEVIATION = 100
- match_loop(screenshot_func: <MagicMock name='mock.Device.screenshot' id='140002806826144'>, template, timeout=10, threshold=None, rgb=False, *args, **kwargs)[源代码]
模板匹配循环,直到匹配到一个或多个模板为止. :param screenshot_func: 截图函数,返回截图图片. :param template: 模板列表. :param timeout: 超时时间,单位秒. :param threshold: 匹配阈值. :param rgb: 是否使用rgb三通道进行校验. :return: 匹配到的模板列表.