Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
570 views
in Technique[技术] by (71.8m points)

objective c - Using OpenCV, how can I detect text orientation before performing OCR?

I'm using OpenCV within an iOS application. I'd like to perform OCR on some text, but I first need to determine its orientation.

How do I do that in OpenCV?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I am not sure that one can reply to the question without providing OCR in Objective-C - something that can hardly be done in a few lines of text without using an OCR library.

Well, 20 years ago, I wrote an OCR system (without using any OCR library) to read bank checks in real-time. It was also authentifying hand-written signatures by the way.

The problem of checking the orientation was pregnant because checks could be inserted randomly (by human operators) in the small motorized bank-check scanner.

Since all banks were using different page layouts and decorations, the only way to find the orientation without relying on magnetic ink (that the scanner did not detect) was to actually attempt an OCR recognition on the first characters found at the top of the 'page'.

Some charcters are ambiguous like an 'O' but most others will tell you if the picture is inverted or mirrored so just reading the first 3-5 charcters will do the job (unless you have repetitions).

Good luck!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...