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 detect_rectangles() 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:

# Instantiate Aspose.OCR API
api = AsposeOcr()
# Add image to the recognition batch
input = OcrInput(InputType.SINGLE_IMAGE)
input.add("source.png")
# Set document areas detection mode
recognitionSettings = RecognitionSettings()
recognitionSettings.detect_areas_mode = DetectAreasMode.TEXT_IN_WILD
# Recognize the image
result = api.recognize(input, recognitionSettings)
# Print recognition result
print(result[0].recognition_text)

Limitations