We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Funny text returned on png

I am using the standard .net code to OCR the png files, yet the text that is returned, have funny characters in.
Can you please help with a why?
Also the ocrEngine.Process() take like almost a minute to return, which I feel is extremely slow??

Link to my receipts:

https://drive.google.com/open?id=0B9xHMdrYcVo8UjloZG5lVGtYMlE

                                //// Create an initialize an instance of OcrEngine
                                OcrEngine ocrEngine = new OcrEngine();

                                Aspose.OCR.License license = new Aspose.OCR.License();
                                license.SetLicense("Aspose.OCR.lic");

                                Stream stream = new MemoryStream(rcImage.Image);
                                var sb = new StringBuilder();

                                //If file type is tiff

                                if (new FileInfo(rcImage.Filename).Extension.ToLower() == ".tif")
                                {
                                    // Set the OcrEngine.Image property by loading a multipage TIFF from disk, memory or URL
                                    ocrEngine.Image = ImageStream.FromStream(stream, ImageStreamFormat.Tiff);

                                    // Set OcrEngine.ProcessAllPages to true in order to process all pages of TIFF in single run
                                    ocrEngine.ProcessAllPages = true;

                                    // Call OcrEngine.Process method to perform OCR operation
                                    if (ocrEngine.Process())
                                    {
                                        // Retrieve the list of Pages
                                        Page[] pages = ocrEngine.Pages;

                                        // Iterate over the list of Pages
                                        foreach (Page page in pages)
                                        {
                                            // Display the recognized text from each Page
                                            sb.Append(page.PageText);
                                            sb.Append(Environment.NewLine);
                                            sb.Append("-----------------------------------------------------------------------------------");
                                            sb.Append(Environment.NewLine);
                                        }

                                        rcImage.ImageText = sb.ToString();
                                    }
                                }
                                else if (new FileInfo(rcImage.Filename).Extension.ToLower() == ".jpg")
                                {
                                    //if file type is jpeg
                                    ocrEngine.Image = ImageStream.FromStream(stream, ImageStreamFormat.Jpg);

                                    if (ocrEngine.Process())
                                    {
                                        sb.Append(ocrEngine.Text);
                                        sb.Append(Environment.NewLine);
                                    }
                                    rcImage.ImageText = sb.ToString();
                                }
                                else if (new FileInfo(rcImage.Filename).Extension.ToLower() == ".png")
                                {
                                    //if file type is jpeg
                                    ocrEngine.Image = ImageStream.FromStream(stream, ImageStreamFormat.Png);
                                    ocrEngine.Config.AdjustRotation = AdjustRotationMode.Automatic;
                                    //ocrEngine.Config.AdjustUpsideDownRotation = AdjustUpsideDownRotationMode.None;
                                    ocrEngine.Config.DetectTextRegions = true;
                                    ocrEngine.Config.ProcessColoredBackground = false;
                                    ocrEngine.Config.DetectReadingOrder = true;


                                    if (ocrEngine.Process())
                                    {
                                        sb.Append(ocrEngine.Text);
                                        sb.Append(Environment.NewLine);
                                    }
                                    rcImage.ImageText = sb.ToString();
                                }
                                else
                                {
                                    rcImage.ImageText = "Build in OCR support for file type " + new FileInfo(rcImage.Filename).Extension.ToLower();
                                }

@Gertus,

We have evaluated the shared images. Initial investigation shows that Aspose.OCR is returning text including unwanted data. The issue has been logged into our system with ID OCRNET-3394 for further investigation by our Product team. We’ll update you here once there is some information or a fix version available in this regard.

For reference, we are able to get following text:

----------ww—ww--------------------------
—w- —h-- —ww--------------------------
NEDI fP[wEIN fPHITI}RNITI}CYIITI}fPTEEK
------w-------ww-----------------h--------

8}[/// PLEIN S][[REITITIT
C}[///SIH S}[///LE
P,0 IB0X 2031
C1031}502
ff00RIB}[///NvlLLE 1}5}51
2011I10I16
C.C. 19}9}3I011030I23
TEL:021 9}1611O6 F}[///X:9}1}5 211}5
TIII) r 021 9}161106
Fax : 021 9}1}5211}5
C0Py******C0Py******C0Py******C0Py
--------------w--------------------------
TAX INV0ICE M.}[///.T REG. N0 r A3101A1683
lCMRTANNADA-rkkU-T— -----’—3- ------ -
l. (ln[cl .v}[///T a1A’v,): 6.01
CRC}[///Rff0
lliike: 19};1io:39

A9},A0
*****w2.ioioio ITENIS
C’-’’-`7–ill’iil-,-l±IlL]]TT,l,.ll–,------------

Thank you. I await the new version / feedback. Depending on how this take, would you extend my trail?

@Gertus,

Thank you for writing us back. We will update you accordingly via this forum thread. Furthermore you may post your inquiry related to extension of trail on Aspose.Purchase support forum. A member from Aspose.Purchase support team will guide you accordingly.

Hi, when will the product team provide feedback? My trail have now expired…
I would certainly wish to have faster responses, would I buy the OCR product???

@Gertus,

We have asked our product team to share updates on this issue. We will update you here once there is any information available in this regard.