main.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:frc-livescore 作者: andrewda 项目源码 文件源码
def matchTemplate(self, img, template):
        res = cv2.matchTemplate(cv2.cvtColor(img, cv2.COLOR_RGB2GRAY),
                                template,
                                cv2.TM_CCOEFF_NORMED)
        min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res)
        top_left = max_loc
        bottom_right = (top_left[0] + template.shape[1],
                        top_left[1] + template.shape[0])

        return top_left, bottom_right
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号