AWS Textract detecting lines not blocks

Viewed 260

I am currently using Amplify Framework for Android and its prediction plugin, which is basically AWS Textract, to convert images to text.

Previously, I was using Firebase text recognition feature which was dividing the text into blocks and into lines and words inside each one.
Textract, on the other hand, divides text only into lines.

Lines in AWS Textract vs blocks in Firebase OCR

Images that I use are often screenshots and they often contain more than just one column of text. Because now I get only lines, I don't know how to divide my text into blocks.

Is there a way to configure the Textract to divide text first into blocks? Or is there a way to divide it accurately manually?

1 Answers

Unfortunately, Textract doesn't provide a blocking of sections/paragraphs feature.

Textract text detection returns 3 main objects: Pages, Line Blocks, and Word Blocks [1].

Included in JSON response object for Line/Word blocks is a Geometry object which defines a Bounding Box and Polygon [2]. In order to achieve your desired results, with Textract response data, you would have to further process the Line Blocks based on their Geometry data group them as you see fit.

Related