From banking to booking a flight to the end of the world is just a click away in this digital age. The good old days of pen and paper are behind us and yet can’t completely do away with hand-written materials. Say we need select health insurance coverage and for that, we still need to fill out the form at the doctor’s office. Even for the loans, we need to do the same. All in all, there is still life left for the hand-written materials.
At the end-of-the-day the filled form is going to be digitalised. It is quite evident that stacking the documents is physically cumbersome and out-of-date. Losing critical data due to natural disasters like earthquakes or fire is not ruled out. Everything said and done, digitalisation is cost-effective and all you need is a camera or a scanning machine to make digital copies.
In the digital form new metric changes, the quality and usability of paper data. A photographed document is a rasterised two-dimensional file composed of pixels. The pixelated texts are read by the computers and translated into a plain text string and this way data could be digitally accessed.
Digitalization of analogue data can be done by Optical Character recognition. Images of text can be converted into machine-readable text by OCR. This can be done in two ways:
- Pattern matching.
- Feature Extraction.
On becoming machine-readable, the text is stored independently. Therefore, text can be manipulated, queried and stored in any manner we find appropriate.
Demonstration
Scanned and photographed images can be converted into plain and machine-readable text using two OCR API solutions. Well-known languages like English, Chinese, Dutch, French etc. can be supported. Both services offer customisable fault-tolerance settings (basic, normal, and advanced; these respectively increase the number of API calls consumed per conversion).
Pre-processing an image is the first step by the OCR service to recognise the text. Finally, scanned images are considered under favourable conditions with less pre-processing attention.
The below ready-to-run Java code to structure API calls. \`To achieve this install a free Cloudmersive OCR API client which can be done with Maven. Then add a Jitpack reference in pom.xml:
The next step is to refer to dependency in pom.xml: Otherwise, we can also install Gradle.
Then add a dependency.
After installation, we can concentrate on a larger API call structure. Copy and paste the import to a scanned image followed by calling the function with the API key.
Thank you for your interest in Bahaa Al Zubaidi blogs. For more stories, please stay tuned to www.bahaaalzubaidi.com.