資源簡介
一個簡單的驗證碼生成程序,四位驗證碼,圖片名稱就是標簽
代碼片段和文件信息
#?-*-?coding:?utf-8?-*-?
import?numpy?as?np
import?cv2
import?random
root_path?=?“/home/wang/Desktop/test1/“
for?i?in?range(500):
ra=random.randint(10009999)
text=str(ra)
img?=?np.zeros((601603)?np.uint8)
cv2.rectangle(img?(0?0)?(158?58)?(255?0?0)?5)?????????????????????????????
pts?=?np.array([[10?5]?[20?30]?[70?20]?[50?10]?[50?30]?[70?70]]?np.int32)
pts?=?pts.reshape((-112))
font?=
- 上一篇:python-dbn絕對能調通
- 下一篇:python寫的小型搜索引擎
評論
共有 條評論