Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
In this article, you will learn how to build a bare minimum console application for extracting text from an image with with Aspose.OCR for .NET.
source.png
:Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
OcrInput
object:
Aspose.OCR.OcrInput source = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
source.Add("source.png");
Aspose.OCR.OcrOutput results = recognitionEngine.Recognize(source);
Console.WriteLine(results[0].RecognitionText);
Full code:
Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
Aspose.OCR.OcrInput source = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
source.Add("source.png");
Aspose.OCR.OcrOutput results = recognitionEngine.Recognize(source);
Console.WriteLine(results[0].RecognitionText);
Run the program. You will see extracted text in the console output:
Hello, World! I can read this text.
Congratulations! You have extracted the text from the image. Read the Developer reference and API reference for details on developing advanced applications with Aspose.OCR for .NET.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.