tfi.py 文件源码

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

项目:tabea_video_project 作者: neilslater 项目源码 文件源码
def circle_mask_blurred( img, radius, sig = 20 ):
    '''Creates a blurred circle, using supplied image as template for dimensions'''
    height, width, ch = img.shape
    centre_y = (height-1) / 2.
    centre_x = (width-1) / 2.
    img_copy = img.copy()
    img_copy[:, :, :] = (0.,0.,0.)
    rr, cc = draw.circle(centre_y, centre_x, radius, img.shape)
    img_copy[rr, cc, :] = (1.,1.,1.)
    img_copy = filters.gaussian(img_copy, sigma=sig, mode='nearest', multichannel=True)
    return img_copy
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号