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

Free Support Forum - aspose.com

Aspose OCR for .NET not correctly reading text

Hello. I have challenges getting aspose OCR for .net to correctly read text from my images other than the sample provided by your website.

When I try to read text from images I get incorrect text returned.

Hi Ralph,

Thank you for considering Aspose APIs.

We are sorry to know that you are having difficulties with Aspose.OCR for .NET API. First of all, please note that the images (to be processed) should have better resolution. Recommended resolution is 300 DPI or more. Secondly, not all fonts are supported at the moment. The supported font families are as follow.

  • Ariel
  • Times New Roman
  • Tahoma
  • Calibri
  • Verdana
  • Courier New

We are hoping you could share a few problematic sample images so we may evaluate the problem cause on our end, and log appropriate tickets (if required).

The images I am mostly interested in using aspose ocr for .net are cheque images.

I have attached a few samples of cheque images of interest here.

Please help address this challenge as this is critical to the reason I purchased aspose in the first place.

Looking forward to hearing from you in the soonest possible time.



Hi Ralph,

Thank you for providing the sample image.

Unfortunately, the current implementation of Aspose.OCR API was unable to return any meaningful information from your provided sample. One of the main reason is that the most text on the sample image is handwriting, that isn’t supported at the moment. We already have the said feature (recognition of handwriting) on our road map of Aspose.OCR APIs and we are currently analyzing the feasibility of it.

Could you please let us know what part of the image is of most importance to your requirement so we could log appropriate ticket(s) in that reference?

Dear Support,

As I have earlier mentioned, we are mostly interested in the security number at the top left of the cheque image. We may also choose to read any of the printed characters on the cheque, including the MICR line.

I still await your favorable response of our challenge of not being able to correctly read text from our images.


Ralph J. Brayila

Hi Ralph,

As discussed on your [this code snippet](https://forum.aspose.com/t/15880#579238). Moreover, we have tested the ticket (OCR-33873) against the release candidate that is scheduled for the next month, and we are glad to announce that the upcoming build can correctly recognize the number (10413059) on [frontImage2I1BYYYLH.jpg](https://forum.aspose.com/t/15880). If you are having issues with any of the samples or wish to read other printed part of the images then please provide the samples here while highlighting the areas of interest using any of the imaging/drawing tool such as MS Paint. We will review them on our end to provide you an appropriate solution.

Hi Ralph,

Thank you for your patience with us.

We have just published Aspose.OCR for .NET 2.1.0 that contains the fix for the ticket OCR-33873. Please use the following code snippet against the sample [frontImage2I1BYYYLH.jpg](https://forum.aspose.com/t/15880) to verify the fix.

C# Code:

// Resource file
const string resourceFileName = "Aspose.OCR.Resources.zip";
// Source file: the file on which OCR will be performed
string imageFile = "frontImage2I1BYYYLH.jpg";
Console.WriteLine("Performing OCR…");

// Initialize OcrEngine
OcrEngine ocr = new OcrEngine();
// Set the image
ocr.Image = ImageStream.FromFile(imageFile);
// Add language

// Clear recognition blocks

// Add rectangle block to user defined recognition blocks
ocr.Config.AddRecognitionBlock(RecognitionBlock.CreateTextBlock(10, 10, 1352, 50));

// Specify if background is complex
ocr.Config.ProcessColoredBackground = true;

// Ignore everything else on the image other than the user defined recognition blocks
ocr.Config.DetectTextRegions = false;

// Load the resource file
using (ocr.Resource = new FileStream(resourceFileName, FileMode.Open))
        // Process the custom block on the image
        if (ocr.Process())
            // Get the recognized text found from the custom block
            Console.WriteLine("Text recognized: " + ocr.Text);
    catch (Exception ex)
        Console.WriteLine("Exception: " + ex.Message);

Moreover, you can use the same code against all of your samples. In case you face any difficulty, please provide us the sample image so we could provide the custom code snippet for that particular case.

Regarding the MICR line as stated in this (Aspose OCR for .NET not correctly reading text) post, please highlight the area of interest and provide the sample here so we could devise a solution to recognize that area as well.

The issues you have found earlier (filed as OCR-33873) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.