vision_util.py 文件源码

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

项目:Vision2016 作者: Team3309 项目源码 文件源码
def canny(img, lowThreshold):
    """
    Performs canny edge detection on the provided grayscale image.
    :param img: a grayscale image
    :param lowThreshold: threshold for the canny operation
    :return: binary image containing the edges found by canny
    """

    dst = np.zeros(img.shape, dtype=img.dtype)
    cv2.blur(img, (3, 3), dst)

    # canny recommends that the high threshold be 3 times the low threshold
    # the kernel size is 3 as defined above
    return cv2.Canny(dst, lowThreshold, lowThreshold * 3, dst, 3)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号