Acc. No. DC 443.pdf

download Acc. No. DC 443.pdf

of 77

Transcript of Acc. No. DC 443.pdf

  • 7/26/2019 Acc. No. DC 443.pdf

    1/77

    DISSERTATION

    On

    RECOGNITION OF HANDWRITTEN BENGALI CHARACTER BASED ON CHARACTER

    FEATURES

    Thesis Submitted in the partial fulfillment of the requirements for the degree of

    M.TECH IT (Courseware Engineering)

    Submitted By

    SWATI MUKHERJEE

    Examination Roll number:-M48CWE10-03

    Under the Guidance of

    Mr. Arunasish Acharya

    School of Education Technology

    Faculty Council for UG and PG studies in

    Engineering and Technology

    JADAVPUR UNIVERSITY

    KOLKATA- 700032

    2010

  • 7/26/2019 Acc. No. DC 443.pdf

    2/77

    Faculty Council for UG and PG studies in Engineering and Technology

    JADAVPUR UNIVERSITY, KOLKATA- 700032

    Certificate of Recommendation

    This is to certify that Swati Mukherjee has completed her dissertation entitled Recognition of

    Handwritten Bengali Character Based on Character Features, under the supervision and

    guidance of Arunasish Acharya, School of Education Technology, Faculty Council for UG and

    PG studies in Engineering and Technology, JADAVPUR UNIVERSITY, Kolkata. We are

    satisfied with her work, which is being presented for the partial fulfillment of the degree ofMaster of Technology in IT (Courseware Engineering), Jadavpur University, Kolkata-

    700032.

    Mr. Arunasish Acharya

    Teacher in Charge of Thesis,

    School of Education Technology

    Jadavpur University, Kolkata 700 032

    Prof. Samar Bhattacharya

    Director, School of Education Technology

    Jadavpur University,Kolkata 700 032

    Prof. Niladri Chakraborty

    Dean, Faculty Council for UG and PG

    studies in Engineering and Technology

    Jadavpur University, Kolkata 700 032

  • 7/26/2019 Acc. No. DC 443.pdf

    3/77

    Faculty Council for UG and PG studies in Engineering and Technology

    JADAVPUR UNIVERSITY, KOLKATA- 700032

    Certificate of Approval*

    The foregoing thesis is hereby approved as a creditable study of M.Tech IT (Courseware

    Engineering) 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 endorse or approve any statement made, opinion expressed or conclusion

    therein but approve this thesis only for the purpose for which it is submitted.

    Final Examination for

    Evaluation of the Thesis _____________________________

    _____________________________

    _____________________________

    Signature of Examiners

    *Only in case the thesis is approved.

  • 7/26/2019 Acc. No. DC 443.pdf

    4/77

    Declaration of Originality and Compliance of Academic Ethics

    I hereby declare that this thesis contains literature survey and original research work by the

    undersigned candidate, as part of Master of Technology in IT (Courseware Engineering

    studies).

    All information in this document have been obtained and presented in accordance with academic

    rules and ethical conduct.

    I also declare that, as required by these rules and conduct, I have fully cited and referenced all

    material and results that are not original to this work.

    Name (Block Letters) : SWATI MUKHERJEE

    Exam Roll Number : M48CWE10-03

    Thesis Title : RECOGNITION OF HANDWRITTEN BENGALICHARACTER BASED ON CHARACTER FEATURES.

    Signature With Date :

  • 7/26/2019 Acc. No. DC 443.pdf

    5/77

    ACKNOWLEDGEMENTS

    I feel extremely glad in presenting my final year project at School Of Education Technology,

    Jadavpur University, Kolkata, in the partial fulfillment of the requirements for the M.Tech

    IT(Courseware Engineering).

    I would specially like to thank my guide, Mr. Arunashis Acharya, for his vigilant supervision and

    his constant encouragement. He spent his precious time in reviewing the project work and

    provided many insightful comments and constructive criticism. Without his enthusiasm and

    intelligence this work would not have been possible.

    I would also like to express my grateful thanks to Prof. Samar Bhattacharya, Director of School

    of Education Technology, for his support, encouragement and timely advices. I am really

    indebted to Prof. Pramatha Nath Basu, Dr. Ranjan Parekh, Dr.Matangini Chattopadhyay,

    Mrs. Saswati Mukherjee for their continuous support during the entire course of the project.

    Their advice and support was inspirational and motivational.

    There are a lot of people who contributed towards the completion of the project and I am really

    thankful to all of them.I do wish to Thank to all of my classmates of M. Tech. IT (Courseware

    Engineering) and MMD department, who inspired and motivated me to complete my project

    work successfully, departmental support staff and all of these who were associated with this

    project contributed in some form or the other.

    Lastly, most important I would like to thank my parents. Without love, patience, support, and joythat they have provided, I would be unable to complete this project.

    Date:

    Place: Jadavpur, Kolkata ________________________________

    Swati MukherjeeRoll No-000811902003

    M.Tech IT (Courseware Engineering)

    School of Education TechnologyJadavpur University

    Kolkata - 700032

  • 7/26/2019 Acc. No. DC 443.pdf

    6/77

    School Of Education Technology, Jadavpur University 1

    CONTENTS

    Executive Summery.3

    Chapter 1: Introduction..4

    1.1 Problem Statement ...7

    1.2 Brief of Problem to be Solved...7

    1.3 Objectives..7

    1.4 Assumptions..7

    1.5 Organization of the Thesis.. .8

    Chapter 2: Literature Survey ....9

    Chapter 3: Concept & Problem Analysis....17

    3.1Digital Image Processing...17

    3.2 Bengali Script Overview...17

    3.2.1 Properties of Bengali Script19

    3.3Character Recognition...22

    3.3.1 Online Character Recognition.22

    3.3.2 Offline Character Recognition23

    3.4Optical Character Recognition (OCR)......23

    3.4.1Data Acquisition..23

    3.4.2Binarization..25

    3.4.3 Noise Removal26

    3.4.4 Skeletonization....26

    3.4.5 Skew detection & Correction......26

    3.4.6 Segmentation...27

    3.4.7 Feature Extraction...283.4.8 Classification...29

    3.5 Problem Analysis..29

  • 7/26/2019 Acc. No. DC 443.pdf

    7/77

    School Of Education Technology, Jadavpur University 2

    Chapter 4: Design & Implementation.31

    4.1Block Diagrams..............................................................................................................................32

    4.1.1 Block diagram of Handwritten Bengali character recognition system.................................32

    4.1.2 Block diagram of proposed handwritten Bengali character recognition system..................33

    4.2Algorithms.....................................................................................................................................35

    4.2.1Algorithm1. Shadow based feature extraction technique......................................................35

    4.2.2Algorithm2.Diagonal-distance feature extraction technique36

    4.2.3Algorithm3. Shadow feature extraction technique37

    4.2.4Algorithm4. Centroid feature extraction technique...38

    4.2.5Algorithm5. Longest-run feature extraction technique.39

    Chapter 5: Results and Interpretations.....44

    Chapter 6: Conclusion and Future Scope...48

    6.1 Conclusion.48

    6.2 Future scope..48

    Chapter 7: References...49

    AppendixI Codes of the Project.......53AppendixII Output of the Project.......70

  • 7/26/2019 Acc. No. DC 443.pdf

    8/77

    School Of Education Technology, Jadavpur University 3

    Executive Summary .

    This thesis proposes two new approaches for extracting features in context of Handwritten Bengali

    character recognition. First approach is to compute shadow based features where each character image

    is enclosed within a minimal square, divided into four quadrants. Each quadrant is further divided into

    eight octants. Then lengths of projections of character images on three sides of each octant are then

    computed. Lengths of all such projections on each of the 3x8=24x4 sides of all octants are summed up

    to produce 24x4=96 shadow based features of the character image are obtained. The second approach

    is to compute the Diagonal Distance features from four corners of the minimal square containing the

    character image. Here a set of 4 features of each character image are obtained. Thus a summation ofall features of each character image, 100 features are obtained to feed to the Neural Network to

    classify properly.

  • 7/26/2019 Acc. No. DC 443.pdf

    9/77

    School Of Education Technology, Jadavpur University 4

    CHAPTER 1 INTRODUCTION

    Handwritten Character recognition has attracted voluminous research in recent times and received

    extensive attention in academic and production fields. It is important area in image processing and

    pattern recognition. India is a multi-lingual and multi-script country, where eighteen official scripts are

    accepted and have over hundred regional languages.

    Today, many researchers have been done to recognize Bengali characters. But the problem of

    interchanging data between human beings and computing machines is a challenging one. Even today,

    many algorithms have been proposed by many researchers so-that these Bengali characters can be

    easily recognize. But the efficiency of these algorithms is not satisfactory.

    Mainly, users do Handwritten Character Recognition for interpretation of data, which describes

    handwritten drawing. Handwritten character recognition can be differentiated into two categories i.e.

    Online Handwritten character recognition and Offline Handwritten character recognition. On-line

    handwritten character recognition deals with automatic conversion of characters, which are written on

    a special digitizer, tablet PC or PDA where a sensor picks up the pen-tip movements as well as pen-

    up/pen-down switching. Off-line handwritten character recognition deals with a data set, which is

    obtained from a scanned handwritten document. The main objective of handwritten Bengali character

    recognition (HBCR) is to recognize the Bengali characters in desirable format from image format so

    that they can be easily edited.

    Many researchers have been done to solve handwritten character recognition problem in related areas

    such as Image Processing, Pattern Recognition, Artificial Intelligence, and cognitive science etc.

    Further researches are being done to improve accuracy and efficiency. Recognition of Offline

    Handwritten Bengali characters is a goal of many research efforts in the pattern recognition field.

    Many techniques have been applied for recognition of handwritten Bengali characters but still it is the

    case of less efficiency and accuracy of recognition.

    Artificial Intelligence concepts like neural networks are used to perform the work as human mind can

    do. This explores the idea of how humans recognize text in general and are used to develop machines

    that simulated this process. Developing these intelligent machines for recognizing characters is not an

    easy task; this is because a character can be written in different ways. Also there are so many

    imperfections and variation of handwriting such as alignment, noise and angles, which make

    handwritten character recognition difficult to implement with a machine. All these imperfections of

  • 7/26/2019 Acc. No. DC 443.pdf

    10/77

    School Of Education Technology, Jadavpur University 5

    handwritten characters cannot be removed easily, so this problem is separated in sub- problems. This

    means that a single process or single machine is not capable of performing the entire process. It can be

    done by a series of processes that return some desirable result. Then a final process will combine the

    results from all the sub-process to produce a final result. For recognition of handwritten characters,

    some sub-processes are followed i.e. scanning a document, pre-processing, feature extraction,

    Classification etc. The output of previous process is used as input in next process.

    For example, the first sub-process i.e. scanning of document scans the information and produces some

    output that is taken by next sub-process i.e. preprocessing which eliminates all the noise such as ink

    spots that have no meaning, binarization, skew correction ,slant removal can be done to the document.

    Then next sub-process extracts all the features of characters and produces the pixels according to

    feature of character. Then output of this process is used to train the neural network and produces thefinal result. Thus, recognition of handwritten characters is not a single process; it is the combination of

    many processes such as scanning of characters called as digitization, pre-processing, segmentation,

    feature extraction, classification and post-processing. By the combination of these processes, the

    desired output is obtained.

    For recognition of handwritten characters, HBCR machine depends on learning process in which back

    propagation algorithm takes input from user. In this learning process, training and testing of characters

    is done. A library is made in which the information of text segments is stored which are used for future

    comparisons. This library helps in acceptance and rejection of characters. For example: Character is

    written 50 times in library in which 40 fonts are used for training of neural network and rest are used

    for testing the network. The importance of neural networks has grown dramatically during the last

    fifteen years. A large number of universities and companies are using neural networks and products

    based on neural network are available in market.

    Neural network works as human brain, thus the architecture of neural network machine is same as the

    architecture of human brain. There are hundreds or even thousands of neurons in custom integrated

    circuits. In conjunction, the growing interest in learning machines, non-linear dynamics and parallel

    computation spurred renewed attention in artificial neural networks. There are so many real world

    applications such as pattern recognition, system identification, noise removal etc. in which neural

    network is extensively applied. There are also positive results when it is used in character recognition.

  • 7/26/2019 Acc. No. DC 443.pdf

    11/77

    School Of Education Technology, Jadavpur University 6

    Many non-Indian and Indian scripts are recognized accurately and efficiently with the help of neural

    networks.

    There are too many applications, which can be solved easily using neural networks that are difficult to

    solve using traditional methods. A neural network is consisted of three layers i.e. input layer, hidden

    layer and the output layer. Each layer consists of small-interconnected processing units. These units

    are interconnected with each other via a weighted link. Every unit has individual function but the

    combination of these units display complex behaviors. A neural network is a massively parallel-

    distributed processor that has a natural propensity for storing experimental knowledge and making it

    available for use. Neural network behaves like human brain. Neural network acquires knowledge as

    human brain acquires knowledge from learning process. Neural network has many advantages over

    traditional systems. For example: - It is insensible to noise and easier to handle, because it involvesless human work than other traditional statistical analysis. Neural network can solve problems that do

    not have an algorithmic solution or problems whose algorithmic solutions are too complex to find. It

    has fewer errors because it can respond to anything and small changes in the input normally do not

    cause a change in the output. This behavior of neural network shows its importance.

    In the literature survey includes about Indian language scripts as well as

    Bengali script and also discussed the previous work on handwritten Bengali character recognition.

    Different types of approaches and algorithm related to OCR and classification based on MLP related

    to this topic are also discussed.

  • 7/26/2019 Acc. No. DC 443.pdf

    12/77

    School Of Education Technology, Jadavpur University 7

    1.1Problem Statement

    Design of an enhanced technique for recognition of handwritten bengali character based on character

    features.

    1.2 Brief of Problem to be solved

    Recognition of handwritten Bengali character is a process which loads a handwritten Bengali character

    image, preprocesses the image, extracts proper image features, classify the characters based on the

    extracted image features and the known features are stored in the image model library, and recognizes

    the image according to the degree of similarity between the loaded image and the image models. Here

    MLP based classifier is used to recognize handwritten Bengali character properly.

    1.3 Objectives

    The present work has the following objectives

    i. Design an OCR system for recognizing Handwritten Bengali character based on character

    feature.

    ii. Different types of features are extracted from a character image.

    iii. Proper recognition of Handwritten Bengali character.

    1.4 Assumptions

    Image preprocessing involves the following steps are assumed.

    (i) The input image should contain only segmented handwritten Bengali character .Character

    Extraction from a scanned document.

    (ii) Skew detection & correction

    (iii) Background noise removal

    (iv) Skeletonization

    This thesis is assumed that the input image is available after undergoing all the process. These can be

    incorporated into thesis.

  • 7/26/2019 Acc. No. DC 443.pdf

    13/77

    School Of Education Technology, Jadavpur University 8

    1.5Organization of Thesis

    The first Chapter introduces the project work and it covers Problem statement, objective,

    assumptions & scope of the project.

    The second Chapter includes the Literature Survey of the project.

    The third Chapter describes the concepts involved and problem analysis of the work.

    The fourth Chapter includes the detail description of implementation with block diagrams of the

    project.

    Result & Interpretation are discussed in Chapter five.

    Conclusion and future scope of the work has been included in the Chapter six.

    Chapter seven contains references/ bibliography of the project.

    The Appendix I contains the codes.

    The Appendix II contains the sample output of the project.

  • 7/26/2019 Acc. No. DC 443.pdf

    14/77

    School Of Education Technology, Jadavpur University 9

    CHAPTER 2 LITERATURE SURVEY

    Indian language scripts are fundamentally non-cursive in nature, where the aksharas (characters) are

    written independently, separated by space or pen-lifts. However, these scripts often contain a large

    number of characters that have complex spatial layout of strokes. Indian scripts have compound

    characters, which are combinations of multiple consonants and vowels. The handwriting synthesis

    process should hence model all the possible variations of characters and their combinations to be able

    to generate any given text. This makes the problem of synthesis; extremely complex in the case of

    Indian language scripts. There are many other properties of the Indian scripts that are not seen in

    Roman[40].

    Bangali, the second most popular language in India and the fifth most popular language in the world,

    is an ancient Indo-Aryans language. Bangali is one of the most widely spoken languages in the

    world.More than 200 million people in the eastern part of Indian subcontinent speak in this language.

    Bangali script alphabet is used in texts of Bangali, Assamese and Manipuri languages. Bangali is a

    very rich and old language; the matter of regret is its computerization has not yet gone much far. In

    fact, dedicated research and development for Bangali computerization has just been started from the

    last decade.Bangali scripts are moderately complex patterns. Unlike simple juxtaposition in Roman

    scripts, each word in Bangali scripts is composed of several characters joined by a horizontal line

    (called Maatra or head-line) at the top [26]. Often there may be different composite characters and

    vowel and consonant signs (Kaar and Falaa symbols)[27-28]. Among the characters, the vowels

    often take modified shapes in a word. Such characters are called modifiers or allographs (in Bangla

    Kaar).Consonant modifiers are possible (calledFalaa). In a single syllable of a word, several

    consonant characters may combine to form a compound character that partly retains the shape of the

    constituent characters (e.g. + Da, Ka + Ta, Va + Ra-falaa, Na +Daa + Ra-falaa) [27-29]. Each syllable

    in a Bengali word can be divided into three horizontal layers [41]. All the basic alphabets, compound

    characters and numerals have almost same width whereas the modifiers and punctuations vary in their

    width and height. Most of the characters of Bengali alphabet set have the property of intersection of

    two lines in different positions. Many characters have one or more corner or sharp angle property.

    Some characters carry isolated dot along with them [30].

  • 7/26/2019 Acc. No. DC 443.pdf

    15/77

    School Of Education Technology, Jadavpur University 10

    Character recognition is a process, which associates a symbolic meaning with object (letters, symbols

    and numbers) drawn on an image. It may be classified as offline and online. In case of online character

    recognition, there is real time recognition of characters. Offline character recognition, the

    typewritten/handwritten character is typically scanned in form of a paper document and made

    available in the form of a binary or gray scale image to the recognition algorithm. The major

    difference between Online and Offline Character Recognition is that Online Character Recognition has

    real time contextual information but offline data does not [31-33].

    Optical Character Recognition (OCR) is still an active area of research, especially for handwritten

    text. Success of the commercially available OCR system is yet to be extended to handwritten text. It is

    mainly due to the fact that numerous variations in writing styles of individuals make recognition of

    handwritten characters difficult. Past work on OCR of handwritten alphabet and numerals has been

    mostly found to concentrate on Roman script [24], related to English and some European languages,

    and scripts related to Asian languages like Chinese[25], Korean, and Japanese. Among Indian scripts,

    Devnagri, Tamil, Oriya and Bengali have started to receive attention for OCR related research in the

    recent years. Out of these, Bengali is the second most popular script and language in the Indian

    subcontinent and the fifth most popular language in the world. As a script, it is used for Bengali,

    Ahamia and Manipuri languages. Bengali, which is also the national language of Bangladesh, is the

    fifth most popular language in the world. So is the importance of Bengali both as a script and as alanguage. But evidences of research on OCR of handwritten Bengali characters, as observed in the

    literature, are a few in numbers. Not only because of numerous variation of writing styles of different

    individuals but also for the complex nature of Bengali alphabet, automatic recognition of handwritten

    Bengali characters still poses some potential problems to the researchers. Compared to Roman

    alphabet, basic Bengali alphabet consists of a much larger number of characters. The number of

    characters in basic Bengali alphabet is 50. And some characters therein resemble pair wise so closely

    that the only sign of small difference left between them is a period or a small line.

    OCR is one of the oldest ideas in the history of pattern recognition using computers. In recent time,

    Bengali character recognition becomes the field of practical usage. In character recognition, the

    process starts with reading of a scanned image of a series of characters, determines their meaning, and

    finally translates the image to a computer written text document.

  • 7/26/2019 Acc. No. DC 443.pdf

    16/77

    School Of Education Technology, Jadavpur University 11

    Many researches have been done on character recognition in last 56 years. Some books [1-3] and

    many surveys [4, 5] have been published on the character recognition. Most of the work on character

    recognition has been done on Japanese, Latin, Chinese characters in the middle of 1960s.

    Preprocessing operations include binarization, contour smoothing, noise reduction, skew detection of a

    digital image so that subsequent algorithms along the road to final classification can be made simple

    and more accurate. Reference [6] presents a good work on preprocessing and segmentation .Here pre-

    processing stage consists of 4 steps - compression, skew correction, binarization, noise removal. In

    this paper the nearest neighbor interpolation method is used for scaling down the original image for

    fast processing and accurate results.

    During pre-processing the input RGB image in converted to gray scale image.[7] consider the OTHUs

    algorithm for gray scale conversion with good flexibility. In this paper the OTSU methods is used for

    gray scale to binary image conversion. The principal idea is to convert images of text documents such

    as those obtained from scanning a document into editable texts. This report does not address the pre-

    processing steps such as skew correction and noise reduction, so the documents are assumed to pre-

    process by another tool in the pipeline. For training and recognition, the input is then first converted to

    a binary image, and then into to a 25x25 pixel2 image; the only feature extracted from the images is a

    625-bit long vector, which is then trained or classified using a Kohonen neural network. The OCR

    shows excellent performance for documents with single typeface. The work in progress is extending it

    to handle multiple typefaces. 98% character recognition accuracy is reported.

    The work of J.U. Mahmud, Md. F. Raihan and C. M Rahman [8] is concerned with a complete optical

    character recognition (OCR) system for Bengali character. Recognition is done for both isolated and

    continuous printed multi font Bengali characters. Pre-processing steps includes segmentation in

    various levels, noise removal and scaling. Free man chain code has been calculated from scaled

    character which is further processed to obtain a discriminating set of feature vectors for the recognizer.

    The unknown samples are classified using feed forward neural network based recognition scheme. Ithas been found from experimental results that success rate is approximately 98% for isolated

    characters and 96% for continuous character.

    Segmentation is an operation that seeks to decompose an image of sequence of characters into sub

    images of individual symbols. Character segmentation is a key requirement that determines the utility

  • 7/26/2019 Acc. No. DC 443.pdf

    17/77

    School Of Education Technology, Jadavpur University 12

    of conventional Character Recognition systems. It includes line, word and character segmentation.

    Character segmentation is a necessary preprocessing step for character recognition in many

    handwritten word recognition systems. Dipankar Das and Rubaiyat yashmin shows [9] the projection

    based heuristic technique for segmenting the Bengali handwritten numerals. The results, based on this

    approach are quite satisfactory for the next classifier stage. In this approach the character matrices

    from each numerals are extracted, normalized then passed through an ANN classifier for classification.

    It is observed that the accuracy level of this approach is 100%.

    A fuzzy technique for segmentation of handwritten Bengali word images is presented in [10]. It works

    in two steps. In first step, the black pixels constituting the Matra (i.e., the longest horizontal line

    joining the tops of individual characters of a Bengali word) in the target word image is identified by

    using a fuzzy feature. In second step, some of the black pixels on the Matra are identified as segment

    points (i.e., the points through which the word is to be segmented) by using three fuzzy features. On

    experimentation with a set of 210 samples of handwritten Bengali words, collected from different

    sources, the average success rate of the technique is shown to be

    95.32%.

    Segmentation work [11] based on certain characteristics of Bengali handwriting methods; different

    zones across the height of the word are detected. These zones provide certain structural information

    about the constituent characters of the respective word. In Bengali handwritten texts often there is

    overlap between rectangular hulls of successive characters, as such the characters are seldom vertically

    separable. This method of recursive contour following in one of the zones across the height of the

    word is used to find out the extents within which the main portion of the character lies. If the

    successive characters are not touching in the zone of contour following, the algorithm gives fairly

    good results. Another good work on segmentation for Bengali handwritten characters using

    superimposed matrices[12].In this system, the Bengali text, accepted as an image file, is first

    segmented into lines and words and then each word is segmented into characters. Then the boundary

    of each character is determined. The characters are scaled to a standard size using an image scaling

    algorithm and are stored in a 32X32 matrix. This matrix is then compared with a knowledge base

    where all recognized characters given by various persons are stored in superimposed form. Finally,

    depending on the similarity of the character with the stored one, the system recognizes the character to

  • 7/26/2019 Acc. No. DC 443.pdf

    18/77

    School Of Education Technology, Jadavpur University 13

    use in the output. This system is suitable to convert handwritten texts into printed documents and the

    system achieves 100% accuracy.

    After pre-processing and segmentation of Bengali handwritten document, features of the characters are

    extracted. This step is heart of the system. This step helps in classifying the characters based on their

    features. In fact, the variation depends on font styles, document noise, photometric effect, document

    skew and poor image quality. The large variation in shapes makes it difficult to determine the number

    of features that are convenient prior to model building. Though many kinds of features have been

    developed and their test performances on standard database have been reported to classify and

    recognize the character. Bengali is the second most popular script and language in the Indian

    subcontinent and the fifth most popular language in the world. The work presented by S. Basu et al.

    [13] involves the design of a Multi Layer Perceptron (MLP) based classifier for recognition of

    handwritten Bengali alphabet using a 76 element feature set. The feature set developed for

    representing handwritten characters of Bengali alphabet includes 24 shadow features, 16 centroid

    features and 36 longest-run features. Recognition performances of the MLP designed to work with this

    feature set are experimentally observed as 86.46% and 75.05% on the samples of the training and the

    test sets respectively. The work has useful application in the development of a complete OCR system

    for handwritten Bengali text. Some pixel-based and shape-based features are chosen for the purpose of

    recognition of both printed and handwritten Bengali numerals [14]. Such mixed numerals may appear

    in documents like application forms, postal mail, bank checks etc. The pixel-based features are

    normalized pixel density over 4 X 4 blocks in which the numeral bounding-box is partitioned. The

    shape-based features are normalized position of holes, end-points, intersections and radius of curvature

    of strokes found in each block. Multi-layer neural network architecture was chosen as classifier of the

    mixed class of handwritten and printed numerals. For the mixture of twenty three different fonts of

    printed numerals of various sizes and 10,500 handwritten numerals, an overall recognition accuracy of

    97.2% has been achieved.

    In [15] Zone centroid and Image centroid based Distance metric feature extraction is proposed. The

    character centroid is computed and is further divided in to n equal zones. Average distance from the

    character centroid to the each pixel present in the zone is computed. Similarly zone centroid is

    computed and average distance from the zone centroid to each pixel present in the zone is computed.

  • 7/26/2019 Acc. No. DC 443.pdf

    19/77

    School Of Education Technology, Jadavpur University 14

    This procedure is repeated for all the zones/grids/boxes present in the numeral image. There could be

    some zones that are empty, and then the value of that particular zone image value in the feature vector

    is zero. Finally 2*n such features are extracted. Nearest neighbor and Feed forward back propagation

    neural network classifiers are used for subsequent classification and recognition purpose. Oriented

    features in the word are extracted with the Gabor filters. In [16] it is estimated that the Gabor filter

    parameters form the grayscale images. After filtering the images and comparing with Bengali text

    images (sample file contains the fonts) the output text is created. The system achieves an average

    conversion rate of 65%for the writing being correctly classified within the top five positions. [17]

    deals with a recognition system for unconstrained off-line Bengali handwritten numerals. To take care

    of variability involved in the writing style of different individuals, a robust scheme is presented here.

    The scheme is mainly based on new features obtained from the concept of water overflow from thereservoir as well as topological and structural features of the numerals. The scheme is tested obtained

    an overall recognition accuracy of about 92.8% from 12000 data.

    A work on multi-stage character recognition system for an Indian script, namely, Bengali (also called

    Bengali) using fuzzy features and multilayer perceptron (MLP)is represented by Samik Surul[18].The

    fuzzy features are extracted from Hough transform of a character pattern pixels. First define a number

    of fuzzy sets on the Hough transform accumulator cells. The fuzzy sets are then combined by t-norms

    to generate feature vectors from each character. A set of fuzzy linguistic vectors is next generated from

    these feature vectors. The MLPs used for classification have the fuzzy features as inputs. The MLP

    outputs also represent the belongingness of an input pattern to different fuzzy character pattern classes.

    To improve the recognition accuracy of Bengali characters, divide all the patterns into three distinct

    sets. Each set of characters is once again divided into a number of mutually exclusive character pattern

    classes. During recognition, the class of each pattern is first determined, followed by recognition of the

    actual character within that class. Recognition accuracy of the system is more than 98%. Ray &

    Chatterjee [22] presented a recognition system based on a nearest neighbor classifier-employing

    feature extracted by using a string connectivity criterion. A complete OCR for printed Bengali is

    reported in the work by Chaudhuri & U Pal [23], in which a combination of template and feature-

    matching approach is used. A histogram-based thresholding approach is used to convert the image into

    binary images. For a clear document the histogram shows two prominent peaks corresponding to white

    and black regions. The threshold value is chosen as the midpoint of the two-histogram peaks. Skew

  • 7/26/2019 Acc. No. DC 443.pdf

    20/77

    School Of Education Technology, Jadavpur University 15

    angle is determined from the skew of the headline. Text lines are partitioned into three zones and the

    horizontal and vertical projection profiles are used to segment the text into lines, words, and

    characters. Primary grouping of characters into the basic, modified and compound characters is made

    before the actual classification. A few stroke features are used for this purpose along with a tree

    classifier where the decision at each node of the tree is taken on the basis of presence/absence of a

    particular feature. The compound character recognition is done in - two stages: In the first stage the

    characters are grouped into small sub-sets by the above tree classifier. At the second stage, characters

    in each group are recognized by a run-based template matching approach. Some character level

    statistics like individual character occurrence frequency, bigram and trigram statistics etc. are utilized

    to aid the recognition process. For single font, clear documents 99.10% character level recognition

    accuracy is reported. In[19]features are obtained by computing local chain code histograms of inputcharacter shape. Comparative recognition results are obtained between computation of the above

    feature based on the contour and one-pixel skeletal representations of the input character image. Also,

    the classification results are obtained after down sampling the histogram feature by applying Gaussian

    filter in both these cases. Multilayer perceptron (MLP) trained by back propagation (BP) algorithm are

    used as classifiers in the present study. Near exhaustive studies are done for selection of its hidden

    layer size. An analysis of the misclassified samples shows an interesting error pattern and this has been

    used for further improvement in the recognition results. Final recognition accuracies on the training

    and the test sets are respectively 94.65% and 92.14%.

    An Artificial Neural Network (ANN) is an information-processing paradigm that is inspired by the

    way biological nervous systems[39], such as the brain, process information. The key element of this

    paradigm is the novel structure of the information processing system. It is composed of a large number

    of highly interconnected processing elements (neurons) working in unison to solve specific problems.

    ANNs, like people, learn by example.

    An ANN is configured for a specific application, such as pattern recognition or data classification

    through a learning process. Learning in biological systems involves adjustments to the synaptic

    connections that exist between the neurons. This is true of ANNs as well. An Artificial Neural

    Network is a network of many very simple processors units, each possibly having a small amount of

    local memory. The units are connected by unidirectional communication channels connections,

  • 7/26/2019 Acc. No. DC 443.pdf

    21/77

    School Of Education Technology, Jadavpur University 16

    which carry numeric as opposed to symbolic data. The units operate only on their local data and on the

    inputs they receive via the connections.

    The work presented by Alessandro L. Koerich [20] tackles the problem of unconstrained handwritten

    character recognition using different classification strategies. For such an aim, He built four multilayer

    perceptron classifiers (MLP) and used into three different classification strategies: combination of two

    26class classifiers; a 26metaclass classifier and a 52class classifier. The Experimental results

    showed that better recognition performance is achieved by the metaclass classifier in which the

    uppercase and the lowercase representations of the characters are merged into single classes. The

    recognition rate for 52-class classifier ranges in between 62.98% and 96.66% where as for the

    metaclass classifier ranges in between 84.97 %and 98.96%.

    The work presented by Mirosaw Kordos et al. [21] describes a new algorithm named as variable step

    search algorithm which is based on a simple search procedure that changes one network parameter at a

    time. Visualization of learning trajectories and MLP error surfaces is used for the algorithm design and

    optimization. The algorithm is compared to three other MLP training algorithms: Levenberg-

    Marquardt (LM), scaled conjugate gradient (SCG), and training based on numerical gradient. It has

    been shown that the proposed variable step search algorithm is fast, can find very good solutions, does

    not require multistart and has low memory requirements. It is also very simple to program since it does

    not require calculation of derivatives and matrices, therefore it is quite surprising that in empirical tests

    it usually outperforms both LM and SCG.

  • 7/26/2019 Acc. No. DC 443.pdf

    22/77

    School Of Education Technology, Jadavpur University 17

    CHAPTER 3 CONCEPTS AND PROBLEM ANALYSIS

    3.1Digital Image ProcessingImages are the most common and convenient means of conveying or transmitting information. An

    Image is worth a thousand words it concisely conveys information about positions, sizes and inter-

    relationships between objects. They portray spatial information that we can recognize as objects.

    Human beings are good at deriving information from such images, because of our innate visual and

    mental abilities. About 75% of the information received by human is in pictorial form. Digital Image

    Processing encompasses processes whose inputs and outputs are images, and in addition, encompasses

    processes that extract attributes from images, up to and including the recognition of individual images.

    A simple illustration is the automated analysis of text. The processes of acquiring an image of the area

    containing the text, preprocessing the text, extracting (segmenting) the individual characters,

    describing the characters in a form suitable for computer processing, and recognizing the individual

    characters are in the scope of Digital Image Processing.

    Pattern Recognition in image processing encompasses several areas of research, viz., face recognition,

    signature recognition, text recognition, and fingerprint recognition. High accuracy text recognition or

    optical character recognition (OCR) is a challenging task for scripts of languages.

    3.2 Bengali Script Overview

    India is a multi-lingual and multi-script country comprising of eighteen official languages, namely

    Assamese, Bangla, English, Gujarati, Hindi,Kankanai, Kannada, Kashmiri, Malayalam,Marathi,

    Nepali, Oriya, Punjabi, Rajasthani,Sanskrit, Tamil, Telugu and Urdu are accepted and have over

    hundred regional languages.

    Bengali, the second most popular language in India and the fifth most popular language in the world,

    is an ancient Indo-Aryans language. Bengali is one of the most widely spoken languages in the world.

    More than 200 million people in the eastern part of Indian subcontinent speak in this language.

    Bengali script alphabet is used in texts of Bengali, Assamese and Manipuri languages. The Bengali is

    derived from the ancientBrahmi script through various transformations. Other Indian scripts also have

    the same origin, making many of them similar in shape.

  • 7/26/2019 Acc. No. DC 443.pdf

    23/77

    School Of Education Technology, Jadavpur University 18

    The primary alphabet of Bengali script is quite large compared to the alphabet sets of English and

    other western languages. The alphabet of the modern Bengali script consists of 11 vowels and 39

    consonants. These characters are called basic characters. The basic characters of Bengali script are

    shown in Fig.3.1. There are 10 numerals in Bengali script. These are shown in Fig.3.2.

    Fig. 3.1 Basic character in Bangla script. (The first 11 characters are vowels while

    Others are consonants.)

    Fig.3.2 Numerals in Bengali script.

  • 7/26/2019 Acc. No. DC 443.pdf

    24/77

    School Of Education Technology, Jadavpur University 19

    3.2.1 Properties of Bengali Script

    Writing style of Bengali is from left to right.

    The concept of upper and lower case (as in English) is absent here.

    each word in Bangali scripts is composed of several characters joined by a horizontal line

    (called Maatra or head-line) at the top.

    Except very few characters and symbols (e.g. Ae, Oy, O, Ow, Kha, Ga, Ungo, Nio etc), almost

    all Bengali alphabets and symbols have a horizontal line at the upper part called maatra Some

    are shown in Fig.3.3.The characters with maatra remain connected together through their

    maatra and other characters and symbols (e.g. Khondota, Bishorgo, Ungo, Ae, Oy etc) remain

    isolated in the word Some are shown in Fig.3.4.

    Figure3.3.Some alphabets with maatra Figure3.4: Some alphabets without maatra

    The vowel A ( ) following a consonant character is never printed in a word. Thus,

    A( ) can occur only at the beginning of the word.

  • 7/26/2019 Acc. No. DC 443.pdf

    25/77

    School Of Education Technology, Jadavpur University 20

    Fig 3.5(a)Modified vowel.Fig 3.5(b) vowels may take different modified shapes

    Fig. 3.5(c)consonant modifier

    In Fig. 3.5(a) modified vowel shapes and their attachment with a consonant character is shown. If the

    first character of the word is a vowel then it retains its basicshape. For two consecutive vowels in a

    word, the second one also retains its basicshape. Some vowels may take different modified shapes

    when attached to some consonant characters. They also change the shape of some consonant

    characters to which they are attached (see Fig. 3.5(b)).

  • 7/26/2019 Acc. No. DC 443.pdf

    26/77

    School Of Education Technology, Jadavpur University 21

    In some cases a consonant following (proceeding) a consonant is represented by a modifier called

    consonant modifier(eg-raphala, japhala). It is shown in Fig. 3.5(c)

    Fig. 3.6. A set of 90 compound characters

    Sometimes a consonant or vowel following a consonant forms a different shape character. This

    character is called compound character. Compound characters can be combinations of two consonants

    as well as a consonant and a vowel. Combination of three or four characters also exists in the Bengali

    script. To get an idea about Bengali compound characters some examples of compound characters

    formed by two and three characters are shown in Fig-3.6. Because of modified and compound

    characters in total there are about 300 characters in Bengali.

    As compared to Roman, the font and style variations in Bengaliscript are few. Popular font for mass

    printing media is inotype. Recently, some fonts are proposed for desk top publication (DTP) using PC,

    but none of them popular. The size of characters in most Bengalidocuments ranges between 8 and 16

    points of which 12 point is most popular. Among style variations, occasionally bold, expanded and

    rarely italicized style are used.

  • 7/26/2019 Acc. No. DC 443.pdf

    27/77

    School Of Education Technology, Jadavpur University 22

    3.3 Character Recognition

    Character recognition is a process, which associates a symbolic meaning with object (letters, symbols

    and numbers) drawn on an image, i.e., character recognition techniques associate a symbolic identity

    with the image of a character. Mainly, character recognition machine takes the raw data that further

    implements the process of preprocessing of any recognition system. On the basis of that data

    acquisition process, character recognition system can be classified into following categories shown in

    Fig3.7.

    Fig3.7. Classification of Character Recognition

    3.3.1 Online Character Recognition

    In case of online character recognition, there is real time recognition of characters. Online systems

    obtain the position of the pen as a function of time directly from the interface. Online handwrittencharacter recognition, the handwriting is captured and stored in digital form via different means.

    Usually, a special pen is used in conjunction with an electronic surface. As the pen moves across the

    surface, the two- dimensional coordinates of successive points are represented as a function of time

    Character

    Recognition

    Offline Character

    Recognition

    Magnetic Character

    Recognition

    Optical Character

    Recognition

    HandwrittenCharacter

    Recognition

    PrintedCharacter

    Recognition

    Online Character

    Recognition

    Optical Character

    Recognition

    HandwrittenCharacter

    Recognition

    PrintedCharacter

    Recognition

  • 7/26/2019 Acc. No. DC 443.pdf

    28/77

    School Of Education Technology, Jadavpur University 23

    and are stored in order [24]. It is generally accepted that the on-line method of recognizing

    handwritten text has achieved better results than its off-line counterpart.

    3.3.2 Offline Character Recognition

    In case of Offline character recognition, the typewritten/handwritten character is typically scanned in

    form of a paper document and made available in the form of a binary or gray scale image to the

    recognition algorithm. Offline character recognition is a more challenging and difficult task as there is

    no control over the medium and instrument used. The artifacts of the complex interaction between the

    instrument medium and subsequent operations such as scanning and binarization present additional

    challenges to the algorithm for the offline character recognition.

    3.4 Optical Character Recognition (OCR)

    The Optical Character Recognition is a process of automatic recognition of different characters from a

    document image and also provides a full alphanumeric recognition of printed or handwritten

    characters, text, numerals, letters and symbols into a computer process able format such as ASCII. At

    electronic speed by simply scanning the form. The process involves clear and unambiguous

    recognition, analysis and understanding of the document content.OCR is an area of pattern recognition

    and processing of handwritten character is motivated largely by desire to improve man and machine

    communication.OCR of Indian scripts is in preliminary stage. Much of the research work has been

    done for developing OCR systems in Roman scripts. Compared to this; extensive research and

    development activities are required for developing OCR systems for Indian scripts. OCR involves

    photo scanning of the text, which converts the paper document into an image, and then translation of

    the text image into character codes such as ASCII.Cheque reading, postcode recognition, form

    processing, signature verification are the application of OCR.

    3.4.1 Data Acquisition

    The input images are acquired from documents containing Bengali text by using scanner as an input

    device. Scanned images are then stored in some picture file such as BMP, JPG etc.

    After data acquisition, the major steps involved in OCR are Preprocessing Segmentation and

    Recognition. The block diagram of OCR system is shown in Fig.3.8.

  • 7/26/2019 Acc. No. DC 443.pdf

    29/77

    School Of Education Technology, Jadavpur University 24

    Data Acquisition

    Pre-Processing

    Segmentation

    Recognition

    Fig.3.8.The block diagram of OCR system

    Line Segmentation

    Word Segmentation

    Character Segmentation

    Scanned Document

    Binarization

    Noise Removal

    Skeletonization

    Skew Detection & Correction

    Feature Extraction

    Classification

  • 7/26/2019 Acc. No. DC 443.pdf

    30/77

    School Of Education Technology, Jadavpur University 25

    Preprocessing involves the following stages:

    Binarization,

    Noise removing,

    Skeletonization

    Skew detection and correction.

    Segmentation involves the following stages:

    Line Segmentation,

    Word Segmentation,

    Character Segmentation

    Recognition involves the following stages:

    Feature extraction,

    Classification.

    3.4.2 Binarization

    In the pre-processing 1st stage is to convert the input RGB image into gray scale image. Binarization

    is the process of converting a gray scale image (0 to 255 pixel values) into binary image (0 and 1 pixel

    values) by selecting a global threshold that separates the foreground from background. Each pixel is

    compared with the threshold and if it is greater than the threshold it is made 1 or else 0.Binarization is

    usually reported to be performed either globally or locally. Global methods apply one intensity value

    to the entire image The histogram of gray scale values of a document image typically consists of two

    peaks: a high peak corresponding to the white background and a smaller peak corresponding to the

    foreground. So the task of determining the threshold gray-scale value is one of determining as optimal

    value in the valley between the two peaks. Local or adaptive thresholding methods apply different

    intensity values to different regions of the image. These threshold values are determined by the

    neighborhood of the pixel to which the thresholding is being applied. There are several binarization

    techniques exist [42]. Among them Otsu, Savala are popularly used.

  • 7/26/2019 Acc. No. DC 443.pdf

    31/77

    School Of Education Technology, Jadavpur University 26

    3.4.3 Noise removal:

    The noise introduced during scanning or due to page quality has to be cleared before further

    processing. It is necessary to filter this noise before process the image. The commonly used approach

    is to low-pass filter the image and to use it for later processing. The objective in the design of a filter

    to reduce noise is that it should remove as much of the noise as possible while retaining the entire

    signal.

    3.4.4 Skeletonization

    Skeletonization is also called thinning. Skeletonization refers to the process of reducing the width of aline like object from many pixels wide to just single pixel. This process can remove irregularities in

    letters and in turn, makes the recognition algorithm simpler because they only have to operate on a

    character stroke, which is only one pixel wide. It also reduces the memory space required for storing

    the information about the input characters and no doubt, this process reduces the processing time too.

    3.4.5 Skew Detection & Correction

    Skew Detection refers to the tilt in the bitmapped image of the scanned paper for OCR. It is usually

    caused if the paper is not fed straight into the scanner. A few degrees of skew (tilt) unavoidable. Skew

    angle is the angle that the lines of the text in the digital image make with the horizontal direction.

    There exist many techniques for skew estimation. One skew estimation technique is based on the

    projection profile of the document; another class of approach is based on nearest neighbour clustering

    of connected components [44][45]. Techniques based on the Hough transform and Fourier transform

    are also employed for skew estimation. The image before skew correction is shown in Fig. 3.8.and

    image after skew correction is shown in Fig. 3.9.

  • 7/26/2019 Acc. No. DC 443.pdf

    32/77

    School Of Education Technology, Jadavpur University 27

    The image before skew correction is shown in Fig. 3.8.The image after skew correction is

    shown in Fig. 3.9.

    3.4.6 Segmentation

    It is an operation that seeks to decompose an image of sequence of characters into sub images of

    individual symbols. Character segmentation is a key requirement that determines the utility of

    conventional Character Recognition systems. It includes line, word and character segmentation.

    Different methods used can be classified based on the type of text and strategy being followed

    like recognition-based segmentation and cut classification method[41].

    Line segmentation

    In a Bangla printed script, the text lines are almost of same height, provided that the script is

    written in a specific font size. If the script is composed by a type-machine, surely the font sizewill be uniform everywhere. Between two text lines, there is a narrow horizontal band with

    either no pixel or very few pixels. Hence, applying horizontal projection profile (HPP) and

    detecting the valleys in it, text line bands can be retrieved [34-37].

  • 7/26/2019 Acc. No. DC 443.pdf

    33/77

    School Of Education Technology, Jadavpur University 28

    Word segmentation

    From the extracted text lines, words get separated. Usually, applying vertical projection profile

    (VPP) and detecting some specific threshold exceeding horizontal gaps, words are separated

    from a text line [34-36]. Computer composed scripts may contain different font sizes and

    different styles (i.e. bold, italic etc) and adversely affect the threshold value for identifying

    isolated words. Hence, identifying an effective threshold value is very difficult. It may change

    twice or more even a single text line. On the other hard, since the style of type-machine

    composed scripts is very specific, it is much easier to calculate the threshold value of the gap

    between two consecutive words in a line.

    Character segmentation

    Segmentation of characters from the isolated words is the most challenging part of the script

    segmentation phase [34-36]. Since, in computer composed scripts some characters in a container

    word may partially overlap with one another, it becomes very difficult to isolate those characters

    properly. Especially the modifiers (both vowels and consonants) most of the time coincide with

    the modifying characters. These kinds of non-trivial combinations of characters make the whole

    process of character segmentation extremely challenging. Besides, some symbols, like Chandra-

    Bindu, often come between two consecutive characters in a word; then isolating those becomes a

    tough job. This problem can be overcome by applying contour tracing mechanism [38] or by

    implementing greedy search technique [34] for letter segmentation.

    3.4.6 Feature Extraction

    The segmented Bangla characters are converted into a real valued vector called feature form of

    0s and 1s that characterizes the essential information content of the pattern. Each character has

    some features, which play an important role in pattern recognition. Handwritten Bengali

    characters have many particular features. Feature extraction describes the relevant shape

    information contained in a pattern so that the task of classifying the pattern is made easy by a

    formal procedure. Feature extraction stage in OCR system analyses these character segment and

    selects a set of features that can be used to uniquely identify that character segment. Mainly, this

    stage is heart of OCR system because output depends on these features. Feature extraction is the

    name given to a family of procedures for measuring the relevant shape information contained in

  • 7/26/2019 Acc. No. DC 443.pdf

    34/77

    School Of Education Technology, Jadavpur University 29

    a pattern so that the task of classifying the pattern is made easy by a formal procedure. Among

    the different design issues involved in building a recognizing system, perhaps the most

    significant one is the selection of set of features.

    3.4.8 Classification

    Classification stage is the main decision making stage of the system and uses the features

    extracted in the previous stage to identify the text segment according to preset rules.

    Classification is concerned with making decisions concerning the class membership of a pattern

    in question. The task in any given situation is to design a decision rule that is easy to compute

    and will minimize the probability of misclassification relative to the power of feature extraction

    scheme employed. Patterns are thus transformed by feature extraction process into points in d

    dimensional feature space. A pattern class can then be represented by a region or sub-space of

    the feature space. Classification then becomes a problem of determining the region of feature

    space in which an unknown pattern falls.

    3.5 Problem Analysis

    This thesis deals with recognition of handwritten Bengali character based on character features.

    That means recognition of a given input character has been done by extracting some different

    features from that input character. To recognize handwritten Bengali character, the input images

    are acquired from documents containing Bengali text by using scanner as an input device.

    Scanned images are then stored in some picture file such as BMP, JPG etc.This image

    subsequently passes through preprocessing, segmentation, feature extraction and classification

    steps.

    This thesis proposes two new approaches for extracting features in context of HandwrittenBengali character recognition. First approach is to compute shadow based feature extraction

    algorithm where each character image is enclosed within a minimal square, divided into four

    quadrants. Each quadrant is further divided into eight octants. Then lengths of projections of

    character images on three sides of each octant are then computed. Lengths of all such projections

    on each of the 3x8=24x4 sides of all octants are summed up to produce 24x4=96 shadow based

  • 7/26/2019 Acc. No. DC 443.pdf

    35/77

    School Of Education Technology, Jadavpur University 30

    features of the character image are obtained. The second approach is to compute the Diagonal

    Distance features from four corners of the minimal square containing the character image. Here a

    set of 4 features of each character image are obtained. The features are computed from 64x64

    pixel size binary images of alphabetic characters. This feature set is the input of MLP based

    classifier to classify the given input character.

    Classification consists of two phases training phase and testing phase. Here MLP based

    classifier is used to recognize handwritten Bengali character. An MLP consists of one input

    layer, one output layerand a number of hiddenor intermediate layers. Here 35 different training

    sets, each of which consists of 15 alphabetic character samples are used for training and other 5

    different alphabetic character samples of each character are used for testing phase.

  • 7/26/2019 Acc. No. DC 443.pdf

    36/77

    School Of Education Technology, Jadavpur University 31

    CHAPTER 4 DESIGN & IMPLEMENTATION

    Handwritten Bengali Character recognition is a system which loads a handwritten Bengali

    character image, preprocesses the image, extracts proper image features, classify the characters

    based on the extracted image features and the known features are stored in the image model

    library, and recognizes the image according to the degree of similarity between the loaded image

    and the image models. To recognize handwritten Bengali character firstly, the input images are

    acquired from documents containing Bengali text by using scanner as an input device. Scanned

    images are then stored in some picture file such as BMP, JPG etc. This image subsequently

    passes through preprocessing, segmentation, feature extraction and classification steps.

    Preprocessing operations include image processing, binarization, contour smoothing, noise

    reduction, skew detection & correction, and skeletonization of a digital image so that subsequent

    algorithms along the road to final classification can be made simple and more accurate.

    Segmentation includes line segmentation-extract lines from a paragraph, word segmentation-

    extract word from a line, and character segmentation-extract character from a word. After

    completing preprocessing and segmentation some features are extracted from the character

    image. Various feature extraction algorithms are there according to the behavior of the character.

    This thesis proposes two new approaches for extracting features in context of Handwritten

    Bengali character recognition. First new approach is to compute features, namely Shadow based

    features, each character image is enclosed within a minimal square, divided into four quadrants.

    Each quadrant is further divided into eight octants. Then lengths of projections of character

    images on three sides of each octant are then computed. Lengths of all such projections on each

    of the 3x8=24x4 sides of all octants are summed up to produce 24x4=96 shadow based features

    of the character image are obtained. The second new approach is to compute the Diagonal

    Distance features from four corners of the minimal square containing the character image. Here a

    set of 4 features of each character image are obtained. The feature set selected for the present

    work consists of 100 features, which include 96 shadow based features, and 4 diagonal distance

    features. The features are computed from 64x64 pixel size binary images of alphabetic

    characters. This feature set is the input of MLP based classifier.

    The Shadow feature extraction algorithm S. Basu et.al is implemented here on each character

    image to obtained 24 shadow feature set. Then compare the results of existing Shadow feature

  • 7/26/2019 Acc. No. DC 443.pdf

    37/77

    S

    extractio

    distance

    Classific

    with lab

    characte

    recogniz

    characte

    chool Of Ed

    n algorith

    feature extr

    ig 4.1.1. Bl

    ation consis

    led data of

    image to t

    e that inpu

    recognitio

    ucation Tec

    Pre-pr

    Feature

    Classifica

    LP Base

    and propo

    ction algori

    ock diagra

    ts of two p

    known inp

    e classifier

    character.

    system.

    nology, Ja

    cessing

    xtraction

    tion using

    d Classifi

    sed Shado

    thm.

    of Hand

    hases- train

    t-output re

    and then

    Fig4.1.1.sh

    avpur Uni

    r

    based fea

    ritten Ben

    ng phase a

    ponses. Te

    ith the help

    own is the

    ersity

    ture extract

    ali charac

    nd testing

    ting is per

    of training

    block diag

    ion algorith

    er recognit

    hase. Train

    ormed by g

    data the cl

    am of han

    3

    m and Dia

    Original

    characterexisting i

    Library

    ion system

    ing is perfo

    ving some

    ssifier is a

    dwritten Be

    2

    onal

    the

    rmed

    input

    le to

    ngali

  • 7/26/2019 Acc. No. DC 443.pdf

    38/77

    School Of Education Technology, Jadavpur University 33

    Fig 4.1.2 Block diagram of proposed handwritten Bengali character recognition system

    Training Class

    Testing

    Classification

    Recognition of Input Character

    Scanned Image

    Binarization

    Convert to Gra Scale

    Feature Extraction

    Shadow based Feature (96)

    (Proposed)

    Diagonal Distance (4)

    (Proposed)

  • 7/26/2019 Acc. No. DC 443.pdf

    39/77

    School Of Education Technology, Jadavpur University 34

    Data Acquisition

    The input images are acquired from documents containing Bengali text by using scanner as an

    input device. Scanned images are then stored in some picture file such as BMP, JPG etc.

    RGB to gray conversion

    In the pre-processing 1st stage is to convert the input RGB image into gray scale image.

    Binarization

    Binarization is the process of converting a gray scale image (0 to 255 pixel values) into binary

    image (0 and 1 pixel values) by selecting a threshold value in between 0 to 255(here thresholdvalue is 128).

    Feature extraction

    Each character has some features, which play an important role in pattern recognition. Each

    character have many particular features. Feature extraction describes the relevant shape

    information contained in a pattern so that the task of classifying the pattern is made easy by a

    formal procedure. Feature extraction stage in HBCR system analyses these Bengali character

    segment and selects a set of features that can be used to uniquely identify that character segment.

    Mainly, this stage is heart of HBCR system because output depends on these features. Feature

    extraction is the name given to a family of procedures for measuring the relevant shape

    information contained in a pattern so that the task of classifying the pattern is made easy by a

    formal procedure.

    Here some feature extractions techniques are implemented along with two new feature extraction

    approaches are also implemented. All theses implemented feature extraction techniques are

    discussed below with diagram.

  • 7/26/2019 Acc. No. DC 443.pdf

    40/77

    School Of Education Technology, Jadavpur University 35

    Firstly we have to know how to calculate length of projection of each octant of the character

    image-

    Fig4.3(a) Fig4.3(b) Fig4.3(c)

    1. The projection length of the hypotenuse is calculated by combining the light projection from

    two directions -i.e. base and perpendicular shown in the fig4.3 (a).

    2. The projection length of the base is calculated by the light projection from hypotenuse isshown in the fig4.3 (b).

    3. The projection length of the perpendicular is calculated by the light projection fromhypotenuse is shown in the fig4.3 (c).

    The proposed feature extraction algorithm

    4.2.1Algorithm1. Shadow based feature extraction technique:-

    Fig 4.3.An illustration for shadow based features. Each character image is enclosed within

    a minimal square & divided into 4 quadrants. Each quadrant is further divided into eight

    octants.

  • 7/26/2019 Acc. No. DC 443.pdf

    41/77

    School Of Education Technology, Jadavpur University 36

    Step1. The handwritten data is converted into digital form by scanning.

    Step2. The image of that data is fed to the pre-processing phase.

    Step3. The digital image converted into the gray scale image. Each character image is enclosedwithin a minimal square.

    Step4. Convert a gray scale image (0 to 255 pixel values) into binary image (0 and 1 pixelvalues) by selecting a threshold value in between 0 to 255(here threshold value is 128).

    Step5. Each binary character image is now divided into 4 quadrants. Each quadrant is furtherdivided into eight octants is shown in the fig4.3.

    Step6. Then lengths of projections of character images on three sides of each octant are thencomputed.

    Step7. Lengths of all such projections on each of the 3x8=24x4 sides of all octants are obtained.

    Step8. Summed up all features, 96 features are obtained to feed into the MLP based classifier as

    input to classify properly.

    4.2.2.Algorithm2.Diagonal-distance feature extraction technique:-

    Fig 4.4.An illustration for diagonal distance features.

  • 7/26/2019 Acc. No. DC 443.pdf

    42/77

    School Of Education Technology, Jadavpur University 37

    Step1. The handwritten data is converted into digital form by scanning.

    Step2. The image of that data is fed to the pre-processing phase.

    Step3. The digital image converted into the gray scale image. Each character image is enclosed

    within a minimal square.

    Step4. Convert a gray scale image (0 to 255 pixel values) into binary image (0 and 1 pixel

    values) by selecting a threshold value in between 0 to 255(here threshold value is 128).

    Step5.Measure the distance diagonally from each character image is enclosed within a minimal

    square by calculating the no. of black pixel found is shown in fig4.4.

    Step6.4 diagonal distance features are obtained from each character image is enclosed within a

    minimal squareStep7.Diagonal distance features are obtained to feed into the MLP based classifier as input to

    classify properly.

    Now total 96+4=100 features are obtained from each Bengali handwritten character image.

    This proposed algorithm is inspired the work of S.Basu et.al [13].The concept of the algorithm(shadow,centroid,longest-run) of feature extraction are implemented and compare the %of

    recognition accuracy with the proposed algorithm.

    4.2.3Algorithm3. Shadow feature extraction technique:-

    Fig 4.5.An illustration for shadow features.

  • 7/26/2019 Acc. No. DC 443.pdf

    43/77

    School Of Education Technology, Jadavpur University 38

    Step1. The handwritten data is converted into digital form by scanning.

    Step2. The image of that data is fed to the pre-processing phase.

    Step3. The digital image converted into the gray scale image. Each character image is enclosed

    within a minimal square.

    Step4. Convert a gray scale image (0 to 255 pixel values) into binary image (0 and 1 pixel

    values) by selecting a threshold value in between 0 to 255(here threshold value is 128).

    Step5. Each binary character image is now divided into eight octants is shown in the fig 4.5.

    Step6. Then lengths of projections of character images on three sides of each octant are then

    computed.

    Step7. Lengths of all such projections on each of the 3x8=24 sides of all octants are obtained.

    Step8.24 features are obtained to feed into the MLP based classifier as input to classify properly.

    4.2.4Algorithm4. Centroid feature extraction technique:-

    Fig 4.6 (a).An illustration for centroid features.

    Fig 4.6 (b).An illustration for centroid features.

    0

    1

    1

    1

    1

    0

    0

    0 1

    Centroid of the

    pixels containing

  • 7/26/2019 Acc. No. DC 443.pdf

    44/77

    School Of Education Technology, Jadavpur University 39

    Step1. The handwritten data is converted into digital form by scanning.

    Step2. The image of that data is fed to the pre-processing phase.

    Step3. The digital image converted into the gray scale image. Each character image is enclosed

    within a minimal square.

    Step4. Convert a gray scale image (0 to 255 pixel values) into binary image (0 and 1 pixel

    values) by selecting a threshold value in between 0 to 255(here threshold value is 128).

    Step5. Each binary character image is now divided into eight octants is shown in the fig 4.6(b).

    Step6.For each octant locate the coordinates of black pixelsStep7.Then coordinates of centroids of black pixels in all the 8 octants of a character image are

    obtained is shown in the fig 4.6(a).

    Step8.Now 8x2(each centroid consists of 2 values of coordinate, (x, y)) =16 features areobtained.

    Step9.16 features are obtained to feed into the MLP based classifier as input to classify properly.

    4.2.5.Algorithm5. Longest-run feature extraction technique:-

    Fig 4.7(a) character image enclosed within a minimal square is now divided into nine

    overlapping square regions.

    2 31

    4 5 6

    7 8 9

  • 7/26/2019 Acc. No. DC 443.pdf

    45/77

    School Of Education Technology, Jadavpur University 40

    Length of theLongest Bar

    1 0 4 4 4 4 4

    1 0 0 2 2 0 2

    1 0 0 2 2 0 2

    1 0 0 0 1 0 10 1 0 0 1 0 1

    0 0 2 2 0 0 2

    Sum = 12

    Fig4.7(b) An illustration for computation of the row wise longestrun feature.(Every pixel

    position in each row of the image is marked with the length of the longest bar that fits

    consecutive black pixels along the same row)

    Step1. The handwritten data is converted into digital form by scanning.

    Step2. The image of that data is fed to the pre-processing phase.

    Step3. The digital image converted into the gray scale image. Each character image is enclosed

    within a minimal square.

    Step4. Convert a gray scale image (0 to 255 pixel values) into binary image (0 and 1 pixel

    values) by selecting a threshold value in between 0 to 255(here threshold value is 128).

    Step5. Each binary character image enclosed within a minimal square is now divided into nine

    overlapping square regions is shown in the fig 4.7(a)..

    Step6. Coordinates(x,y) of top left corners of all nine overlapping square regions are {(x,y) | x=0,h/4, 2h/4 and y=0, w/4, 2w/4}, where h and w denote the height and the width of the minimal

    square.

    Step7. Row-wise longest-run feature is computed by considering the sumof the lengths of the

    longest bars that fit consecutive black pixels along each of all the rows of a square region isillustrated in fig4.7(b).

  • 7/26/2019 Acc. No. DC 443.pdf

    46/77

    School Of Education Technology, Jadavpur University 41

    Step8.The three other longest-run features are computed in the same way but along the column

    wise and two major diagonal wise directions within the rectangle separately.

    Step9.Each square region, 4 longest-run features are computed row wise, column wise and along

    two of its major diagonals.

    Step10. 9x4=36 longest-run features are computed from each character image.

    Step11.36 features are obtained to feed into the MLP based classifier as input to classify

    properly.

    Classification

    Classification consists of two phases training phase and testing phase. Here MLP based

    classifier is used to recognize handwritten Bengali character. An MLP consists of one input

    layer, one output layerand a number of hiddenor intermediate layers. The output from everyneuron in a layer of the MLP is connected to all inputs of each neuron in the immediate next

    layer of the same. Neurons in the input layer of the MLP are all basically dummy neurons as they

    are used simply to pass on the input to the next layer just by computing an identity function each.

    The numbers of neurons in the input and the output layers of an MLP are chosen depending on

    the problem to be solved. The number of neurons in other layers and the number of layers in the

    MLP are all determined by a trial and error method at the time of its training. An ANN requires

    training to learn an unknown input-output relationship to solve a problem. A single layer MLP,

    i.e., an MLP with one hidden layer is chosen here. This is mainly to keep the computational

    requirement of the same low without affecting its function approximation capability. According

    to Universal Approximation theorem [43], a single hidden layer is sufficient to compute a

    uniform approximation to a given training set.

  • 7/26/2019 Acc. No. DC 443.pdf

    47/77

    School Of Education Technology, Jadavpur University 42

    Training phase

    The program trains the network to recognize the characters. This network takes input-output

    vector pairs during training. The network trains its weight array to minimize the selected

    performance measure, i.e., error using back propagation algorithm. Here a database consists of35 different training sets, each of which has 15 alphabetic character samples and is formed by

    collecting optically scanned handwritten Bengali characters.

    The following are taken as inputs from the user:

    a) The input pattern file

    b) No. of neurons in each hidden layer

    c) Error value for convergence

    The output of training program is a file which contains modified weights of different connection

    of the network. This file is used as the input to testing program. This file also contains the values

    of numbers of neurons in input layer, Hidden layers, output layer, value of learning rate and

    momentum factor so that used is no require to enter the values during testing.

    Following parameters are used for training of Neural Networks:

    No. of neurons in input Layer: 100

    No of neurons in Hidden Layer: 50

    No of epochs: 5000

    No. of neurons in output Layer: 35

    Transfer Function Used for Layer 1: Logsig

    Transfer Function Used for Layer 2: Logsig

    Adaption Learning Function: Traingdx

    Performance Function: MSE

    Network Type = Feedforword Back propagation

    Goal=0.001

    Testing phase

    Each set of character images contain 5 characters for testing purpose. Beside these character

    images, other character images can be used for testing.

  • 7/26/2019 Acc. No. DC 443.pdf

    48/77

    School Of Education Technology, Jadavpur University 43

    After training is complete, a test pattern is given to the neural network and the results are

    compared with the desired result. Difference between the two values gives the error. Percentage

    accuracy is found as follows:

    % Accuracy = No of characters found correctly *100

    Total no of patterns

  • 7/26/2019 Acc. No. DC 443.pdf

    49/77

    School Of Education Technology, Jadavpur University 44

    CHAPTER 5 RESULTS & INTERPETATION

    Handwritten Bengali Character sets are taken. These steps are followed to obtain best accuracy

    of input handwritten Bengali character image. First of all, training of system is done by using

    different data set or sample. And then system is tested for few of the given sample, and accuracy

    is measured. The data set was partitioned into two parts. The first part is used for training the

    system and the second was for testing purpose. For each character, the proposed feature were

    computed and stored for training the network to classify. The results obtained from the proposed

    algorithms are displayed in the table.5.1.and table 5.2 contains the comparision of the

    recognition accuracy of proposed algorithm with the algorithm of S.Basu et.al[13]. In fig 5.is

    showing the Curves variation of the Recognition performance of the proposed algorithm with the

    algorithm of S. Basu et.al[13]. This variance is very small but it is there .

    MLP based classifier consists of three network layer one input layer, one hidden layer and one output

    layer are taken. If number of neurons in the hidden layer is increased, then a problem of allocation of

    required memory is occurred. Also, if the value of error tolerance is high, desired results are not

    obtained, so changing the value of error tolerance i.e. say, high accuracy rate is obtained. Also the

    network takes more number of cycles to learn when the error tolerance value is less rather than in the

    case of high value of error tolerance in which network learns in less number of cycles and so the

    learning is not very fine.

  • 7/26/2019 Acc. No. DC 443.pdf

    50/77

    School Of Education Technology, Jadavpur University 45

    Table 5.1: Recognition Accuracy of Handwritten Bengali Characters using proposed

    shadow based feature set

    LettersTraining

    Samples

    Testing

    Samples

    Correctly

    Recognized

    % of Recognition

    Accuracy

    A (A) 15 4 3 75

    B (AA) 15 5 4 80I (AI) 15 5 5 100

    K (AU) 15 5 5 100

    h (BA) 15 3 3 100

    I (BHA) 15 5 3 60

    Q (CA) 15 4 3 75

    R (CHA) 15 4 4 100

    c (DA) 15 5 4 80

    X (DDA) 15 3 3 100

    Y (DDHA) 15 4 4 100d (DHA) 15 5 5 100

    t (DRHA) 15 4 3 75

    H (E) 15 4 3 75

    N (GA) 15 4 3 75

    O (GHA) 15 5 4 80

    L (KA) 15 5 4 80

    M (KHA) 15 5 4 80

    m (LA) 15 5 4 80

    j (MA)15 5 4 80

    f (PA) 15 5 4 80

    g (PHA) 15 5 4 80

    l (RA) 15 4 4 100

    p (SA) 15 5 4 80

    n (SHA) 15 4 2 50

    a (TA) 15 5 4 80

    b (THA) 15 5 4 80

    V (TTA) 15 5 4 80

    W (TTHA) 15 5 5 100

    E (U) 15 5 4 80

    F (UU) 15 5 3 60

    q (HA) 15 5 4 80

    C (I) 15 5 4 80

    D (II) 15 5 4 80

    S(JA) 15 5 4 80

  • 7/26/2019 Acc. No. DC 443.pdf

    51/77

    School Of Education Technology, Jadavpur University 46

    Table 5.2: Comparison of Recognition Accuracies of shadow feature of S.Basu et.al[13] &

    proposed algorithms

    Letters

    % of Recognition Accuracy of

    shadow feature of S.Basu

    et.al[13]

    % of Recognition Accuracy in

    Proposed Algorithm

    A (A) 75 75B (AA) 80 80

    I (AI) 40 100

    K (AU) 60 100

    h (BA) 66 100

    I (BHA) 60 60

    Q (CA) 75 75

    R (CHA) 75 100

    c (DA) 60 80

    X (DDA) 66 100

    Y (DDHA) 75 100d (DHA) 80 100

    t (DRHA) 75 75

    H (E) 75 75

    N (GA) 75 75

    O (GHA) 60 80

    L (KA) 60 80

    M (KHA) 60 80

    m (LA) 60 80

    j (MA) 60 80

    f (PA) 60 80g (PHA) 60 80

    l (RA) 50 100

    p (SA) 60 80

    n (SHA) 50 50

    a (TA) 60 80

    b (THA) 60 80

    V (TTA) 60 80

    W (TTHA) 60 100

    E (U) 80 80

    F (UU) 60 60

    q (HA) 60 80

    C (I) 60 80

    D (II) 60 80

    S(JA) 75 80

  • 7/26/2019 Acc. No. DC 443.pdf

    52/77

    School Of Education Technology, Jadavpur University 47

    fig5. Showing the Curves variation of the Recognition performance of the proposed

    algorithm with the algorithm of S. Basu et.al[13]

    CHAPTER 6 CONCLUSION & FUTURE SCOPE

    0

    20

    40

    60

    80

    100

    120

    1 2 3 4 5 6 7 8 9 10 1 1 12 1 3 14 1 5 16 1 7 18 1 9 20 2 1 22 2 3 24 2 5 26 2 7 28 2 9 30 3 1 32 3 3 34 3 5 36

    Comparison Graph of the Proposed Algorithm

    & the Algorithm of S.Basu et.al[13]

    % of Recognition Accuracy in Existing Algorithm

    % of Recognition Accuracy in Proposed Algorithm

  • 7/26/2019 Acc. No. DC 443.pdf

    53/77

    School Of Education Technology, Jadavpur University 48

    Conclusion

    Handwritten Bengali character recognition based on character feature is discussed here. Shadow

    based feature algorithm and diagonal distance feature algorithm are implemented and the

    recognition accuracy compared with the state-of-the-art. An MLP based classifier is used. There are

    lots of ways to implement this project but recognition is done based on character feature.

    Recognition approaches heavily depend on the nature of the data to be recognized. Since handwritten

    Bengali characters could be of various shapes and size, the recognition process needs to be much

    efficient and accurate to recognize the characters written by different users.

    Future Scop