本文介绍了如何使用 openCV 或 OCR tesseract 从图像中提取文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能的重复:
安卓 OCR?
我目前正在基于 Android 手机中的图像捕获进行文本识别项目.我想问一下如何从图片中提取文字?
i'm currently doing a project on text recognition based on a image capture in android phone. I want to ask how the text can be extracted from image?
是否有任何用于提取的 openCV 或 OCR tesseract 教程?
Does have any openCV or OCR tesseract tutorial for extracting ?
推荐答案
最快的方法(可能不是理想的)是实现以下步骤:
The fastest way (maybe not the ideal) is to implement the following steps:
- 使用 OpenCV 来检测纸张 或文本区域;
- 执行任何必要的处理校正图像(如有必要);
- 将图像以 TIFF 格式保存到磁盘;
- 最后,调用 Tesseract cmd-line 应用程序,将 TIFF 图像作为参数传递以启动文本识别过程.
- Use OpenCV to detect the paper sheet or the text area;
- Perform any processing necessary to deskew the image (if necessary);
- Save the image to disk as TIFF;
- and finally, call Tesseract cmd-line application passing the TIFF image as parameter to start the text recognition process.
这篇关于如何使用 openCV 或 OCR tesseract 从图像中提取文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!