Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Is the order of the extracted text via vision API always same?

Hi there,

I'm trying to extract medical data from medical image files by using Vision API(OCR).

I can get lists of texts from the image files.

And if the layout of the image files are same(the position of each text are same on the image),

it seems that the texts always have the same relative order in the list.

Is this understanding correct?  

0 1 542
1 REPLY 1

It is not mentioned that the API will always honor the order of text given the same document layout, therefore it wouldn’t be guaranteed. A reliable approach for your use case would be using Document AI instead. This service is specialized for parsing documents using a variety of methods (including OCR).

For forms specially, there is a custom processor that recognizes form data (fields and their responses, layout positions, sections, etc). This data would be returned as JSON, and can then be parsed appropriately by your application. 

A sample form file and the resulting response can be seen for the form processor and other available document processors.