Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Vision - Numbers and Numerals OCR

I've been trying to implement an OCR program with Python that reads numbers with a specific format, XXX-XXX. I used Google's Cloud Vision API Text Recognition, but the results were unreliable. Out of 30 high-contrast 1280 x 1024 bmp images, only a handful resulted in the correct output, or at least included the correct output in the results. The program tends to omit some numbers, output in non-English languages or sneak in a few special characters.

The goal is to at least output the correct numbers consecutively, doesn't matter if the results are sprinkled with other junk. Is there a way to help the program recognize numbers better, for example limit the results to a specific format, or to numbers only?

like image 717
NigelJL Avatar asked Sep 16 '16 22:09

NigelJL


People also ask

What is Google Cloud OCR?

Optical Character Recognition (OCR) TEXT_DETECTION detects and extracts text from any image. For example, a photograph might contain a street sign or traffic sign. The JSON includes the entire extracted string, as well as individual words, and their bounding boxes.

Is Google Vision API free?

Pricing is tiered - the first 1000 units used each month are free, units 1001 to 5,000,000 are priced as marked, etc. If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

Can Google Vision API detect handwriting?

Handwriting detection with Optical Character Recognition (OCR) The Vision API can detect and extract text from images: DOCUMENT_TEXT_DETECTION extracts text from an image (or file); the response is optimized for dense text and documents. The JSON includes page, block, paragraph, word, and break information.


1 Answers

I am unable to tell you why this works, perhaps it has to do with how the language is read, o vs 0, l vs 1, etc. But whenever I use OCR and I am specifically looking for numbers, I have read to set the detection language to "Korean". It works exceptionally well for me and has influenced the accuracy greatly.

like image 66
Jake Braden Avatar answered Oct 31 '22 21:10

Jake Braden