tesseract使用的一些方法-ocr

来源:互联网 发布:安邦 华视网络 编辑:程序博客网 时间:2024/05/22 03:44
tesseract_api.Init("./", "chi_sim", tesseract::OEM_DEFAULT); //当前目录下存放训练好的chi_sim文件

如果左右结构的汉字被识别为两个汉字,这通过设置下面的参数来控制

tesseract_api.SetVariable("enable_new_segsearch", "0");



tesseract_api.SetPageSegMode(tesseract::PSM_SINGLE_BLOCK); //7 = Treat the image as a single text line.   PSM_SINGLE_LINE 

识别的黑名单
tesseract_api.SetVariable("tessedit_char_blacklist", "0123456789{"); 
0 0
原创粉丝点击