Using Azure OCR, some of the text is considered part of a table instead of on the same line but separated by large spaces. Can the tables be disabled ?

Michal Muller 21 Reputation points
2021-05-31T17:56:03.727+00:00

I'm using the endpoint https://test-ocr-mike.cognitiveservices.azure.com/ and supplying an image that is all text with the exception of a logo.

In the body of the image the data seems to be apparently visually separated by columns, no column lines are used.
However, the data is not meant to be a table, only that the separation has large spaces between the Label and the Value that is meant to be on the same line.

Before I go and write my own "line reconstruction" routines based upon y-axis values that are <= ~3 pixels, I'm hoping that there is a way to disable the table-ization of the data as opposed to recognizing that it is all on the same line ?

thank you.

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
345 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 43,691 Reputation points Microsoft Employee
    2021-06-01T07:30:07.437+00:00

    @Michal Muller The OCR API does not have a parameter to pass to ignore values from the result. The only option available is to detect orientation.
    The result also depends on the image, It would easy to provide advice if the image could be shared?

    I would also suggest to try the read API which is much more accurate in reading any printed or handwritten text in images which runs asynchronously. So, the result needs to be retrieved using the operation id of the actual read call. With this sample image the response seems to detect lines with accuracy which seems to be on expected lines as per image. I hope this helps.


0 additional answers

Sort by: Most helpful