Free Support Forum - aspose.com

iMAGE TO TEXT

Hi, I need to convert image to text, I want to use your OCR for web,

I'm using your demo code but I’m getting wrong convert (the image contain english words and number in word doc format),

if the convert will work fine I'll purchase the licence,i attached my image.


The code:

OcrEngine ocrEngine = new OcrEngine();

ocrEngine.ClearNotifies();

ocrEngine.Config.ClearRecognitionBlocks();

ocrEngine.Config.DetectTextRegions = false;

string dataDir = @"C:\Users\rhagoel\Desktop\VS\Aspose_OCR_NETv2\Aspose_OCR_NETv2\Data\";

ocrEngine.Image = ImageStream.FromFile(dataDir + "img1.png");

if (ocrEngine.Process())

{

string resultat = ocrEngine.Text.ToString();

Response.Write( resultat);

}

Hi Roy,

Thank you for your inquiry.

We have evaluated the above said scenario on our end using the code snippet provided by you. We have used the latest version of Aspose.OCR for .Net 2.7.0. While testing it was found that the image provided by you has very low DPI value i.e. 96. It is recommended that 300 DPI should be used. Moreover, there are characters that are not English alphabetic.

There four different languages currently supported. Please follow the link for details about working with different languages.

Hope the above information helps. In case of any issues, need further clearance please be sure to let us know, we will be glad to assist you.

hi,

i’m interesting only in the English text language, regarding the low DPI , i check online OCR convert in the web and they convert that image right ,can you advise why?

Hi Roy,


I am afraid, it is the limitation of the Aspose.OCR APIs that it cannot perform well for low resolution images. Please note, the current implementation of the Aspose.OCR APIs work well with images having resolution of at least 300 DPI and the accuracy rate tends to decrease by decreasing the resolution. Your provided image has resolution of 96 DPI therefore it will not be possible to get 100% accuracy if you wish to scan the complete image. However, if you intend to get some specific contents from a portion of the image, you can use the custom recognition blocks to get better accuracy. Please note, the presented solution is useful in scenario when you have documents following the similar structure, that is; the contents to be scanned are always on the same location for each image.