def getScoreboard(self, img):
template_width = self.TEMPLATE_SCOREBOARD.shape[1]
img_width = img.shape[1]
template = imutils.resize(self.TEMPLATE_SCOREBOARD,
width=int(template_width/1280.0*img_width))
top_left, bottom_right = self.matchTemplate(img, template)
return img[top_left[1]:bottom_right[1], top_left[0]:bottom_right[0]]
评论列表
文章目录