问题 我可以使用OCR来检测字体样式(粗体,斜体)吗? [关闭]


我有兴趣使用OCR从简单的文本中提取粗体和斜体字。例如,如果我输入带有文本的清晰图像,如下所示:

“快 棕色 狐狸 跳跃 过了  狗。”

我想得到一个像这样的输出:粗体(“棕色”,“跳跃”),斜体(“懒惰”)

我已经考虑过使用OCRopus或Tesseract进行此操作,但是文档很差,我无法判断它是否可行,或者如果它可以如何实现。


1868
2018-03-02 04:17


起源



答案:


Tesseract 3.0.1中有这样的功能,来自trunk。 API中添加了一个新类 - ResultIterator,您有以下感兴趣的功能:

 WordFontAttributes(bool* is_bold,
                    bool* is_italic,
                    bool* is_underlined,
                    bool* is_monospace,
                    bool* is_serif,
                    bool* is_smallcaps,
                    int* pointsize,
                    int* font_id).  

实际上你可以自己看 这里。


10
2018-03-07 11:49



新网址: github.com/tesseract-ocr/tesseract/blob/3.01/api/... - Daniel P


答案:


Tesseract 3.0.1中有这样的功能,来自trunk。 API中添加了一个新类 - ResultIterator,您有以下感兴趣的功能:

 WordFontAttributes(bool* is_bold,
                    bool* is_italic,
                    bool* is_underlined,
                    bool* is_monospace,
                    bool* is_serif,
                    bool* is_smallcaps,
                    int* pointsize,
                    int* font_id).  

实际上你可以自己看 这里。


10
2018-03-07 11:49



新网址: github.com/tesseract-ocr/tesseract/blob/3.01/api/... - Daniel P


Tesseract 3.0x基于XML的hOCR格式包括字符属性。你可能想尝试一下。

http://code.google.com/p/tesseract-ocr/issues/detail?id=377#c5


2
2018-05-14 23:46