Free Support Forum - aspose.com

Inconsistant Results


#1

Hello Aspose,

I am having some issues in getting consistent results from the OCR tool. Attached are some example files both success and failures. The OCR portion of the code I am using is attached as well. Any pointers or required adjustments that you can recommend would be great.
OCR Results

*********************************************************************************

File: Image_Out001
OCR Text: Failure

.,–

CC


.C-`
.:


-:`

C-

…:—
…-S
,-
C—
:,;-

+```````0…,
`EM…,
BA…+



File: Image_Out002
OCR Text: Failure
IAW#
O~M
B

M
AM
P
A…
W:I
[[…,…[…,[.[.[H[[[[[HE[[[[’[’
…-.,.H…,[H[[[H[[H[[[[H[H[[[[```
.,…HE[[`



File: Image_Out003
OCR Text: Failure
X
X
X
,’
,I
X’
X
X
XX
,X
'‘I
X
,II’
,I
X
:I
,;`
X
X
X
X
.Y
XOODR
X
X
X
C
C
X
PDDDN6
C
X
A
'L,DI,
X
.XX
CI
.E
'D…S
.KX
XX
KDOOX



File: Image_Out004
OCR Text: Pass
H

H
H
H

H

H
H

H

XOCR#C200192-20190225#RCOX
H

H
,
H

H

H

H
H



File: Image_Out005
OCR Text: Pass
N
N.A
N N R G R N N
N
N
XOCR#C196092-20190225#RCOX
AN
N
N


OCR Code

string tempFile;
string ocrText;
string ocrValue;
int keyLen = ocrKey.Length;
// Open document

tempFile = workingdirectory + “image_out.jpg”;

OcrEngine ocrEngine = new OcrEngine();
ocrEngine.ClearNotifies();
ocrEngine.Config.ClearRecognitionBlocks();
ocrEngine.Config.DetectTextRegions = false;
ocrEngine.Config.AdjustRotation = AdjustRotationMode.Automatic;

ocrEngine.Image = ImageStream.FromFile(tempFile);

// Process the image
ocrEngine.ClearNotifies();

if (ocrEngine.Process())
{
// Display the recognized text

ocrText = ocrEngine.Text.ToString();
ocrText = ocrText.ToUpper().Trim().Replace(" ",string.Empty);
Console.WriteLine(“OCR Text:” + ocrText);
}

image_out001.jpg (33.7 KB)
image_out002.jpg (32.4 KB)
image_out005.jpg (33.9 KB)
image_out003.jpg (31.0 KB)
image_out004.jpg (33.9 KB)


#2

@fungj

Thank you for contacting support.

We have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID OCR-572 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.