Hi,
I am trying to OCR an jpeg yet the text coming back only have 3 text characters. Its a receipt form a shop.
I have used the sample ocr .net application provided. How can I get the image to you guys?
Regards
Gert
Hi,
I am trying to OCR an jpeg yet the text coming back only have 3 text characters. Its a receipt form a shop.
I have used the sample ocr .net application provided. How can I get the image to you guys?
Regards
Gert
debonairs.JPG (2.2 MB)
Code used:
// The path to the documents directory.
//string dataDir = RunExamples.GetDataDir_OCR() + “SampleTiff.tiff”;
//// Create an initialize an instance of OcrEngine
OcrEngine engine = new OcrEngine();
Stream stream = new MemoryStream(rcImage.Image);
// Set the OcrEngine.Image property by loading a multipage TIFF from disk, memory or URL
engine.Image = ImageStream.FromStream(stream, ImageStreamFormat.Jpg);
// Set OcrEngine.ProcessAllPages to true in order to process all pages of TIFF in single run
engine.ProcessAllPages = true;
// Call OcrEngine.Process method to perform OCR operation
if (engine.Process())
{
// Retrieve the list of Pages
Page[] pages = engine.Pages;
// Iterate over the list of Pages
foreach (Page page in pages)
{
// Display the recognized text from each Page
Console.WriteLine(page.PageText);
}
}
The sample code that you have shared is used to process TIFF file having multiple frames. Furthermore we have evaluated the sample input image that you have shared. The image contains colored background. After trimming the image, we are able to obtain results. Sample code snippet is given below and trimmed image is attached for your reference.
CODE:
var sb = new StringBuilder();
OcrEngine ocrEngine = new OcrEngine();
ocrEngine.Image = ImageStream.FromFile(@"debonairs.JPG");
if (ocrEngine.Process())
{
sb.Append(ocrEngine.Text);
sb.Append(Environment.NewLine);
}
Console.WriteLine(sb);
OUTPUT:
DLIrbanville
Debonairs
Tel: 021 975 50861718
lnuaice #: 434758
Vat #: 472()168394
Laingsburg Sentra (Pty) Ltd
16 B; Wellington Road
Durbarlville. 7551
Dellvery Order # 37
Date: 4 Oct 2017
Off Code: 37/Patience//69,90
CasIaier ,` PIaatela. Patience
Time : 15:26
acdy] it- –
1 std piz soMETHlNG MEATY plZZA R 69,90
& CIaarge –
ToTAL R 69,9o
Totd Excl vAT R 61 .32
vATlrycluded R8,58
DITIIvITry order # 37
debonairs.JPG (1.0 MB)
Great thank you. Is there anyway to get a 30 day trail to get access to the full text result?
We are building a proof of concept for a project we are pitching for and I need to access if we can get hold of the relevant text on all the different documents that can be uploaded into the proposed system.
Gertus
Thank you for writing us back. You can get 30 days temporary license to evaluate our product without any limitation. Please follow the link given below to get temporary license.
Please feel free to contact us for any further assistance.