Skip to main content

点阵字库

from ascript.android.screen import OcrX

对特殊图像,做点阵字库. 从而进行识别,该方法不支持全分辨率

查找文字

给定字库,从字库中识别文字

  • 函数
OcrX.find_all(font_lib: str, rect: list = None, region=0.9):
  • 参数
参数类型是否必填说明
font_libstr字库文件
rectlist识别范围
regionfloat识别精度 0-1之间, 默认0.9=90%精度
  • 返回值

返回值为 识别到的文字, 类型为str

from ascript.android.system import R
from ascript.android.screen import OcrX
res = OcrX.find_all(R.res("font.t"),rect=[90,529,343,612])
print(res[0])

如何制作字库?

制作字库用到了图色工具中的点阵识字