motion.py 文件源码

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

项目:pygta5 作者: Sentdex 项目源码 文件源码
def motion_detection(t_minus, t_now, t_plus):
    delta_view = delta_images(t_minus, t_now, t_plus)
    retval, delta_view = cv2.threshold(delta_view, 16, 255, 3)
    cv2.normalize(delta_view, delta_view, 0, 255, cv2.NORM_MINMAX)
    img_count_view = cv2.cvtColor(delta_view, cv2.COLOR_RGB2GRAY)
    delta_count = cv2.countNonZero(img_count_view)
    dst = cv2.addWeighted(screen,1.0, delta_view,0.6,0)
    delta_count_last = delta_count
    return delta_count
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号