patterns.py 文件源码

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

项目:imgProcessor 作者: radjkarl 项目源码 文件源码
def patText(s0):
    '''make text pattern'''
    arr = np.zeros((s0,s0), dtype=np.uint8)
    s = int(round(s0/100.))
    p1 = 0
    pp1 = int(round(s0/10.))
    for pos0 in np.linspace(0,s0,10):
        cv2.putText(arr, 'helloworld', (p1,int(round(pos0))), 
                    cv2.FONT_HERSHEY_COMPLEX_SMALL, fontScale=s,
                    color=255, thickness=s,
                    lineType=cv2.LINE_AA )
        if p1:
            p1 = 0
        else:
            p1 = pp1
    return arr.astype(float)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号