iPhone 上的 Tesseract 训练
我在我的一个应用程序中使用 Tesseract,但无法获得完美的结果。当我在完美的屏幕截图上使用该库时,它会获取大部分文本,这很好。但是,当我在照片上使用它时,它很难解决,有时甚至不会返回任何内容。
我知道你可以训练 Tesseract,有没有好的训练教程或者 iPhone 照片识别的东西?或者在处理源图像之前我应该对其进行任何修改吗?
谢谢!
I'm using Tesseract in one of my applications, and I'm having trouble obtaining perfect results. When I use the library on a perfect screenshot, it gets most of the text and that's fine. But when I use it on a photo for example, it has trouble working it out, and sometimes it won't even return anything.
I know you can train Tesseract, is there a good training tutorial or something for iPhone photo recognition? Or are there any modifications I should make to my source image before processing it?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发布示例图片。以下是一些需要注意的事项:
如何将图像变为 1 位?最终 OCR 是在黑白图像中完成的——也许你可以比图书馆做得更好。
图像的 DPI 是多少?扫描通常约为 200-300 DPI,但照片可以为 72 或 96。OCR 引擎通过查看 DPI 来了解字母的大小。您可能需要更改 DPI 并对图像重新采样(调整大小),以便 DPI 符合预期。 OCR 引擎需要扫描文档,而不是照片。
Post a sample pic. Here are some things to look at:
How are you getting the image to 1-bit? Ultimately OCR is done in B/W images -- perhaps you can do a better job than the library.
What is the DPI of the image? Scans usually are around 200-300 DPI, but photos can be 72 or 96. OCR engines look at DPI to get a sense of the size of the letters. You might need to change the DPI and resample (resize) the image so that the DPI matches expectations. OCR engines are expecting scanned documents, not photographs.