OCR implementation in Android

Author - 26 February 2018 - 12 Mins
Author - 26 February 2018 - 12 Mins
Optical character recognition, Optical character reader or OCR is the process of reading printed or handwritten text and converting them into machine-encoded text. OCR is mainly used in the field of artificial intelligence, pattern recognition, and computer vision.
So how does it work? In simple words, for a computer, an image is nothing but a collection of pixels. In OCR processing, the image is scanned for light and dark areas to identify each character.
Emanuel Goldberg, an Israeli physicist and inventor developed a machine in 1914 that could read characters and convert them into standard telegraph code. Concurrently, in 1913, Edmund Fournier d’Albe invented the optophone. It was used mainly by the blind to scan text. It produces time-varying chords of tones to identify a letter. That was the beginning of OCR. With the advent of computer and internet, OCR is now available for free through different products like Adobe Acrobat, Google Drive etc.
OCR is used in places like:
In this blog, we will learn how to implement OCR in Android applications. To implement it, we will use Mobile Vision Text API that provides an easy way to integrate OCR on almost all Android devices.
We have previously explored how Face Detection works (check details here ). Text Detection is similar to face detection. You can pull the code from Github directly (link) and run it using android studio.
We have one SurfaceView to show the camera view and one TextView to show the detected text.
You will get an output similar to the following image after executing the project:
Using Google mobile vision API, we can easily integrate face detection, text detection or bar code detection on any Android device. Not only on Android, for iOS devices also Google has introduced the same features. If you want to learn more about Mobile vision API, you can check reference doc here.
"I have the same question. How to fetch different information from business card?".
"is it possible for hindi text?".
"This is just for identifying text. What about scanning a BusinessCard ? And How to fetch different information from that business card like : name, company, contact number etc. ?".
"I am doing a project of Text Recognition from image can i get help from here... my app can to extrat the text after snapinh the image.".