image_ocr.py 文件源码

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

项目:pCVR 作者: xjtushilei 项目源码 文件源码
def speckle(img):
    severity = np.random.uniform(0, 0.6)
    blur = ndimage.gaussian_filter(np.random.randn(*img.shape) * severity, 1)
    img_speck = (img + blur)
    img_speck[img_speck > 1] = 1
    img_speck[img_speck <= 0] = 0
    return img_speck


# paints the string in a random location the bounding box
# also uses a random font, a slight random rotation,
# and a random amount of speckle noise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号