Image Text Finder за .NET

Въведение в Image Text Finder за .NET

Image Text Finder за .NET е плъгин, който позволява на разработчиците да извличат текст от изображенията в техните приложения.

Поддържани файлови формати

Image Text Finder за .NET поддържа следните формати на файлове за изображения:

  • БМП
  • JPEG
  • ПНК
  • ГИФ
  • Тиф

Можете да търсите текст в тези файлове с изображения, като използвате API на плагина.

Намерете текст в снимки

To extract text from an image, you need to create an instance of the AsposeOcr class and call the ImageHasText method. Here is an example:

using Aspose.OCR;

AsposeOcr recognitionEngine = new AsposeOcr();
bool isFound = recognitionEngine.ImageHasText("sample1.png", "Aspose");       

In this example, we open a file stream to the image file and pass it to the ImageHasText method. The method returns if the text was found or not.

Намерете неанглийски текст в снимки

To extract non-English text from an image, you need to create an instance of the ImageTextFinder class and call the ExtractText method. Here is an example:

using Aspose.OCR;

AsposeOcr recognitionEngine = new AsposeOcr();
RecognitionSettings settings = new RecognitionSettings(Language.Ara);
bool isFound = recognitionEngine.ImageHasText("sample1.png", "Aspose", settings);       

In this example, we open a file stream to the image file and pass it to the ImageHasText method. The method returns if the text was found or not.

Най-добрите практики

Ето някои от най-добрите практики за използване на Image Text Finder за .NET:

  • Уверете се, че файла на изображението е в поддържан формат.
  • Използвайте правилните езикови настройки за текста на изображението.
  • Експеримент с различни размери на шрифта, за да се подобри точността на екстракцията.
  • Управлявайте грешките и изключенията правилно, за да гарантирате солидно поведение при прилагане.
 Български