imutils.py 文件源码

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

项目:ATX 作者: NetEaseGame 项目源码 文件源码
def mark_point(img, x, y):
    """
    Mark a point

    Args:
        - img(numpy): the source image
        - x, y(int): position
    """
    overlay = img.copy()
    output = img.copy()

    alpha = 0.5
    radius = max(5, min(img.shape[:2])//15)
    center = int(x), int(y)
    color = (0, 0, 255)

    cv2.circle(overlay, center, radius, color, -1)
    cv2.addWeighted(overlay, alpha, output, 1-alpha, 0, output)
    return output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号