Handwritten Character Recognition (HCR) USING NEURAL NETWORK
Handwritten Character Recognition (HCR) USING NEURAL NETWORK
Handwritten Character Recognition (HCR) USING NEURAL NETWORK
net/publication/323547763
CITATIONS READS
0 12,798
1 author:
Hitesh Mohapatra
Veer Surendra Sai University of Technology
51 PUBLICATIONS 9 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Hitesh Mohapatra on 04 March 2018.
MASTER OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
BY
HITESH MOHAPATRA
REGD.NO:07071706021
October 2009
Department of Computer Science and Engineering
College Of Engineering And Technology
(a Constituent College of Biju Patnaik University of Technology,Odisha)
Techno Capmus,Ghatikia,Kalinganagar,Bhubaneswar-751003,India
CERTIFICATE
This is to certify that project work entitled “HCR using Neural Network” carried out by Hitesh
0707106021, and a student of 2nd year M. Tech in Computer Science and Engineering from College
and worthy of acceptance for the degree of Master of Technology in Computer Science and
1.______________________________
2.______________________________
Department of Computer Science and Engineering
College Of Engineering And Technology
(a Constituent College of Biju Patnaik University of Technology,Odisha)
Techno Capmus,Ghatikia,Kalinganagar,Bhubaneswar-751003,India
CERTIFICATE OF APPROVAL
The foregoing thesis is hereby accepted as a credible study of an engineering subject carried out and
presented in a manner satisfactory to warrant its acceptance as a prerequisite to the degree for which
it has been submitted. It is understood that by this approval the undersigned do not necessarily
endorsed or approve any statement made ,opinion expressed or conclusion drawn therein, but
1. ________________________________
2. ________________________________
3. ________________________________
(Signature of Examiners)
I express my gratitude to all the professors and lecturers of our department for their
cooperation and keen interest throughout this project.
Hitesh Mohapatra
Regd.No: 0707106021
SYNOPSIS
Handwriting recognition is the ability of a machine to receive and interpret handwritten input from
multiple sources like paper documents, photographs, touch screen devices etc. Recognition of
handwritten and machine characters is an emerging area of research and finds extensive
that can effectively recognize a particular character of type format using the Artificial Neural
Network approach. Neural computing Is comparatively new field, and design components are
therefore less well specified than those of other architectures. Neural computers implement data
parallelism. Neural computer are operated in way which is completely different from the operation
of normal computers. Neural computer are trained (not Programmed) so that given a certain
starting state (data input); they either classify the input data into one of the number of classes or
cause the original data to evolve in such a way that a certain desirable property is optimized.
Keywords:
Extraction,Neural Network.
Contents
1 Introduction 1
1.1 Project Definition ........................................................................................... 1
1.2 Relevant Theory ............................................................................................. 1
1.2.1 Benefits of Character Recognition : ................................................... 1
1.2.2 Implementation of HCR : .................................................................. 2
1.2.3 What is Neural Network .................................................................... 2
1.2.4 Why use Neural Network................................................................... 2
1.3 Literature Survey ............................................................................................ 3
1.3.1 Offline Handwritten English Numerals Recognition using Correla-
tion Method ........................................................................................ 3
1.3.2 Recognition of Handwritten Hindi Characters using Backpropaga-
tion Neural Network .......................................................................... 3
1.3.3 Devnagiri Character Recognition Using Neural Networks ............... 3
1.3.4 Intelligent Systems for Off-Line Handwritten Character Recogni-
tion: A Review ................................................................................... 3
1.3.5 Fuzzy Based Handwritten Character Recognition System ................ 4
1.3.6 An Overview of Character Recognition Focused on Off-Line Hand-
writing ................................................................................................ 4
1.3.7 Handwritten Devanagari Character Recognition using Neural Network4
1.3.8 Recognition of Handwritten Devnagari Characters through Segmen-
tation and Artificial neural networks.................................................. 4
1.3.9 A Recognition System For Handwritten Gurumukhi Characters . .5
1.3.10 Image preprocessing for optical character recognition using neural
networks ............................................................................................. 5
1.3.11 Recognition for Handwritten English Letters: A Review .................. 5
1.3.12 Diagonal Based Feature Extraction For Handwritten Alphabets Recog-
nition System Using Neural Network ................................................ 5
1.4 Scope .............................................................................................................. 6
1.5 Objective......................................................................................................... 6
2 Requirement Analysis 7
2.1 Requirement Specification ............................................................................. 7
2.1.1 Functional Requirements ................................................................... 7
2.1.2 Normal Requirements ........................................................................ 7
2.1.3 Expected Requirements ..................................................................... 8
2.1.4 Excited Requirements ........................................................................ 8
2.1.5 Non-Functional requirements ............................................................ 8
2.2 Validation of Requirements ............................................................................ 9
i
2.3 System Requirements ..................................................................................... 9
2.3.1 Hardware Requirements .................................................................... 9
2.3.2 Software Requirements ...................................................................... 9
3 System Design 10
3.1 Process Model ................................................................................................ 10
3.1.1 Incremental Model ............................................................................. 11
3.1.2 Advantages of Incremental Model ..................................................... 12
3.1.3 Why we use Incremental Model? ...................................................... 12
3.1.4 Characteristics of Incremental Model ................................................ 12
3.2 Breakdown Structure(Modules) ..................................................................... 13
3.2.1 Image Preprocessing .......................................................................... 13
3.2.2 Segmentation ..................................................................................... 13
3.2.3 Feature Extraction .............................................................................. 13
3.2.4 Classification ..................................................................................... 14
3.3 Project Estimation .......................................................................................... 14
3.3.1 Estimation of KLOC .......................................................................... 14
3.3.2 Efforts ................................................................................................ 14
3.3.3 Development Time for Implementation and Testing........................... 14
3.3.4 Development Time for Project ........................................................... 14
3.3.5 Number Of Persons ............................................................................ 15
4 System Analysis 16
4.1 Projects scheduling and Tracking ................................................................... 16
4.1.1 Project Work Breakdown Structure(Analysis) ................................... 16
4.1.2 Project Work Breakdown Structure(Implementation) ....................... 18
4.2 Tasks ......................................................................................................................... 19
4.3 Project Schedule ............................................................................................. 21
4.3.1 Time Line Chart ................................................................................. 23
4.4 Analysis Model ............................................................................................... 24
4.4.1 Behavioural Model ............................................................................ 24
4.4.2 Functional Modelling......................................................................... 27
4.4.3 Architectural Diagram ....................................................................... 29
4.5 Mathematical Model ....................................................................................... 30
4.5.1 Set Theory .......................................................................................... 31
4.5.2 Venn Diagram .................................................................................... 32
4.5.3 State Diagram .................................................................................... 33
4.5.4 Time and Space Computation ............................................................ 34
5 Risk Management 35
5.1 Risk Identification .......................................................................................... 35
5.1.1 Product Size Related .......................................................................... 35
5.1.2 Customer Related............................................................................... 35
5.1.3 Process Risk ....................................................................................... 35
5.1.4 Technical Risk ................................................................................... 35
5.1.5 Development Environment Related ................................................... 35
5.2 Risk Projection ............................................................................................... 35
5.2.1 Risk Table................................................................................................... 35
5.2.2 Strategies Used To Manage Risks ...................................................... 36
ii
5.2.3 Risk Table Along With RMMM Plan ................................................ 36
5.3 Feasibility ....................................................................................................... 37
5.3.1 Technical Feasibility .......................................................................... 37
5.3.2 Cost Feasibility .................................................................................. 38
6 Technical Specification 39
6.1 Technology Details Used in Project .............................................................. 39
6.1.1 JAVA Development Kit ...................................................................... 39
6.1.2 Eclipse................................................................................................ 40
6.2 References to Technology .............................................................................. 40
7 Software Implementation 41
7.1 Introduction .................................................................................................... 41
7.2 Important Modules And Algorithm Used ....................................................... 41
7.2.1 Module 1: Image Processing ............................................................. 41
7.2.2 Module 2: Segmentation .................................................................... 43
7.2.3 Module 3: Feature Extraction ............................................................ 44
7.2.4 Module 4: Training And Recognition ................................................ 44
8 Software Testing 48
8.1 Introduction .................................................................................................... 48
8.1.1 Unit Testing: .......................................................................................... 48
8.1.2 Integration testing .............................................................................. 48
8.1.3 Validation testing ............................................................................... 49
8.1.4 GUI Testing ........................................................................................... 49
8.2 Test cases ........................................................................................................ 50
8.3 Snap shots of Test Cases and Test Results ...................................................... 52
9 Results 57
References 60
ii
i
List of Figures
v
11.1 Project Planner................................................................................................ 65
11.2 Plagiarism Report ........................................................................................... 66
vi
List of Tables
vii
C HAPTER 1
Introduction
Neural computing Is comparatively new field, and design components are therefore
less well specified than those of other architectures. Neural computers implement data par-
allelism. Neural computer are operated in way which is completely different from the oper-
ation of normal computers. Neural computer are trained (not Programmed) so that given a
certain starting state (data input); they either classify the input data into one of the number
of classes or cause the original data to evolve in such a way that a certain desirable property
is optimized.
2.In forensic application HCR will be an effective method for evidence collection.
3.It will also help to reduce noise from the original character.
4.Our method develop accuracy in recognizing character in divert font and size.
1
5.More set of sample invites more accuracy rate because of heavy training and testing
session.
2
1.3 Literature Survey
1.3.1 Offline Handwritten English Numerals Recognition using Corre-
lation Method
In this paper author has proposed system is to efficiently recognize the offline handwritten
digits with a higher accuracy than previous works done. Also previous handwritten number
recognition systems are based on only recognizing single digits and they are not capable of
recognizing multiple numbers at one time.So the author has focused on efficiently perform-
ing segmentation for isolating the digits. [1]
3
Recognition on hand written documents. This paper provides a comprehensive review of ex-
isting works in handwritten character recognition based on soft computing technique during
the past decade. [4]
4
a new method for recognition of offline handwritten devnagari characters using segmenta-
tion and Artificial neural networks. The whole process of recognition includes two phases-
segmentation of characters into line, word and characters and then recognition through feed-
forward neural network.[8]
5
accuracy compared to the systems employing the conventional horizontal and vertical meth-
ods of feature extraction. This system will be suitable for converting handwritten documents
into structural text form and recognizing handwritten names.[12]
1.4 Scope
1. System will be designed in way to ensure that offline Handwritten Recognition of
English characters.
2. Our old and epic HCR literature can be restore in digital form.
4.Large number of training data set will improve the efficiency of the suggested ap-
proach.
1.5 Objective
1. Use Neural signs in literature domain.
6
C HAPTER 2
Requirement Analysis
1.The developed system should recognize handwritten English character present in the
image.
2.System shall show the error message to the user when given input is not in the required
format.
N2 : Input of characters with various font size and styles should recognize.
7
N3 : Database should identify computer based English character by comparison .
N4 : Application should be able for matching the stored patterns on input handwritten char-
acter.
Exp1 : Instead of only one character application should take set of characters or text.
Exp3 : By using Neural Network bringing more accuracy in character recognition process.
Exp5 : Minimum 26*50 (character * patterns) should be available for each character.
Exc1: Application interpret all the English alphabets through NN training process.
Exc3: Alphanumerical characters with special symbol should be recognized with proposed
system.
Performance: Handwritten characters in the input image will be recognised with an accu-
racy of ablut 90
Availability: This system will retrieve the handwritten text regions only if the image con-
tains written text in it.
Learn ability: The software is very easy to use and reduces the learning work.
8
2.2 Validation of Requirements
.
The project “HCR using Neural Network” will be recognized as successful
implementation if it provide all the required images on the basis of suitable input with
minimum time. The requirement specification define should be validated such a that the
successful implementation of product can be recognized. Hence validation specifies
classes of tests to be performed to validate function, performance and the constraints.
With respect to the system under consideration the following issues are to be validated to
ensure consistency of system.
V1: The Neural Network are known to be capable of providing good recognition rate at the
present as compare to other methods.
V2: Handwritten Character Recognition system give much better result in terms of
performance and accuracy in comparison with existing usual approach due to the
application of artificial way character recognition and Neural Network in detection of
characters.
V3: Handwritten Character Recognition technology provides image definition, image pre-
processing and image segmentation and recognition capabilities and still maintains
high level of accuracy in the field of image processing.
9
C HAPTER 3
System Design
10
3.1.1 Incremental Model
Incremental model is used as the process model in our system. Figure 3.1 shows the
process model of the system. To save actual problems in an industry setting, Software Engi-
neering must incorporate a development strategy that encompasses the process, method and
the tool layers; this strategy is often referred as process model. A process model for Software
Engineering is chosen base on the nature of the Project and its application. For our project,
we have selected Incremental Model.
1. Using these models, a limited set of customer requirements are implemented quickly
and are delivered to customer.
2. Modified and expanded requirements are implemented step by step.
3. It combines elements of linear Sequential Model with the iterative Philosophy of pro-
totyping.
4. Each linear sequence produces a deliverable Increment of the Software.
5.Each linear Sequence is divide into 4 parts:-
• Analysis
• Design
• Code
• Testing
1. Analysis
It includes understanding of information domain, required functions, behavior, perfor-
mance and interface. Requirements for the system and software are documented and
reviewed with customer.
11
2. Design
It is multiple processes that include four attributes of program data structure, software
architecture, interface representation and procedural detail.
3. Coding
Translation of design to machine code is done by this step.
4. Testing
It focuses on Logical internals of Software and ensures that all statement is correct to
uncover all hidden errors. For an incremental model, the first Increment is developed
as a core model, which is used by the customer. Then as things are added after the first
delivery, product gets and better.
2. Each increments produces the product which is submitted to customer and suggests some
change and increment implements that changes with some extra requirements to previous.
3. Incremental model does not facilitate the development of project in one go. This is
useful for developing modules and then testing them which helps us to modularize the entire
project for better handling.
12
1. When staff is less then we can go for step by step evolution of increments.
2. In case of increment process model, scope for intermediate requirements change and test-
ing.
1.Image Preprocessing
2.Segmentation
3.Feature Extraction
4.Classification
3.2.2 Segmentation
After preprocessing of the image segmentation is done. This is done with the help of
following steps:
13
3.2.4 Classification
In this phase, we are going to train and test the Neural Network.
3.3.2 Efforts
E=3.2 * (KLOC)ˆ1.05 (Boehm Simple Model)
E=3.2 * (4.35)ˆ1.05
E=15.87 person months
14
3.3.5 Number of Persons
5 Persons are required to complete the project with given time span successfully.
15
C HAPTER 4
System Analysis
16
T5: Risk Management
It includes identifying the risks during project development and according to that managing
the risks which are affecting the project development.
17
4.1.2 Project Work Breakdown Structure(Implementation)
Module 1 :Preprocessing
Gray Scale :
An image is an array, or a matrix, of square pixels(picture elements) arranged in
columns and rows. In an (8 bit) gray scale image each picture element has an assigned
intensity that ranges from 0 to 255. A gray scale image is what people normally call
a black and white image,but the name emphasizes that such an image will also in-
clude many shades of gray. A normal gray scale image has 8 bit color depth- 256 gray
scales.A “ true color images 24 bit color depth 8 * 8 * 8 bits 256 * 256 * 256 colors
= 16 million colors. Some gray scale images have more gray scales, fro instance 16 bit
=65536 gray scales.There are two general groups of images :vector graphics(or line
art) and bitmaps(pixel based or images ).
Thinning :
Thinning algorithm is a Morphological operation that is used to remove selected fore-
ground pixels from binary images.It preserves the topology (extent and connectivity)
of the original region while throwing away most of the original foreground pixels.
Module 2 :Segmentation
In this part the characters will be identified as letters and the image will be converted
to text.After the image is cleaned up and becomes a binary image which contains only
the text, the binary image is then saved and the memory is cleaned up.This step is very
important to increase the speed of the system.After the following steps should be done.
• Divide the text into rows
• Divide the rows into words
• Divide the word into letters
Module 3:: Feature Extraction
In pattern recognition in image processing, Feature extraction is a special form of
dimensionality reduction. When the input data to an algorithm is too large to be
processed and it is suspected to be notoriously redundant (much data,but not much
information) then the input data will be transformed into reduced representation set
of features(also named feature vector). Transforming the inputbdata into the set of
features is called features extraction.
18
Figure 4.2: Project Work Breakdown structure(Implementation)
4.2 Tasks
In project management, a task is an activity that needs to be accomplished within a defined
period of time or by a deadline. A task can be broken down into assignments which should
also have a defined start and end date or a deadline for completion. One or more assignments
on a specific task normally render the completed. Tasks can be linked together to create
dependencies.
19
4.3 Project Schedule
In project management, a schedule consists of a list of projects terminal elements with in-
tended start and finish dates. Terminal elements are the lowest elements in a schedule, which
are not further subdivided. Those items are often estimated in terms of resource require-
ments, budget and duration, linked by dependencies and schedule events. Table describes
the schedule for the project development. It also highlights all the tasks to be carried out
along with their duration, dependencies, and developers assigned to accomplish those tasks.
20
Table 4.2: Project Table
Task Starting Ending Developers Remark
Time Time
T1 20/6/15 5/7/15 D1
T2 6/7/15 9/7/15 D1
T3 10/7/15 28/7/15 D1
T4 28/7/15 3/8/15 D1
T5 4/8/15 15/8/15 D1
T6 16/8/15 25/8/15 D1
T7 26/8/15 2/9/15 D1
T8 3/9/15 9/9/15 D1
T9 10/9/15 14/9/15 D1
T10 15/9/15 22/9/15 D1
T11 14/12/15 25/12/15 D1
T12 26/12/15 9/1/15 D1
T13 10/1/15 16/1/15 D1
T14 17/1/15 31/1/15 D1
T15 1/2/15 11/2/15 D1
T16 12/2/15 24/2/15 D1
T17 25/2/15 1/3/15 D1
T18 2/3/15 7/3/15 D1
T19 8/3/15 17/3/15 D1
T20 18/3/15 31/3/15 D1
21
4.3.1 Time Line Chart
4.3.1.1 Time line Chart(Analysis Phase) 4.3.1.2 Time line Chart(Implementation Phase)
22
4.4 Analysis Model
4.4.1 Behavioral Model
4.4.1.1 Use case Diagram
The use case view models functionality of the system as perceived by outside uses. A use
case is a coherent unit of functionality expressed as a transaction among actors and the sys-
tem.
23
4.4.1.2 Sequence Diagram
A sequence diagram is a graphical view of a scenario that shows object interaction in a time-
based sequence what happens first, what happens next. Sequence diagram establish the role
of objects and helps provide essential information to determine class responsibilities and
interfaces. This type of diagram is best used during early analysis phase in design because
they are simple and easy to comprehend. Sequence diagram are normally associated with
use cases.
24
Figure 4.8: Sequence Diagram of Feature Extraction
25
4.4.2 Functional Modelling
4.4.2.1 Data Flow Diagram
Data flow diagram (DFD) is also called as Bubble Chart is a graphical technique, which
is used to represent information flow, and transformers those are applied when data moves
from input to output. DFD represents system requirements clearly and identify transformers
those becomes programs in design. DFD may further partitioned into different levels to show
detailed information flow e.g. level 0, level 1 etc.
26
Figure 4.13: Data Flow Diagram for ANN)
27
4.4.3 Architectural Diagram
4.4.3.1 Deployment Diagram
A deployment diagram shows the allocation of processes to processors in the physical design
of a system. A deployment diagram may represent all or part of the process architecture of a
system.
28
4.5 Mathematical Model
when solving problems we have to decide the difficulty of our problem. There are two types
of classes provided for that.These are as follows.
• class P
• class NP
• Class P
P is the class of decisions that are polynomially bounded. P is defined only for deci-
sion problems. It may seem rather extravagant to use the existence of a polynomial
time bound as the criterion for defining the class of more or less reasonable problems
polynomials can be quite large. There are, however a number of good reasons for this
choice.
First, while it is not true that every problem in P has an acceptably efficient algorithm,
we can certainly say that if a problem is not in P, it will be extremely expensive and
probably impossible to solve in practice.
A second reason for using a polynomial bound to define p is that polynomials have
nice closure properties. An algorithm for a complex problem may be obtained by
combining several algorithms for simpler problems. Some of the simpler algorithms
may work on the output or intermediate result of others.
A third reason for a using polynomial bound is that it makes P independent of the
particular formal model of computation used. A number of formal models are used to
prove rigorous theorems about the complexity of algorithms and problems.
• Class NP
NP is the class of decision problems for which a given proposed solution for a given
input can be checked quickly (in polynomial time) to see if it really is a solution. More
formally, inputs for a system and proposed solution must be described by strings of
symbols from some finite set.
There may be decision problems where there is no natural interpretation for solutions
and proposed solutions. A decision problem is abstractly just some function from a
set of input string to the set yes, no. A formal definition of NP considers all decision
problems.
>NP-Hard Problems
NP-hard (Non-Deterministic polynomial time hard), in computational complexity theory,
is a class of problems that are, informally at least as hard as the hardest problem in NP.
A problem H is NP-hard if and only if there is an NP-complete L that is polynomial time
Turing reducible to H.
NP-hard problems may be of any type: Decision problems, search problems or optimiza-
tion problems.
>NP-Complete Problems
NP-Complete is the term used to describe decision problems that are the hardest ones in
NP in the sense that, if there were a polynomially bounded algorithm for an NP-complete
29
problem, then there would be a polynomially bounded algorithm for each problem in N.
Conclusion-: As we have seen all the classes of problem. Our Topic is ”HCR Using Neural
Network.” is of P class problem.
S = {I, P,R, O}
Where,
I = Set of inputs.
P = Set of Process.
R = Set of rules.
O = Set of Outputs.
I = {I1}
Where,
I1 = Input image.
P = {P1,P2,P3, P4}
Where,
P1 = Accept image.
P2 = Preprocess on image.
P3 = Feature Extraction.
O = {O1}
30
Where,
O1 = Recognize character.
31
4.5.3 State Diagram
q0=Image Acquisition
q1=Preprocessing
q2=Segmentation
q3=Feature Extraction
q5=Close
32
4.5.4 Time and Space Computation
The space complexity can be defined as amount of memory required by an algorithm to run.
To compute space complexity we used two factors:
• Constant Characteristic
• Instant Characteristic
Space requirement S(p) can be given as: S(p)= C + Sp
where,
C is constant i.e. fixed part that denotes space of inputs, outputs, instructions used. Sp is
space dependent on instance characteristic i.e. variable part and it include space for recur-
sion stack.
The time complexity of an algorithm is the amount of processor time required by an algo-
rithm to run to completion. It is difficult to compute time complexity in terms of physically
clocked time. For instance in multi tier system, executing time depends on many factors such
as:
• System Load
• Number of other programs running
• Instructions used and speed of underlying hardware
IR2 tree algorithm time complexity:
The processing time T for the searching nearest hotels/lodges is proportional to the number
of hospital register to the particular location T = O(NC), where, N is the number of ho-
tels/lodges and C is the number of users, C can be represented by S as C = O(S). Thus, the
total processing time T could be estimated as:
T = O(NC) = O(S2)
33
C HAPTER 5
Risk Management
R3 If customer provides irrelevant information then it may generate some unknown risk.
R7 Lack on training on tools and inexperience may cause difficulty in completing project
modules.
34
Risk Category Probability Impact
R1 Product Size More High
R2 Customer More High
R3 Customer Less Low
R4 Execution Less High
R5 Technical Less Low
R6 Development Less Low
R7 Development Less High
S3 To reduce above stated risk R3, Properly design the system with a flexibility to adopt
changes in later stages and also maintain all necessary documentation for the same.
S6 As the number of persons are sufficient, and ANN part of project is complicated and
enlarged so, we have selected incremental process model so that the project can be
completed and handed over to customer in same way.
S7 We will try to improve the quality of the software as customer demand changes time to
time.
35
5.3 Feasibility
The feasibility of the project is analysed in this phase and business proposal is put forth
with a very general plan for the project and some cost estimates. During system analysis the
feasibility study of the proposed system is to be carried out. This is to ensure that the pro-
posed system is not a burden to the company. For feasibility analysis, some understanding
of the major requirements for the system is essential.Dimensions of Software Feasibility are
as follows:
• Technology:
Is project technically feasible?
Is it within state of art?
Can defect be reduce to a level matching application’s need?
• Finance:
Is it financially feasible?
Can development be completed at a cost the software organization and its client or
market can afford?
• Time:
Will project’s time to market beat competition?
• Resources:
Does the organization have resources needed to success?
Two key considerations involved in the feasibility analysis are:
1. Technical Feasibility.
2. Cost Feasibility.
1.NP-Complete
2.NP-Hard
3.Satisfiability
1.NP-Complete:
P Class:Class of all deterministic polynomial language problems.
NP Class:Class of all non-deterministic polynomial language problems.
NP Complete Problems are always solves within given time and space.
36
2.NP-Hard:
These are problems for which there are no efficient solutions are found. Generally
complexity of these problems are more than P,NP,NP-Complete. These may include
higher multiplicative constants, exponents terms or high order polynomial.
3.SAT (Satisfiability):
Boolean formula is satisfiable if there exists at least one way of assigning value to its
variable so as to make it true and we denote it by using SAT. The problem of deciding
whether given formula is satisfiable or not.
37
C HAPTER 6
Technical Specification
Setting PATH and CLASS PATH variables in order to compile or execute java (Environ-
mental variable):
2.Now click Environment Variables, here variables are divided into two sections.
5.Set variable name = classpath and variable value as directory where java is installed.One
more environment variable ,we have to set for Java home directory similar to path and
38
class path.For verification ,whether java is installed successfully or not ,just goto com-
mand prompt,type javac if you see java compiling commands then you have installed
it successfully.
6.1.2 Eclipse
STEP 3:install eclipse.
1.Download latest version of eclipse .
2.install eclipse on our system.
3.Eclipse stores your projects in a folder called a workspace.Choose a workspace folder to
use for this session.
39
C HAPTER 7
Software Implementation
7.1 Introduction
GUI Specification For the creation of GUI we have used the java swing toolkit.
Swing
Swing library is an official Java GUI toolkit released by Sun Microsystems. The main char-
acteristics of the Swing toolkit
1.platform independent
2.customizable
3.extensible
4.configurable
5.lightweight
40
Output :Gray Scaled Document Image
Step 1: Start
Step 2: Select Input Document Image.
Step 3: Repeat for x=0 to Width of Image.
Step 4: Repeat for y=0 to Height of Image.
Step 5: Extract RGB value for each of pixel as RGB(i,j)
int col = inPixels[x][y];
int r = col & 0xff;
int g = (col >> 8) & 0xff;
int b = (col >> 16) & 0xff;
int gs = (r + g + b)/3;
Step 6: Set Pixel with computed gray level as :
inPixels[x][y] = (gs | (gs << 8) | (gs << 16));
gimage.setRGB(x, y, inPixels[x][y]);
Step 7: Display Gray Scale image.
Step 8: Stop
Binarization
Image Binarization converts an image pf upto 256 gray level to a black and white im-
age. The simplest way to use image binarization is to choose a threshold value and clasify
all pixels with values above the threshold as black and all other pixels are white.
41
bimage.setRGB(x, y, inPixels[x][y]);
Step 9: Display Binarized Image.
Step 10: Stop
Line Segmentation
To perform line segmentation, we need to scan each horizontal pixel row starting from
the top of document. The lines are separated where we finds a row with no black pixels.This
row acts as a separation between two lines.
Word Segmentation
To perform word segmentation, we need to scan each vertical pixel column starting
from the left of line. The words are separated where we finds a column with no black pixels
for more than predefined columns. This column acts as a separation between two words.
42
Step 1: Start
Step 2: Select Document Image.
Step 3: Repeat for x = 0 to Height of Segmented line image.
Step 4: Repeat for y = 0 to Width of Segmented line image..
Step 5: Scans Each pixels from Vertical pixel column.
Step 6: Extract RGB value for each pixels inPixels[x][y]
Step 7: If pixel with no Black pixel is found for more than avgpxl then
{
Segment Word from lines
}
Step 8: Stop
Character Segmentation
To perform character segmentation, we need to scan each vertical pixel column starting
from the left of word. The characters are separated where we finds a column with no black
pixels columns. This column acts as a separation between two character.
43
Training
* This method is called to train the network. It can run
for a very long time and will report progress back to the
owner object.
@exception java.lang.RuntimeException
44
if ( (winners ¡ outputNeuronCount) && (winners ¡ train.getTrainingSetCount()) ) {
forceWin ( won ) ;
continue ;
}
adjustWeights ( rate , learnMethod , won , bigcorr, correc ) ;
owner.updateStats(n retry,totalError,best err);
if ( halt ) {
owner.updateStats(n retry,totalError,best err);
break;
}
Thread.yield();
if ( bigcorr[0] ¡ 1E-5 ) {
if ( ++n retry ¿ retries )
break ;
initialize () ;
iter = -1 ;
rate = learnRate ;
continue ;
}
if ( rate ¿ 0.01 )
rate = reduction ;
}
copyWeights( this , bestnet ) ;
for ( i=0 ; i¡outputNeuronCount ; i++ )
normalizeWeight ( outputWeights[i] ) ;
halt = true;
n retry++;
owner.updateStats(n retry,totalError,best err);
}
45
Recognition
/∗∗
* Present an input pattern and get the
winning neuron.
@param input input pattern
@param normfac the result
@param synth synthetic last input
@return The winning neuron number.
∗/
public int winner(double input[] ,double normfac[] ,double synth[])
{
int i, win=0;
double biggest, optr[];
normalizeInput( input , normfac , synth ) ;
biggest = -1.E30;
for ( i=0 ; i < optr = outputWeights[i];
output[i] = dotProduct (input , optr ) * normfac[0]+ synth[0] * optr[inputNeuronCount] ;
output[i] = 0.5 * (output[i] + 1.0) ;
if ( output[i] > biggest ) {
biggest = output[i] ;
win = i ;
}
if ( output[i] > 1.0 )
output[i] = 1.0 ;
if ( output[i] < 0.0 )
output[i] = 0.0 ;
}
return win ;
}
46
C HAPTER 8
Software Testing
8.1 Introduction
Software Testing is the process of testing the functionality and correctness of software.Software
testing is an empirical technical investigation conducted to provide stakeholders with infor-
mation about the quality of the product to the context in which it is intended to operate.This
includes,but is not limited to,the process of executing a program or application with the intent
of finding errors.
47
Figure 8.1: Integration testing
48
8.2 Test cases
49
Table 8.4: Test case 4
Use case ID 4
Test Case Name Start Training
Test case Description Start training character.
Steps 1.Start training of character which are in .dat file by user
50
8.3 Snap shots of Test Cases and Test Results
AppPerfect Java Code Test is a Java code analysis software designed to perform the
following two key tasks: Automate Java code review and Enforce Good Java Coding Prac-
tices. AppPerfect Code Test analysis your Java and Java Server Pages (JSP) source code and
applies over 750 Java coding rules to apply the collective knowledge of leading experts in
the Java programming field to your code.
Locating and fixing Java coding problems during source code development time is ar-
guably the cheapest way to resolve problems. As your project goes past the development
phase, in to testing and deployment, the cost of fixing problems grows exponentially. By
conducting source code analysis and successfully identifying and correcting all such issues,
software developers can eliminate the risk and potential costs early in the software develop-
ment cycle.
51
Figure 8.3: Setting Project
52
Figure 8.5: Auto-fixable Violations
53
Figure 8.7: Auto-Fixes
54
Figure 8.9: Developers
55
C HAPTER 9
Results
“HCR Using Neural Network ”is aimed at recognizing the handwritten characters. The
“handwritten Character Recognition System ”is implemented using a neural network.in this
system original image is converted into gray scale image then After gray scaling image is
converted in black and white and segmented form. After preprocessing and segmentation
operation system show final output.
56
Figure 9.3: Input Image
57
C HAPTER 10
10.1.2 Un-installation
For un-installation of the application user can simply delete the jar file,the application will
be delete permanently.
1.Run a Project.
3.Save datasets.
6.When you click on Recognize button they show us grayscale, black and white and
segmented image as well as final output also shown in recognize text box.
HCR English 2015-2016. This is free software, and you are welcome to redistribute it
under certain conditions.
58
C HAPTER 11
11.1 Conclusion
Many regional languages throughout world have different writing styles which can be
recognized with HCR systems using proper algorithm and strategies. We have learning for
recognition of English characters. It has been found that recognition of handwritten charac-
ter becomes difficult due to presence of odd characters or similarity in shapes for multiple
characters. Scanned image is pre-processed to get a cleaned image and the characters are
isolated into individual characters.
Preprocessing work is done in which normalization, filtration is performed using pro-
cessing steps which produce noise free and clean output. Managing our evolution algorithm
with proper training, evaluation other step wise process will lead to successful output of sys-
tem with better efficiency. Use of some statistical features and geometric features through
neural network will provided better recognition result of English characters. This work will
be helpful to the researchers for the work towards other script.
59
References
[1]Isha Vats, Shamandeep Singh, “Offline Handwritten English Numerals Recognition us-
ing Correlation Method”,International Journal of Engineering Research and Technology
(IJERT): ISSN: 2278-0181 Vol. 3 Issue 6, June 2014. Access Date: 09/07/2015.
[3]S S Sayyad, Abhay Jadhav, Manoj Jadhav, Smita Miraje, Pradip Bele, Avinash Pandhare,
‘Devnagiri Character Recognition Using Neural Networks” ,International Journal of
Engineering and Innovative Technology (IJEIT)Volume 3, Issue 1, July 2013. Access
Date: 09/07/2015.
[5]Prof. Swapna Borde, Ms. Ekta Shah, Ms. Priti Rawat, Ms. Vinaya Patil, “Fuzzy Based
Handwritten Character Recognition System” ,International Journal of Engineering Re-
search and Applications (IJERA) ISSN: 2248-9622,VNCET 30 Mar’12. Access Date:
09/07/2015.
[6]Rahul KALA, Harsh VAZIRANI, Anupam SHUKLA and Ritu TIWARI, “An Overview
of Character Recognition Focused on Off-Line Handwriting”,IEEE TRANSACTIONS
ON SYSTEMS, MAN, AND CYBERNETICS PART APPLICATIONS AND RE-
VIEWS, VOL. 31, NO. 2, MAY 2001. Access Date:09/07/2015.
60
[10]Miroslav NOHAJ, Rudolf JAKA, “Image preprocessing for optical character recog-
nition using neural networks”Journal of Patter Recognition Research, 2011. Access
Date:09/07/2015.
[12]J.Pradeep et al,, “Diagonal based feature extraction for handwritten alphabets recogni-
tion System using neural network”International Journal of Computer Science and Infor-
mation Technology (IJCSIT), Vol 3, No 1, Feb 2011. Access Date:09/07/2015.
61
Appendix A: Project Quality and Testing
Report
62
Table 11.1: Testing table
Test Module Description Expected Output Actual Out- Remark
case ID Name put
TC 00 01 Image Ac- Uploading image Image file should Image file Pass
quisition be selected selected
and uploaded and up-
successfully loaded
success-
fully
TC 00 02 Image Ac- Wrong input file error message error Pass
quisition uploaded should be dis- message
played displayed
TC 01 01 Image Pre- To preprocess im- Gray scale con- Gray scale Pass
processing age which is up- version should be conversion
loaded done done
TC 01 02 Image Pre- To preprocess im- Binarization(ConverB
siionnarization Pass
processing age which is up- from RGB to done
loaded B/W image)
TC 02 01 SegmentationLine Segmenta- Line Segmenta- Line Seg- Pass
tion tion should be mentation
done should
done
TC 02 02 SegmentationWord Segmenta- word Segmen- Word Seg- Pass
tion tation should be mentation
done should
done
TC 02 03 SegmentationCharacter Seg- Character Seg- Character Pass
mentation mentation should Segmenta-
be done tion should
done
TC 03 01 Feature Feature extrac- Feature should be Feature ex- Pass
Extraction tion extract tracted suc-
cessfully
TC 04 01 Training Training of char- Character should Character Pass
acters be train success- trained suc-
fully cessfully
TC 05 01 Recognition Recognition of Character should Character Pass
character be recognized recognized
successfully success-
fully
63
Appendix B: Project Planner and
Progress Report
64