Assignment 2 MLDS Lab
Assignment 2 MLDS Lab
OCR importants
Most business workflows involve receiving information from print media. Paper forms,
invoices, scanned legal documents, and printed contracts are all part of business processes.
These large volumes of paperwork take a lot of time and space to store and manage. Though
paperless document management is the way to go, scanning the document into an image creates
challenges. The process requires manual intervention and can be tedious and slow.
Moreover, digitizing this document content creates image files with the text hidden within it.
Text in images cannot be processed by word processing software in the same way as text
documents. OCR technology solves the problem by converting text images into text data that
can be analyzed by other business software. You can then use the data to conduct analytics,
streamline operations, automate processes, and improve productivity.
OCR work
The OCR engine or OCR software works by using the following steps:
Image acquisition
A scanner reads documents and converts them to binary data. The OCR software analyzes the
scanned image and classifies the light areas as background and the dark areas as text.
Preprocessing
The OCR software first cleans the image and removes errors to prepare it for reading. These
are some of its cleaning techniques:
Deskewing or tilting the scanned document slightly to fix alignment issues during the
scan.
Despeckling or removing any digital image spots or smoothing the edges of text images.
Cleaning up boxes and lines in the image.
Script recognition for multi-language OCR technology
Text recognition
The two main types of OCR algorithms or software processes that an OCR software uses for
text recognition are called pattern matching and feature extraction.
Pattern matching
Pattern matching works by isolating a character image, called a glyph, and comparing it with a
similarly stored glyph. Pattern recognition works only if the stored glyph has a similar font and
scale to the input glyph. This method works well with scanned images of documents that have
been typed in a known font.
Feature extraction
Feature extraction breaks down or decomposes the glyphs into features such as lines, closed
loops, line direction, and line intersections. It then uses these features to find the best match or
the nearest neighbor among its various stored glyphs.
Post processing
After analysis, the system converts the extracted text data into a computerized file. Some OCR
systems can create annotated PDF files that include both the before and after versions of the
scanned document.
What is keras_ocr?
keras-ocr provides out-of-the-box OCR models and an end-to-end training pipeline to build
new OCR models. Using this we get pre trained data and weights so our time and effort is
saved.
Artificial Neural Networks
basic concepts of artificial neural networks
building a perceptron classifier
building a single layer neural network
building a multilayer neural network
analyzing sequential data with RNNs (possible)
constructing an OCR engine
Conclusion:
Here, we studied how to recognize optical characters using ANN.