public interface IRecognizedTextPartInfo
This interface presents information about each part of the recognized text.
Part of text seems one part, that has all the same characteristics (style, color, etc.). It is divided by the words into parts, if have large text that has the same style.
for (IRecognizedBlockInfo recognizedBlockInfo : ocr.getText().getPartsInfo()) { String text = recognizedBlockInfo.getText(); if (recognizedBlockInfo.getBold()) text = String.format("<b>%s</b>", text); if (recognizedBlockInfo.getItalic()) text = String.format("<i>%s</i>", text); System.out.println(text); }
| Modifier and Type | Method and Description |
|---|---|
Color |
getBackgroundColor()
Gets the color of background this part.
|
boolean |
getBold()
Gets a value that indicates whether this part is bold.
|
Rectangle |
getBox()
Gets the rectangular area where the text shown in the picture.
|
Rectangle[] |
getCharactersBox()
Gets an array of rectangles.
|
float[] |
getCharactersQuality()
Gets an array of values specified for some recognition of this character.
|
FontFamily |
getFont()
Gets the font of this part.
|
float |
getFontSize()
Gets the font size of this part.
|
boolean |
getItalic()
Gets a value that indicates whether this part is italic.
|
String |
getLanguage()
Gets the language of this part.
|
String |
getText()
Gets the text of this part.
|
Color |
getTextColor()
Gets a color of text this part.
|
boolean |
getUnderline()
Gets a value that indicates whether this part is underline.
|
Color getBackgroundColor()
boolean getBold()
true if this part is bold.Rectangle getBox()
Rectangle[] getCharactersBox()
getText() (how many letters in part).
Each rectangle indicates the area of character.
Coordinates starts with the upper left corner of the picture.float[] getCharactersQuality()
getText() (how many letters in part).
Each array element can be from 0.0 to 1.0 inclusive.
Value 0.0 means that the poorly recognized, 1.0 means that perfectly recognized.FontFamily getFont()
float getFontSize()
boolean getItalic()
true if this part is italic.String getLanguage()
String getText()
Color getTextColor()
boolean getUnderline()
true if this part is underlined.Copyright © 2014. All rights reserved.