图像文本检测的标注工具
Images are a great way to communicate without text but oftentimes images are used/abused to spread text within social media and advertisements. Text in images also presents an accessibility issue. The truth is that it's important, for any number of reasons, to be able to detect text in image files. The amazing open source tool that makes detecting text in images possible is tesseract OCR!
图像是不使用文本进行交流的一种好方法,但是通常会使用/滥用图像在社交媒体和广告中传播文本。 图像中的文本也存在可访问性问题。 事实是,出于多种原因,能够检测图像文件中的文本很重要。 tesseract OCR是一个令人惊叹的开源工具,它可以检测图像中的文本!
I recommend using Homebrew to install tesseract:
我建议使用Homebrew安装tesseract:
brew install tesseract
To run tesseract to read text from an image, you can run the following from command line:
要运行tesseract以读取图像中的文本,可以从命令行运行以下命令:
tesseract ~/Downloads/MyImage.png ~/Downloads/MyImage.txt -l eng
tesseract ~/Downloads/MyImage.png ~/Downloads/MyImage.txt -l eng
The command above extracts detected text in the English language (-l eng
) into a text file (MyImage.txt
). The process is very quick and there are dozens of supported languages.
上面的命令将检测到的英语( -l eng
)文本提取到文本文件( MyImage.txt
)中。 该过程非常快速,并且支持数十种语言。
Let's look at the following example:
让我们看下面的例子:
![](https://i-blog.csdnimg.cn/blog_migrate/d90df18d7eecb8afd88dacdf1a710e01.png)
The following text is detected:
检测到以下文本:
International
‘Champions
Cup
~- TOUR SQUAD
#AFCTour2018
CECH MUSTAFI GUENDOUZI oziL
LENO SOKRATIS NELSON IWOBI
MARTINEZ MAVROPANOS SMITHROWE = NKETIAH
BELLERIN OSEI-TUTU WILLOCK PEREZ
KOLASINAC ELNENY RAMSEY LACAZETTE
CHAMBERS MAITLAND-NILES MKHITARYAN AUBAMEYANG
HOLDING
There are a number of utilities in different programming languages that plug into tesseract's functionality, but it's important to know the underlying tool! tesseract is an unbelievable tool that you should take advantage of if you need an open source utility for detecting text in an image!
tesseract的功能中插入了许多使用不同编程语言的实用程序,但是了解基础工具很重要! 如果您需要一个开源实用程序来检测图像中的文本,那么tesseract是一个令人难以置信的工具,您应该利用它!
图像文本检测的标注工具