vision_processing.py 文件源码

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

项目:Stronghold-2016-Vision 作者: team4099 项目源码 文件源码
def average_goal_matching(contour):
    global DEFINITE_GOALS
    total_score = 0
    min_score = 9999999999999999
    # number_of_things = 0
    if len(contour) < 8:
        return 9999999999999999
    for definite_goal in DEFINITE_GOALS:
        # number_of_things += 1
        this_score = cv2.matchShapes(contour, definite_goal, 1, 0.0)
        # print("Score:", this_score)
        total_score += this_score
        if this_score < min_score:
            min_score = this_score
    # print(number_of_things)
    # print("Smallest score:", min_score)
    # return total_score / DEFINITE_GOALS.size
    return min_score
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号