使用Tesseract OCR进行汉字识别

Nis*_*agi 11 iphone ocr tesseract ios

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

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

Alo*_*ngh 14

您需要下载中文训练数据(它将是一个像chi_sim.traineddata这样的文件)并将其添加到您的tessdata文件夹中.

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

并使用这样的

Tesseract* tesseract= [[Tesseract alloc] initWithDataPath:@"tessdata" language:@"chi_sim"];
Run Code Online (Sandbox Code Playgroud)

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

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