简体   繁体   中英

Is there a way to have azure's form recognizer OCR vertically?

I am working with Azure's form recognizer service to OCR some factory blueprints. Some of the text in these blueprints are printed vertically, but Azure seems to only do OCR horizontally. However, in their Form recognizer studio the engine is actually OCRing vertically as well, but even when I use their code this does not seem to work for me.

Has anyone here had similar issues, and what did they do about this problem? I am essentially looking for some option I can give to the engine to OCR vertical (or any directional) text.

Form Recognizer supports vertical text also. Are you using the same API version in the Studio and in your code?

The issue ended up being on my end: I was visualizing and checking the OCR results using the Graphics.DrawRectangle method. This method takes the top-left coordinate of the rectangle and the width and height to draw it, and so I was giving it the first coordinate of the OCR response, and calculating the width and height using the third coordinate. This works for the horizontal text, but for vertical text, the first coordinate is in the bottom left. This means that the second point is actually higher (so a lower value) than the first point, and as such my calculation of the height resulted in a negative height, hence no rectangle was being drawn. So, Azure was finding vertical text, I was just not displaying it properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM