OCR Integration for Mobile web application

Hi,

We are developing mobile web application and required OCR integration for card. There is no issue looking using your api to get texts from image. Main question is how we will scan image from our interface of mobile application? there is any suggestion or direction.

Thanks,
Shhabaz

Hi,

Thank you for considering Aspose products.

Aspose.OCR for .NET requires images to be present on disk in order to perform OCR operations on them. Currently we do not support reading images from remote location, therefore it is required that your images (to be scanned) should be present in the mobile phone. It is your choice to load existing images or newly shot images using the mobile camera. Once the images are in place, it is your own custom business logic to load them for further processing either through file path or memory stream. Below provided is simple C# source code to load an image from disk and perform OCR on it. You can suerly customize the code according to your scenario.

C#
// Image document on which OCR is to be performed string imageFile = (MyDir + "sample.jpg");
// Initialize OcrEngine OcrEngine ocr = new OcrEngine();
// Configure to use Default Dictionaries ocr.Config.UseDefaultDictionaries = true;
// Load image file ocr.Image = ImageStream.FromFile(imageFile);
// Add language ocr.Languages.AddLanguage(Language.Load("english"));

// OutPut file to store results TextWriter outPut = new StreamWriter(MyDir+"output1.txt");
// Load the resource file using (ocr.Resource = new FileStream(resourceFileName, FileMode.Open)) { try { // Process the whole image if (ocr.Process()) { outPut.WriteLine(ocr.Text);
} } catch (Exception ex) { // Capture Exception } outPut.Close(); }

I would request you to please share more details about your project, such as;

  • How are you planning to use Aspose.OCR API in your application?
  • What technologies are you planning to use?

This will help me understand your exact needs and scenario, and then I will be in a better position to provide assistance with your project or can suggest any alternative solutions.