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
BM
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
HH
H
HH
H
HH
XOCR#C200192-20190225#RCOX
HH
,
HH
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 documenttempFile = 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 textocrText = 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)