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().getBlocksInfo()) { String text = recognizedBlockInfo.getText(); if (recognizedBlockInfo.getBold()) text = String.format("<b>{0}</b>
", text); if (recognizedBlockInfo.getItalic()) text = String.format("<i>{0}</i>
", text); System.out.println(text); }
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getBackgroundColor()
Gets the color of background this part.
|
boolean |
getBold()
Gets the value that indicates whether this part is bold.
|
java.awt.Rectangle |
getBox()
Gets the rectangular area where the text shown in the picture.
|
Rectangle[] |
getCharactersBox() |
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.
|
java.lang.String |
getLanguage()
Gets the language of this part.
|
java.lang.String |
getText()
Gets the text of this part.
|
java.awt.Color |
getTextColor()
Gets a color of text this part.
|
boolean |
getUnderline()
Gets a value that indicates whether this part is underline.
|
java.awt.Color getBackgroundColor()
boolean getBold()
java.awt.Rectangle getBox()
Rectangle[] getCharactersBox()
float[] getCharactersQuality()
FontFamily getFont()
float getFontSize()
boolean getItalic()
java.lang.String getLanguage()
java.lang.String getText()
java.awt.Color getTextColor()
boolean getUnderline()