def match_all(self, pattern, threshold=None):
pattern = self.pattern_open(pattern)
search_img = pattern.image
pattern_scale = self._cal_scale(pattern)
if pattern_scale != 1.0:
search_img = cv2.resize(search_img, (0, 0),
fx=pattern_scale, fy=pattern_scale,
interpolation=cv2.INTER_CUBIC)
threshold = threshold or pattern.threshold or self.image_match_threshold
screen = self.region_screenshot()
screen = imutils.from_pillow(screen)
points = ac.find_all_template(screen, search_img, threshold=threshold, maxcnt=10)
return points
评论列表
文章目录