Dear Supporters.
I set text with some following attributes like the attachment:
font : Times New Roman
fontsize : 48
isItalic : false
isUnderline: false
isBold : false
color: red
However the result is not my expectation:
Text : l23456789
isItalic : true
isUnderline : false
isBold : false
Text Color : java.awt.Color[r=0,g=0,b=0]
Quality : [F@5b21409a
Font size : 0.0
Here is my code
//Initialize an instance of OcrEngine
OcrEngine ocrEngine = new OcrEngine();
//Set the Image property by loading the image from file path location
ocrEngine.setImage(ImageStream.fromFile(trainingImageDir+"test.jpg"));
//Process the image
if (ocrEngine.process())
{
//Display the recognized text
System.out.println("Text : " + ocrEngine.getText());
IRecognizedPartInfo[] text = ocrEngine.getText().getPartsInfo();
//Iterate over the text parts
for (int i = 0; i < text.length; i++)
{
IRecognizedTextPartInfo symbol = (IRecognizedTextPartInfo) text[i];
// Display part information
System.out.println("isItalic : " + symbol.getItalic());
System.out.println("isUnderline : " + symbol.getUnderline());
System.out.println("isBold : " + symbol.getBold());
System.out.println("Text Color : " + symbol.getTextColor());
System.out.println("Quality : " + symbol.getCharactersQuality());
System.out.println("Font size : " + symbol.getFontSize());
}
}
Please help me to solve this problem.
Thank you