detection.py 文件源码

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

项目:BlurDetection2 作者: WillBrennan 项目源码 文件源码
def estimate_blur(image, threshold=100):
    if image.ndim == 3:
        image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)

    blur_map = cv2.Laplacian(image, cv2.CV_64F)
    score = numpy.var(blur_map)
    return blur_map, score, bool(score < threshold)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号