DetectAreasMode.TEXT_IN_WILD

When this mode is enabled, Aspose.OCR engine finds individual words on images with sparse text. It is very effective when dealing with the following images:

  • Street photos.
  • Road signs.
  • Signboards.
  • Price tags.
  • Food labels, nutritional information, ingredient lists.
  • Menus.
  • Catalogs.

This algorithm automatically activates detection of the coordinates of image regions containing words. There is no need to use Aspose.OCR.AsposeOcr.DetectRectangles method.

Text-in-wild structure detection algorithm

However, this algorithm is very inefficient when dealing with large amounts of text, such as pages from books and newspaper articles. Try DetectAreasMode.DOCUMENT instead.

Example

The following code sample demonstrates how to use this document areas detection algorithm:

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add an image to OcrInput object
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
input.Add("source.png");
// Set document areas detection mode
Aspose.OCR.RecognitionSettings recognitionSettings = new Aspose.OCR.RecognitionSettings();
recognitionSettings.DetectAreasMode = Aspose.OCR.DetectAreasMode.TEXT_IN_WILD;
// Recognize image
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.Recognize(input, recognitionSettings);
Console.WriteLine(result[0].RecognitionText);

Limitations

The algorithm only works with Latin letters and numbers. You cannot specify the recognition language and provide whitelisted/blacklisted characters.