25
Optical Character Recognition Vidyut Singhania Divyanshu Sagar Ahmed Zaid

Final Report on Optical Character Recognition

Embed Size (px)

DESCRIPTION

A brief presentation / overview of the concept of Optical Character Recognition

Citation preview

Page 1: Final Report on Optical Character Recognition

Optical Character

RecognitionVidyut SinghaniaDivyanshu SagarAhmed Zaid

Page 2: Final Report on Optical Character Recognition

Quick Overview

Contents

Problem Definition

Introduction to OCR

Applications of OCR

Platform Used

Steps in OCR

Working of OCR

Future Enhancements & Prospects

Summary

Page 3: Final Report on Optical Character Recognition

Problem Overview

Humans are bound to make errors – some time or the other – especially while performing mundane and boring tasks like digitization or security, continuously.

Many times we are unable to perceive certain digits due to various factors – motion, lack of digit clarity &/or illumination and so on.

It is these problems which have primarily lead us to delve into this topic.

Page 4: Final Report on Optical Character Recognition

Introduction to OCR

1 2 3 4 5 6 7 8 9 0

Page 5: Final Report on Optical Character Recognition

INTRO

1. Ingenious piece of software.

2. Involves the mechanical/electronicconversion of scanned images of typewritten/printed text into machine-encoded/computer-readable text. 3. Heavily used in the

industry.

INTRO i

Page 6: Final Report on Optical Character Recognition

INTRO ii

Common method of digitizing printed texts

Subtle software which is as highly overlooked as it is simple.

Numerous applications and uses – editing, scanning, searching, comparison, compact storage and many more!

OCR is a field of research in pattern recognition, artificial intelligence and computer vision.

Page 7: Final Report on Optical Character Recognition

Applications in Industry

OCR

Page 8: Final Report on Optical Character Recognition

Problems our software addresses

Translate Colour Images into Machine readable format

Conversion of printed / written digits to Machine legible form

Reduction of Human Error

Human effort on daily mundane tasks

Page 9: Final Report on Optical Character Recognition

Platform

MATLAB 8.3 which is a high-level cross-platform, multi paradigm programming language.

MATLAB R 2013a & MATLAB R2014a

Page 10: Final Report on Optical Character Recognition

Steps in OCR

Pre-processing

Glyph Recognitio

n

Classification

Page 11: Final Report on Optical Character Recognition

Steps in OCR

App specific optimization

Pre-Processing

Feature extraction

Classification

Page 12: Final Report on Optical Character Recognition

Pre-Processing

Deals with Improving quality of the Image for better recognition by the system.

Consists of : Noise Removal, Deblurring, Binarization & Edge Detection

Take any image, Synthetic/Handwritten, any size but specific formats [those accepted by MATLAB]

Page 13: Final Report on Optical Character Recognition

Feature Extraction

Transforming the input data into the set of features is called Feature extraction.

Feature extraction is performed on raw data prior to applying k-NN algorithm on the transformed data in Feature space.

Feature Extraction serves two purposes; one is to extract properties that can identify a character uniquely. Second is to extract properties that can differentiate between similar characters.

Page 14: Final Report on Optical Character Recognition

Feature Extraction

Eg

Page 15: Final Report on Optical Character Recognition

Classification

Once the features are extracted, we can go ahead and train a neural network using the training data for which we already know the true classes. After training, recognizing a new scanned image involves:

1.Reading the Image2.Segmenting the Images into Lines3.Segmenting each Line into Glyph4.Classifying each glyph by extracting its feature set and using neural networks to predict its class.

Page 16: Final Report on Optical Character Recognition

WORKING OF OCR

Page 17: Final Report on Optical Character Recognition

Phase I : Pre Processing

Image Acquisition: Take any image whose format is supported by MATLAB.

Step as follows: Noise Removal : Add Salt & Pepper noise to

the image and cleanse using Median filter De blur image : Wiener Deconvolution filter Conversion of Image: Resulting image Binary image Otsu method with Graythresh() Fn is used

Page 18: Final Report on Optical Character Recognition

Phase I : Pre Processing (E.D.)

Edge Detection: Three different filters to Binary image

a. Canny edge detectorb. Prewitt edge detectorc. Zerocross filter Applied separately on the Binary imageThe three images obtained are sent to the Second phase for Character Recognition.

Page 19: Final Report on Optical Character Recognition
Page 20: Final Report on Optical Character Recognition

Phase II : Character Recognition

Method Io Apply K nearest Neighbour method to the best edge

detected image of last step

Supervised learning – We provide it some data sets with the correct answer and ask it to predict more correct data values on the basis of existing data sets.

Classification learning – We predict the output in a discrete manner – not a continuous manner.

eg. A Cancer is malignant or benign – CAN’T be both!

Thus, KNN is an eg. of Supervised Classification wherein we ask the algo to detect the character in any 1 of the numerous possible digits on the basis of the existing training data sets.

Page 21: Final Report on Optical Character Recognition

Validation of Software & Results

The usage of K-Nearest Neighbor on the MNIST data set results in an accuracy level of 96.91% - a major achievement given that we’re still novices in this field!

Thus, we have validated the software by testing it on numerous data items – the MNIST test set, the MATLAB inbuilt image sets and even numerous downloaded scanned images.

Page 22: Final Report on Optical Character Recognition

Future Enhancements Currently, the scope of our engine extends to recognizing

one character at a time.

We propose to extend this functionality to enable the accurate prediction of multiple characters simultaneously – thereby enabling truly real time Character Recognition.

Also, we shall delve further into the implementation of Neural Networks and come up with methods to increase our accuracy levels.

Last, but not the least, we shall develop a GUI which shall enable greater User usability and popularity.

Page 23: Final Report on Optical Character Recognition

Future Prospects

We are looking at this engine as the stepping stone towards the future.

Implementation in Automatic Number Plate Recognition system.

This can be deployed in commercial buildings, IT parks, high-end and niche buildings as a security measure and/or as a part of Home Automation.

Page 24: Final Report on Optical Character Recognition

Summary

OCR technology provides fast, automated data capture which can save considerable time and labour costs of organisations.

The system has its advantages such as Automation of mundane tasks, Less Time Complexity, Very Small Database and High Adaptability to untrained inputs with only a small number of features to calculate.

Page 25: Final Report on Optical Character Recognition