Tesseract识别指定字符范围的字符

通过配置Emgu.CV.OCR.Tesseract的Tesseract对象,可以设置白名单参数"tessedit_char_whitelist"来限制Tesseract仅识别特定字符,如数字或字母,从而提高识别准确率。例如,设置"tessedit_char_whitelist"为"0123456789"可只识别数字,将它改为"abcdefghijklmnopqrstuvwxyz"则仅识别字母。
摘要由CSDN通过智能技术生成

可以通过配置Tesseract来使用Tesseract进行OCR,opencv和opencv的C#版本Emgu都集成了Tesseract这个工具。

但是在使用时经常会出现误判,比如把“s”识别成“5”,把“1”识别成“l”或“i”。可以设置相应的参数来识别指定范围的字符。


下面是Emgu中关于这个函数的API文档:

Emgu.CV.OCR.Tesseract.Tesseract(string, string, Emgu.CV.OCR.Tesseract.OcrEngineMode, string)

public Tesseract(string dataPath, string language, Emgu.CV.OCR.Tesseract.OcrEngineMode mode, string whiteList)
    Member of Emgu.CV.OCR.Tesseract

Summary:
Create an tesseract OCR engine.

Parameters:
dataPath: The datapath must be the name of the parent directory of tessdata and must end in / . Any name after the last / will be stripped.
language: The language is (usually) an ISO 639-3 string or NULL will default to eng.  It is entirely safe (and eventually will be efficient too) to call Init multiple times on the same instance to change language, or just to reset the classifier.  The language may be a st

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值