简体   繁体   English

检测Tesseract OCR Java实现的大小字体大小

[英]Detect Large and Small font sizes of Tesseract OCR Java implementation

Is it possible to OCR a picture and identify different sizes of fonts in the picture using Tesseract OCR. 是否有可能到OCR图片,并使用超正方体OCR 识别画面字体大小不同。 If yes, do I need to use any other 3rd party library or can I use pure Java. 如果是,我是否需要使用任何其他第三方库,或者我可以使用纯Java。 For an example, 举个例子,

I want to detect the headline and the content of a newspaper by using the font size. 我想通过使用字体大小来检测报纸的标题和内容。

Any help regarding this matter would be appreciated. 任何有关此事的帮助将不胜感激。

您可以使用ResultIterator.WordFontAttributes API方法( 使用Tess4J在Java中的示例 )来检索已识别文本的字体信息,包括字体名称和大小。

Tesseract的hOCR输出包括可用于确定大小的行和单词的边界框,并且可以通过打开hocr_font_info配置变量将其配置为还包括输出中字体的hocr_font_info值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM