Ejemplo n.º 1
0
    def search_mutlimg_zoom(self, template_img, target_img, zoom):

        """
        缩放查找图片
        :param template_img: 要查找的图片
        :param target_img: 需要查找的目标图片
        :param zoom: 缩放
        :return: 成功返回图片位置的列表[x,y],失败返回空列表
        """
        template_img = Image.resize_by_zoom(zoom, template_img)
        threshold = config.getfloat("game", "imageSearchThreshold")
        return mutl_match(target_img, template_img, threshold)
Ejemplo n.º 2
0
 def find_img_zoom(self, template_img, target_img, zoom):
     """
     缩放查找图片
     :param template_img: 要查找的图片
     :param target_img: 需要查找的目标图片
     :param zoom: 缩放
     :return: 成功返回图片位置[x,y],失败返回None
     """
     template_img = Image.resize_by_zoom(zoom, template_img)
     threshold = config.getfloat("game", "imageSearchThreshold")
     debug = config.getboolean("game", "debug")
     return best_match(target_img, template_img, threshold, debug)