使用Tesseract OCR进行汉字识别

时间:2013-05-16 07:41:33

标签: iphone ios ocr tesseract

我一直在使用Tesseract 3.0.2 OCR SDK进行图像文本提取。但是,如果我使用中文文本图像并通过OCR,那么Tesseract不会提供中文字符而不是我获得数字和英文字符。但我需要在我正在使用的图像中显示的中文字符。

我怎样才能做到这一点?有什么方法可以获得汉字而不是其他任何字符吗?

1 个答案:

答案 0 :(得分:12)

您需要下载中文训练数据(它将是 chi_sim.traineddata 之类的文件)并将其添加到 tessdata 文件夹中。

下载文件 https://github.com/tesseract-ocr/tessdata/raw/master/chi_sim.traineddata

并像这样使用

Tesseract* tesseract= [[Tesseract alloc] initWithDataPath:@"tessdata" language:@"chi_sim"];

如果您有任何问题,可以从我的tessaract(中文支持)下载我的实验 https://github.com/aryansbtloe/ExperimentWithTesseract.git

我测试过这个......希望你会发现这个很有用。