SlideShare uma empresa Scribd logo
1 de 8
Baixar para ler offline
DEVNAGARI DOCUMENT SEGMENTATION USING
HISTOGRAM APPROACH
Vikas J Dongre 1
Vijay H Mankar 2
Department of Electronics & Telecommunication,
Government Polytechnic, Nagpur, India
1
dongrevj@yahoo.co.in; 2
vhmankar@gmail.com
ABSTRACT
Document segmentation is one of the critical phases in machine recognition of any language. Correct
segmentation of individual symbols decides the accuracy of character recognition technique. It is used to
decompose image of a sequence of characters into sub images of individual symbols by segmenting lines and
words. Devnagari is the most popular script in India. It is used for writing Hindi, Marathi, Sanskrit and
Nepali languages. Moreover, Hindi is the third most popular language in the world. Devnagari documents
consist of vowels, consonants and various modifiers. Hence proper segmentation of Devnagari word is
challenging. A simple histogram based approach to segment Devnagari documents is proposed in this paper.
Various challenges in segmentation of Devnagari script are also discussed.
KEYWORDS
Devnagari Character Recognition, paragraph segmentation, Line segmentation, Word segmentation,
Machine learning.
1. INTRODUCTION
Machine learning and human computer interaction are the most challenging research fields since the
evolution of digital computers. In Optical Character Recognition (OCR), the text lines, words and
symbols in a document must be segmented properly before recognition. Correctness/ incorrectness
of text line segmentation directly affect accuracy of word/character segmentation and consequently
affect the accuracy of word/character recognition [1]. Several techniques for text line segmentation
are reported in the literature [2-6]. These techniques may be classified into three groups as follows:
(i) Projection profile based techniques, (ii) Hough transform based techniques, (iii) Thinning based
approach. As a conventional technique for text line segmentation, global horizontal projection
analysis of black pixels has been utilized in [4, 7]. Piece-wise horizontal projection analysis of black
pixels is employed by many researchers to segment text pages of different languages [2, 9]. In
piecewise horizontal projection technique, the text-page image is decomposed into horizontal
stripes. The positions of potential piece-wise separating lines are obtained for each stripe using
horizontal projection on each stripe. The potential separating lines are then connected to achieve
complete separating lines for all respective text lines located in the text page image. Concept of the
Hough transform is employed in the field of document analysis in many research areas such as skew
detection, slant detection, text line segmentation, etc [8]. Thinning operation is also used by
researchers for text line segmentation from documents [10].
In this paper we have proposed a bounded box method for segmentation of documents lines and
words and characters. The method is based on the pixel histogram obtained. The organization of this
paper is as follows: In Section 2, we have discussed features of Indian scripts. Section 3 discusses
image preprocessing methods. Section 4 details the proposed segmentation approach. Experimental
results are discussed in Section 5 and scope for further research is discussed in Section 6.
2. FEATURES OF DEVNAGARI SCRIPT
India is a multi-lingual and multi-script country comprising of eighteen official languages. Because
there is typically a letter for each of the phonemes in Indian languages, the alphabet set tends to be
quite large. Hindi, the national language of India, is written in the Devnagari script. Devnagari is
also used for writing Marathi, Sanskrit and Nepali. Moreover, Hindi is the third most popular
language in the world [1]. It is spoken by more than 500 million people in the world. Devnagari has
11 vowels and 33 consonants. They are called basic characters. Vowels can be written as
independent letters, or by using a variety of diacritical marks which are written above, below,
before or after the consonant they belong to. When vowels are written in this way they are known as
modifiers and the characters so formed are called conjuncts. Sometimes two or more consonants can
combine and take new shapes. These new shaped clusters are known as compound characters.
These types of basic characters, compound characters and modifiers are present not only in
Devnagari but also in other scripts.
All the characters have a horizontal line at the upper part, known as Shirorekha. In continuous
handwriting, from left to right direction, the shirorekha of one character joins with the shirorekha of
the previous or next character of the same word. In this fashion, multiple characters and modified
shapes in a word appear as a single connected component joined through the common shirorekha.
Also in Devnagari there are vowels, consonants, vowel modifiers and compound characters,
numerals. Moreover, there are many similar shaped characters. All these variations make Devnagari
Optical Character Recognition, a challenging problem. A sample of Devnagari character set is
provided in table 1 to 6.
Table 1: Vowels and Corresponding
Modifiers
Table 2: Consonants
Table 3: Half Form of Consonants with
Vertical Bar.
Table 4: Examples of Combination of Half-
Consonant and Consonant.
Table 5: Examples of Special Combination
of Half-Consonant and Consonant.
Table 6: Special Symbols
3. IMAGE PREPROCESSING
We have collected the printed pages from different office correspondence. The document pages are
scanned using a flat bed scanner at a resolution of 300 dpi. These pixels may have values: OFF (0)
or ON (1) for binary images, 0–255 for gray-scale images, and 3 channels of 0–255 colour values
for colour images. Colour image is converted to grayscale by eliminating the hue and saturation
information while retaining the luminance. It is further analyzed to get useful information. Such
processing is explained below.
3.1 Thresholding and Binarization:
The digitized text images are converted into binary images by thresholding using Otsu’s method
[17]. Original image contains 0 for Object and 1 for background. The image inverted to obtain
image such that object pixels are represented by 1 and background pixels by 0.
3.2 Noise reduction:
The noise, introduced by the optical scanning device or the writing instrument, causes disconnected
line segments, bumps and gaps in lines, filled loops etc. The distortion including local variations,
rounding of corners, dilation and erosion is also a problem. Prior to the character recognition, it is
necessary to eliminate these imperfections [11-12]. It is carried using various morphological
processing techniques.
3.3 Skew Detection and Correction:
Handwritten document may originally be skewed or skewness may introduce in document scanning
process. This effect is unintentional in many real cases, and it should be eliminated because it
dramatically reduces the accuracy of the subsequent processes such as segmentation and
classification. Skewed lines are made horizontal by calculating skew angle and making proper
correction in the raw image using Hu moments and various transforms [13-15].
Figure 1: Preprocessed Images (a) Original, (b) segmented (c) Shirorekha removed (d) Thinned
(e) image edging
3.4 Thinning:
The boundary detection of image is done to enable easier subsequent detection of pertinent features
and objects of interest (see fig.1- a to e). Various standard functions are available in MATLAB for
above operations [16].
4. PROPOSED SEGMENTATION APPROACH
After the image is preprocessed using methods discussed in section 3, we now apply various
techniques for segmentation of document lines, words and characters. The process of segmentation
mainly follows the following pattern:
1) Identify the text lines in the page.
2) Identify the words in individual line.
3) Finally identify individual character in each word.
4.1 Line Segmentation.
The global horizontal projection method is used to compute sum of all white pixels on every row
and construct corresponding histogram. The steps for line segmentation are as follow:
• Construct the Horizontal Histogram for the image (fig. 2-b).
• Count the white pixel in each row.
• Using the Histogram, find the rows containing no white pixel.
• Replace all such rows by 1 (fig. 2-c).
• Invert the image to make empty rows as 0 and text lines will have original pixels.
• Mark the Bounding Box for text lines (figure 2-e) using standard Matlab functions (regionprops
and rectangle).
• Copy the pixels in Bounding Box and save in separate file. (Separated lines shown in fig. 2-f).
a) Original Scanned Document (b) Image Histogram
(c) Blank space between the lines (d) Line separation
(e) Regions of interest (f) segmented lines
Figure 2: Line Segmentation
4.2 Word Segmentation
The global horizontal projection method is used here to compute sum of all white pixels on every
column and construct corresponding histogram. The steps for line segmentation are as follow:
• Construct the Vertical Histogram for the image (fig. 3-b).
• Count the white pixel in each column.
• Using the Histogram, find the columns containing no white pixel.
• Replace all such columns by 1
• Invert the image to make empty rows as 0 and text words will have original pixels.
• Mark the Bounding Box for word. (See fig 3-c)
• Copy the pixels in the Bounding Box and save in separate file. (See fig. 3-d).
(a) Original line
(b) Word Histogram
(c) Regions of interest
(d) Segmented words
Figure 3: Word Segmentation
4.3 Character Segmentation
A slight modification in previous algorithm (section 4.2) is used here. The steps for line
segmentation are as follow:
• Get the thinned image using Matlab bwmorph function. (This is done to normalize image
against thickness of the character).
• Count the white pixel in each column.
• Find the position containing single white pixel.
• Replace all such columns by 1.
• Invert the image to make such columns as 0 and text characters will have original pixels.
• Mark the Bounding Box for characters using standard Matlab functions. See fig 4-a.
• Copy the pixels in the Bounding Box and save in separate file. (Separated characters are shown
in fig. 4-b).
(a) Region of Interest (b) segmented characters
Figure 4: Character segmentation
5. RESULTS AND DISCUSSION
Various documents were collected and tested. It is observed that line segmentation is done with
nearly 100% accuracy. Word segmentation is accurate as long as the document contains
characters only. When Devnagari numerals are present in the document, which does not contain
shirorekha, each digit is considered as separate word by the algorithm. Hence accuracy is
reduced marginally. In the present case it is 91%.
Table 7: Character Segmentation results for document in fig 2 (a)
Words ( in figure 4) 1 2 3 4 5 6
Characters present 3 3 6 3 2 2
Characters recognized 5 5 12 7 6 6
Accuracy 60 % 60 % 50 % 42 % 33 % 33 %
Table 8: Overall Segmentation results for document in fig 2 (a)
Lines in Document Recognized lines Accuracy
Line Segmentation
8 8 100 %
words in Document Recognized words Accuracy
Word Segmentation
41 45 91 %
Characters in Document Recognized Characters Accuracy
Line Segmentation
133 242 55 %
In case of character segmentation, words are segmented into more symbols than actually present
in the word as shown in figure 4. Result is summarized in Table 8. This error is resulted since
the words are scanned only from top to bottom by the algorithm used. Devnagari is two
dimensional script as consonants are modified in many ways from top, bottom, left or right to
form a meaningful letter. Unconnected Vertical lines in the words are recognized as separate
symbol by the algorithm used. For accurate segmentation, all the modifiers must be segmented
so that their recognition can be properly done done.
6. CONCLUSIONS AND FUTURE WORK
In this paper, we have presented a primary work for segmentation of lines, words and characters
of Devnagari script. Nearly 100% successful segmentation achieved in line and word
segmentation but character level segmentation needs more effort as it is complicated for
Devnagari script. This is challenging work due to following reasons.
• Compound letters are connected at various places. It is difficult to identify exact connecting
points for segmentation.
• Upper and lower modifier segmentation needs different approaches.
• Separating anuswara (.) and full stop (.) from noise is critical as both resemble the same.
Knowledge of natural language processing techniques needs to be applied here.
• Handwritten unconnected compound letter segmentation is also critical.
• Handwritten unintentionally connected simple letter segmentation is also critical.
All these issues will be dealt in the future for printed and handwritten documents in Devnagari
script by using various approaches.
REFERENCES
[1] Nallapareddy Priyanka, Srikanta Pal, Ranju Mandal, (2010) “Line and Word Segmentation
Approach for Printed Documents”, IJCA Special Issue on Recent Trends in Image Processing and
Pattern Recognition-RTIPPR, pp 30-36.
[2] K. Wong, R. Casey and F. Wahl, (1982) “Document Analysis System”, IBM j. Res. Dev., 26(6), pp.
647-656.
[3] G. Nagy, S. Seth, and M. Viswanathan, (1992) “A prototype document image analysis system for
technical journals”, Computer, vol. 25, pp. 10-22.
[4] Vijay Kumar, Pankaj K.Senegar, (2010) “Segmentation of Printed Text in Devnagari Script and
Gurmukhi Script”, IJCA: International Journal of Computer Applications, Vol.3,pp. 24-29.
[5] U. Pal and Sagarika Datta, (2003) “Segmentation of Bangla Unconstrained Handwritten Text”, Proc.
7th Int. Conf. on Document analysis and Recognition, pp. 1128-113.
[6] Vikas J Dongre, Vijay H Mankar, (July 2011) “Segmentation of Devnagari Documents”,
Communications in Computer and Information Science, 2011, Volume 198, Part 1, Springer
proceedings, 1st International conference, ACITY Chennai, India, pp 211-218.
[7] Vikas J Dongre, Vijay H Mankar, (2010) “A Review of Research on Devnagari Character
Recognition”, International Journal of Computer Applications (0975 – 8887) Volume 12– No.2, pp.
8-15.
[8] U. Pal, M. Mitra, and B. B. Chaudhuri, (2001) “Multi-skew detection of Indian script documents”,
Proc. 6th Int. Conf. Document Analysis Recognition, pp. 292-296.
[9] Likforman-Sulem L, Zahour A and Taconet B, (2007) “Text line Segmentation of Historical
Documents: a Survey”, International Journal on Document Analysis and Recognition, Springer,
Vol. 9, Issue 2, pp.123-138.
[10] G. Magy (2000) “Twenty years of Document Analysis in PAMI”, IEEE Trans. in PAMI, Vol.22,
pp. 38-61.
[11] J. Serra, (1994) “Morphological Filtering: An Overview”, Signal Processing, vol. 38, no.1, pp.3-11.
[12] Nafiz Arica, Fatos T. Yarman Vural, (2000) “An Overview of Character Recognition Focused On
Off-line Handwriting”, IEEE C99-06-C-203.
[13] Mohamed Cheriet, Nawwaf Kharma, Cheng-Lin Liu, Ching Y. Suen, (2007) “Character
Recognition Systems: A Guide for students and Practitioners”, John Wiley & Sons, Inc., Hoboken,
New Jersey.
[14] Rajiv Kapoor, Deepak Bagai, T. S. Kamal, (2002) “Skew angle detection of a cursive handwritten
Devnagari script character image”, Journal of Indian Inst. Science, pp. 161–175.
[15] U. Pal, M. Mitra and B. B. Chaudhuri,(2001) “Multi-Skew Detection of Indian Script Documents”,
CVPRU IEEE, pp 292-296.
[16] V. H. Mankar et al, (2010) “Contour Detection and Recovery through Bio-Medical Watermarking
for Telediagnosis”, International Journal of Tomography & Statistics, Vol. 14 (Special Volume),
Number S10.
[17] Guo Jing; Rajan D.; Chng Eng Siong, (2005) “Motion Detection with Adaptive Background and
Dynamic Thresholds”, Fifth International Conference on Information, Communications and Signal
Processing, Bangkok, W B.4, pp 41-45.
Authors
Vikas J Dongre received B.E and M.E. in Electronics in 19991 and 1994 respectively. He
served as lecturer in SSVPS engineering college Dhule, (M.S.) India from 1992 to 1994. He
Joined Government Polytechnic Nagpur as Lecturer in 1994 where he is presently working as
lecturer (selection grade). His areas of interests include Microcontrollers, embedded systems,
image recognition, and innovative Laboratory practices. He is pursuing for PhD in Offline
Handwritten Devnagari Character Recognition. He has published one research paper in
international journal and two research paper in international conferences.
Vijay H. Mankar received M. Tech. degree in Electronics Engineering from VNIT, Nagpur
University, India in 1995 and Ph.D. (Engg) from Jadavpur University, Kolkata, India in 2009
respectively. He has more than 17 years of teaching experience and presently working as a
Lecturer (Selection Grade) in Government Polytechnic, Nagpur (MS), India. He has
published more than 30 research papers in international conference and journals. His field of
interest includes digital image processing, data hiding and watermarking.

Mais conteúdo relacionado

Mais procurados

A Survey of Modern Character Recognition Techniques
A Survey of Modern Character Recognition TechniquesA Survey of Modern Character Recognition Techniques
A Survey of Modern Character Recognition Techniques
ijsrd.com
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 

Mais procurados (18)

A MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITION
A MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITIONA MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITION
A MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITION
 
Recognition of Words in Tamil Script Using Neural Network
Recognition of Words in Tamil Script Using Neural NetworkRecognition of Words in Tamil Script Using Neural Network
Recognition of Words in Tamil Script Using Neural Network
 
Scene text recognition in mobile applications by character descriptor and str...
Scene text recognition in mobile applications by character descriptor and str...Scene text recognition in mobile applications by character descriptor and str...
Scene text recognition in mobile applications by character descriptor and str...
 
Classifier fusion method to recognize
Classifier fusion method to recognizeClassifier fusion method to recognize
Classifier fusion method to recognize
 
Bengali Numeric Number Recognition
Bengali Numeric Number RecognitionBengali Numeric Number Recognition
Bengali Numeric Number Recognition
 
A Survey Paper on Character Recognition
A Survey Paper on Character RecognitionA Survey Paper on Character Recognition
A Survey Paper on Character Recognition
 
Optical Character Recognition
Optical Character RecognitionOptical Character Recognition
Optical Character Recognition
 
Text extraction from images
Text extraction from imagesText extraction from images
Text extraction from images
 
Text Extraction from Image using Python
Text Extraction from Image using PythonText Extraction from Image using Python
Text Extraction from Image using Python
 
V.karthikeyan published article
V.karthikeyan published articleV.karthikeyan published article
V.karthikeyan published article
 
Offline Signiture and Numeral Recognition in Context of Cheque
Offline Signiture and Numeral Recognition in Context of ChequeOffline Signiture and Numeral Recognition in Context of Cheque
Offline Signiture and Numeral Recognition in Context of Cheque
 
A Survey of Modern Character Recognition Techniques
A Survey of Modern Character Recognition TechniquesA Survey of Modern Character Recognition Techniques
A Survey of Modern Character Recognition Techniques
 
Script Identification In Trilingual Indian Documents
Script Identification In Trilingual Indian DocumentsScript Identification In Trilingual Indian Documents
Script Identification In Trilingual Indian Documents
 
Isolated Arabic Handwritten Character Recognition Using Linear Correlation
Isolated Arabic Handwritten Character Recognition Using Linear CorrelationIsolated Arabic Handwritten Character Recognition Using Linear Correlation
Isolated Arabic Handwritten Character Recognition Using Linear Correlation
 
F045053236
F045053236F045053236
F045053236
 
Hh2513151319
Hh2513151319Hh2513151319
Hh2513151319
 
Text Detection and Recognition
Text Detection and RecognitionText Detection and Recognition
Text Detection and Recognition
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 

Destaque

Script for tv interview
Script for tv interviewScript for tv interview
Script for tv interview
ramsz001
 
Example radio script
Example radio scriptExample radio script
Example radio script
ISM
 
FM Radio Program Script
FM Radio Program ScriptFM Radio Program Script
FM Radio Program Script
Roxanne Robes
 

Destaque (6)

Interactive Learning through Hands-on Practice using Electronic Mini - Lab (E...
Interactive Learning through Hands-on Practice using Electronic Mini - Lab (E...Interactive Learning through Hands-on Practice using Electronic Mini - Lab (E...
Interactive Learning through Hands-on Practice using Electronic Mini - Lab (E...
 
Final Radio Show Script
Final Radio Show ScriptFinal Radio Show Script
Final Radio Show Script
 
Script for tv interview
Script for tv interviewScript for tv interview
Script for tv interview
 
Talk show example and structure
Talk show example and structureTalk show example and structure
Talk show example and structure
 
Example radio script
Example radio scriptExample radio script
Example radio script
 
FM Radio Program Script
FM Radio Program ScriptFM Radio Program Script
FM Radio Program Script
 

Semelhante a Devnagari document segmentation using histogram approach

Review of research on devnagari character recognition
Review of research on devnagari character recognitionReview of research on devnagari character recognition
Review of research on devnagari character recognition
Vikas Dongre
 

Semelhante a Devnagari document segmentation using histogram approach (20)

Fragmentation of handwritten touching characters in devanagari script
Fragmentation of handwritten touching characters in devanagari scriptFragmentation of handwritten touching characters in devanagari script
Fragmentation of handwritten touching characters in devanagari script
 
Fragmentation of Handwritten Touching Characters in Devanagari Script
Fragmentation of Handwritten Touching Characters in Devanagari ScriptFragmentation of Handwritten Touching Characters in Devanagari Script
Fragmentation of Handwritten Touching Characters in Devanagari Script
 
Ijetcas14 399
Ijetcas14 399Ijetcas14 399
Ijetcas14 399
 
Dimensionality Reduction and Feature Selection Methods for Script Identificat...
Dimensionality Reduction and Feature Selection Methods for Script Identificat...Dimensionality Reduction and Feature Selection Methods for Script Identificat...
Dimensionality Reduction and Feature Selection Methods for Script Identificat...
 
Review of research on devnagari character recognition
Review of research on devnagari character recognitionReview of research on devnagari character recognition
Review of research on devnagari character recognition
 
A MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITION
A MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITIONA MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITION
A MULTI-STREAM HMM APPROACH TO OFFLINE HANDWRITTEN ARABIC WORD RECOGNITION
 
An effective approach to offline arabic handwriting recognition
An effective approach to offline arabic handwriting recognitionAn effective approach to offline arabic handwriting recognition
An effective approach to offline arabic handwriting recognition
 
An exhaustive font and size invariant classification scheme for ocr of devana...
An exhaustive font and size invariant classification scheme for ocr of devana...An exhaustive font and size invariant classification scheme for ocr of devana...
An exhaustive font and size invariant classification scheme for ocr of devana...
 
DEVELOPMENT OF AN ALPHABETIC CHARACTER RECOGNITION SYSTEM USING MATLAB FOR BA...
DEVELOPMENT OF AN ALPHABETIC CHARACTER RECOGNITION SYSTEM USING MATLAB FOR BA...DEVELOPMENT OF AN ALPHABETIC CHARACTER RECOGNITION SYSTEM USING MATLAB FOR BA...
DEVELOPMENT OF AN ALPHABETIC CHARACTER RECOGNITION SYSTEM USING MATLAB FOR BA...
 
OCR for Gujarati Numeral using Neural Network
OCR for Gujarati Numeral using Neural NetworkOCR for Gujarati Numeral using Neural Network
OCR for Gujarati Numeral using Neural Network
 
Ac03401600163.
Ac03401600163.Ac03401600163.
Ac03401600163.
 
Texture features based text extraction from images using DWT and K-means clus...
Texture features based text extraction from images using DWT and K-means clus...Texture features based text extraction from images using DWT and K-means clus...
Texture features based text extraction from images using DWT and K-means clus...
 
Optical Character Recognition from Text Image
Optical Character Recognition from Text ImageOptical Character Recognition from Text Image
Optical Character Recognition from Text Image
 
Topographic Feature Extraction for Bengali and Hindi Character Images
Topographic Feature Extraction for Bengali and Hindi Character ImagesTopographic Feature Extraction for Bengali and Hindi Character Images
Topographic Feature Extraction for Bengali and Hindi Character Images
 
Topographic Feature Extraction for Bengali and Hindi Character Images
Topographic Feature Extraction for Bengali and Hindi Character ImagesTopographic Feature Extraction for Bengali and Hindi Character Images
Topographic Feature Extraction for Bengali and Hindi Character Images
 
Character recognition of Devanagari characters using Artificial Neural Network
Character recognition of Devanagari characters using Artificial Neural NetworkCharacter recognition of Devanagari characters using Artificial Neural Network
Character recognition of Devanagari characters using Artificial Neural Network
 
Segmentation of Handwritten Text in Gurmukhi Script
Segmentation of Handwritten Text in Gurmukhi ScriptSegmentation of Handwritten Text in Gurmukhi Script
Segmentation of Handwritten Text in Gurmukhi Script
 
50120130406021
5012013040602150120130406021
50120130406021
 
A Novel Approach for Bilingual (English - Oriya) Script Identification and Re...
A Novel Approach for Bilingual (English - Oriya) Script Identification and Re...A Novel Approach for Bilingual (English - Oriya) Script Identification and Re...
A Novel Approach for Bilingual (English - Oriya) Script Identification and Re...
 
An Efficient Segmentation Technique for Machine Printed Devanagiri Script: Bo...
An Efficient Segmentation Technique for Machine Printed Devanagiri Script: Bo...An Efficient Segmentation Technique for Machine Printed Devanagiri Script: Bo...
An Efficient Segmentation Technique for Machine Printed Devanagiri Script: Bo...
 

Mais de Vikas Dongre

Mais de Vikas Dongre (20)

Lcd interfaing using 8051 and assambly language programming
Lcd interfaing using 8051 and assambly language programmingLcd interfaing using 8051 and assambly language programming
Lcd interfaing using 8051 and assambly language programming
 
Job opportunities for electronics engineering
Job opportunities for electronics engineeringJob opportunities for electronics engineering
Job opportunities for electronics engineering
 
Educational video creation: Tools and tips
Educational video creation: Tools and tipsEducational video creation: Tools and tips
Educational video creation: Tools and tips
 
Scope of job education and business after HSC
Scope of job  education and business after HSCScope of job  education and business after HSC
Scope of job education and business after HSC
 
Introduction to digital logic gates
Introduction to digital logic gatesIntroduction to digital logic gates
Introduction to digital logic gates
 
Introduction to binary number system
Introduction to binary number systemIntroduction to binary number system
Introduction to binary number system
 
Timer programming for 8051 using embedded c
Timer programming for 8051 using embedded cTimer programming for 8051 using embedded c
Timer programming for 8051 using embedded c
 
Arithmetic and Logic instructions in Embedded C
Arithmetic and Logic instructions in Embedded CArithmetic and Logic instructions in Embedded C
Arithmetic and Logic instructions in Embedded C
 
Introduction to Embedded system programming using 8051
Introduction to Embedded system programming using 8051Introduction to Embedded system programming using 8051
Introduction to Embedded system programming using 8051
 
Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051Interrupts programming in embedded C using 8051
Interrupts programming in embedded C using 8051
 
Arithmetic and logic operations in c
Arithmetic and logic operations in cArithmetic and logic operations in c
Arithmetic and logic operations in c
 
Arithmetic and logic operations in c
Arithmetic and logic operations in cArithmetic and logic operations in c
Arithmetic and logic operations in c
 
Classification of embedded systems
Classification of embedded systemsClassification of embedded systems
Classification of embedded systems
 
Characteristics of embedded systems
Characteristics of embedded systemsCharacteristics of embedded systems
Characteristics of embedded systems
 
Features of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processorsFeatures of 89c51,pic,avr & arm processors
Features of 89c51,pic,avr & arm processors
 
Microcontroller architecture
Microcontroller architectureMicrocontroller architecture
Microcontroller architecture
 
2. block diagram and components of embedded system
2. block diagram and components of embedded system2. block diagram and components of embedded system
2. block diagram and components of embedded system
 
1. advantages and applications of embedded system
1. advantages and applications of embedded system1. advantages and applications of embedded system
1. advantages and applications of embedded system
 
Serial communication
Serial communicationSerial communication
Serial communication
 
Innovative improvements in electronic engineering laboratory education using eml
Innovative improvements in electronic engineering laboratory education using emlInnovative improvements in electronic engineering laboratory education using eml
Innovative improvements in electronic engineering laboratory education using eml
 

Último

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Último (20)

Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 

Devnagari document segmentation using histogram approach

  • 1. DEVNAGARI DOCUMENT SEGMENTATION USING HISTOGRAM APPROACH Vikas J Dongre 1 Vijay H Mankar 2 Department of Electronics & Telecommunication, Government Polytechnic, Nagpur, India 1 dongrevj@yahoo.co.in; 2 vhmankar@gmail.com ABSTRACT Document segmentation is one of the critical phases in machine recognition of any language. Correct segmentation of individual symbols decides the accuracy of character recognition technique. It is used to decompose image of a sequence of characters into sub images of individual symbols by segmenting lines and words. Devnagari is the most popular script in India. It is used for writing Hindi, Marathi, Sanskrit and Nepali languages. Moreover, Hindi is the third most popular language in the world. Devnagari documents consist of vowels, consonants and various modifiers. Hence proper segmentation of Devnagari word is challenging. A simple histogram based approach to segment Devnagari documents is proposed in this paper. Various challenges in segmentation of Devnagari script are also discussed. KEYWORDS Devnagari Character Recognition, paragraph segmentation, Line segmentation, Word segmentation, Machine learning. 1. INTRODUCTION Machine learning and human computer interaction are the most challenging research fields since the evolution of digital computers. In Optical Character Recognition (OCR), the text lines, words and symbols in a document must be segmented properly before recognition. Correctness/ incorrectness of text line segmentation directly affect accuracy of word/character segmentation and consequently affect the accuracy of word/character recognition [1]. Several techniques for text line segmentation are reported in the literature [2-6]. These techniques may be classified into three groups as follows: (i) Projection profile based techniques, (ii) Hough transform based techniques, (iii) Thinning based approach. As a conventional technique for text line segmentation, global horizontal projection analysis of black pixels has been utilized in [4, 7]. Piece-wise horizontal projection analysis of black pixels is employed by many researchers to segment text pages of different languages [2, 9]. In piecewise horizontal projection technique, the text-page image is decomposed into horizontal stripes. The positions of potential piece-wise separating lines are obtained for each stripe using horizontal projection on each stripe. The potential separating lines are then connected to achieve complete separating lines for all respective text lines located in the text page image. Concept of the Hough transform is employed in the field of document analysis in many research areas such as skew detection, slant detection, text line segmentation, etc [8]. Thinning operation is also used by researchers for text line segmentation from documents [10]. In this paper we have proposed a bounded box method for segmentation of documents lines and words and characters. The method is based on the pixel histogram obtained. The organization of this
  • 2. paper is as follows: In Section 2, we have discussed features of Indian scripts. Section 3 discusses image preprocessing methods. Section 4 details the proposed segmentation approach. Experimental results are discussed in Section 5 and scope for further research is discussed in Section 6. 2. FEATURES OF DEVNAGARI SCRIPT India is a multi-lingual and multi-script country comprising of eighteen official languages. Because there is typically a letter for each of the phonemes in Indian languages, the alphabet set tends to be quite large. Hindi, the national language of India, is written in the Devnagari script. Devnagari is also used for writing Marathi, Sanskrit and Nepali. Moreover, Hindi is the third most popular language in the world [1]. It is spoken by more than 500 million people in the world. Devnagari has 11 vowels and 33 consonants. They are called basic characters. Vowels can be written as independent letters, or by using a variety of diacritical marks which are written above, below, before or after the consonant they belong to. When vowels are written in this way they are known as modifiers and the characters so formed are called conjuncts. Sometimes two or more consonants can combine and take new shapes. These new shaped clusters are known as compound characters. These types of basic characters, compound characters and modifiers are present not only in Devnagari but also in other scripts. All the characters have a horizontal line at the upper part, known as Shirorekha. In continuous handwriting, from left to right direction, the shirorekha of one character joins with the shirorekha of the previous or next character of the same word. In this fashion, multiple characters and modified shapes in a word appear as a single connected component joined through the common shirorekha. Also in Devnagari there are vowels, consonants, vowel modifiers and compound characters, numerals. Moreover, there are many similar shaped characters. All these variations make Devnagari Optical Character Recognition, a challenging problem. A sample of Devnagari character set is provided in table 1 to 6. Table 1: Vowels and Corresponding Modifiers Table 2: Consonants Table 3: Half Form of Consonants with Vertical Bar. Table 4: Examples of Combination of Half- Consonant and Consonant. Table 5: Examples of Special Combination of Half-Consonant and Consonant. Table 6: Special Symbols
  • 3. 3. IMAGE PREPROCESSING We have collected the printed pages from different office correspondence. The document pages are scanned using a flat bed scanner at a resolution of 300 dpi. These pixels may have values: OFF (0) or ON (1) for binary images, 0–255 for gray-scale images, and 3 channels of 0–255 colour values for colour images. Colour image is converted to grayscale by eliminating the hue and saturation information while retaining the luminance. It is further analyzed to get useful information. Such processing is explained below. 3.1 Thresholding and Binarization: The digitized text images are converted into binary images by thresholding using Otsu’s method [17]. Original image contains 0 for Object and 1 for background. The image inverted to obtain image such that object pixels are represented by 1 and background pixels by 0. 3.2 Noise reduction: The noise, introduced by the optical scanning device or the writing instrument, causes disconnected line segments, bumps and gaps in lines, filled loops etc. The distortion including local variations, rounding of corners, dilation and erosion is also a problem. Prior to the character recognition, it is necessary to eliminate these imperfections [11-12]. It is carried using various morphological processing techniques. 3.3 Skew Detection and Correction: Handwritten document may originally be skewed or skewness may introduce in document scanning process. This effect is unintentional in many real cases, and it should be eliminated because it dramatically reduces the accuracy of the subsequent processes such as segmentation and classification. Skewed lines are made horizontal by calculating skew angle and making proper correction in the raw image using Hu moments and various transforms [13-15]. Figure 1: Preprocessed Images (a) Original, (b) segmented (c) Shirorekha removed (d) Thinned (e) image edging 3.4 Thinning: The boundary detection of image is done to enable easier subsequent detection of pertinent features and objects of interest (see fig.1- a to e). Various standard functions are available in MATLAB for above operations [16].
  • 4. 4. PROPOSED SEGMENTATION APPROACH After the image is preprocessed using methods discussed in section 3, we now apply various techniques for segmentation of document lines, words and characters. The process of segmentation mainly follows the following pattern: 1) Identify the text lines in the page. 2) Identify the words in individual line. 3) Finally identify individual character in each word. 4.1 Line Segmentation. The global horizontal projection method is used to compute sum of all white pixels on every row and construct corresponding histogram. The steps for line segmentation are as follow: • Construct the Horizontal Histogram for the image (fig. 2-b). • Count the white pixel in each row. • Using the Histogram, find the rows containing no white pixel. • Replace all such rows by 1 (fig. 2-c). • Invert the image to make empty rows as 0 and text lines will have original pixels. • Mark the Bounding Box for text lines (figure 2-e) using standard Matlab functions (regionprops and rectangle). • Copy the pixels in Bounding Box and save in separate file. (Separated lines shown in fig. 2-f). a) Original Scanned Document (b) Image Histogram (c) Blank space between the lines (d) Line separation
  • 5. (e) Regions of interest (f) segmented lines Figure 2: Line Segmentation 4.2 Word Segmentation The global horizontal projection method is used here to compute sum of all white pixels on every column and construct corresponding histogram. The steps for line segmentation are as follow: • Construct the Vertical Histogram for the image (fig. 3-b). • Count the white pixel in each column. • Using the Histogram, find the columns containing no white pixel. • Replace all such columns by 1 • Invert the image to make empty rows as 0 and text words will have original pixels. • Mark the Bounding Box for word. (See fig 3-c) • Copy the pixels in the Bounding Box and save in separate file. (See fig. 3-d). (a) Original line (b) Word Histogram (c) Regions of interest (d) Segmented words Figure 3: Word Segmentation
  • 6. 4.3 Character Segmentation A slight modification in previous algorithm (section 4.2) is used here. The steps for line segmentation are as follow: • Get the thinned image using Matlab bwmorph function. (This is done to normalize image against thickness of the character). • Count the white pixel in each column. • Find the position containing single white pixel. • Replace all such columns by 1. • Invert the image to make such columns as 0 and text characters will have original pixels. • Mark the Bounding Box for characters using standard Matlab functions. See fig 4-a. • Copy the pixels in the Bounding Box and save in separate file. (Separated characters are shown in fig. 4-b). (a) Region of Interest (b) segmented characters Figure 4: Character segmentation 5. RESULTS AND DISCUSSION Various documents were collected and tested. It is observed that line segmentation is done with nearly 100% accuracy. Word segmentation is accurate as long as the document contains characters only. When Devnagari numerals are present in the document, which does not contain shirorekha, each digit is considered as separate word by the algorithm. Hence accuracy is reduced marginally. In the present case it is 91%. Table 7: Character Segmentation results for document in fig 2 (a) Words ( in figure 4) 1 2 3 4 5 6 Characters present 3 3 6 3 2 2 Characters recognized 5 5 12 7 6 6 Accuracy 60 % 60 % 50 % 42 % 33 % 33 %
  • 7. Table 8: Overall Segmentation results for document in fig 2 (a) Lines in Document Recognized lines Accuracy Line Segmentation 8 8 100 % words in Document Recognized words Accuracy Word Segmentation 41 45 91 % Characters in Document Recognized Characters Accuracy Line Segmentation 133 242 55 % In case of character segmentation, words are segmented into more symbols than actually present in the word as shown in figure 4. Result is summarized in Table 8. This error is resulted since the words are scanned only from top to bottom by the algorithm used. Devnagari is two dimensional script as consonants are modified in many ways from top, bottom, left or right to form a meaningful letter. Unconnected Vertical lines in the words are recognized as separate symbol by the algorithm used. For accurate segmentation, all the modifiers must be segmented so that their recognition can be properly done done. 6. CONCLUSIONS AND FUTURE WORK In this paper, we have presented a primary work for segmentation of lines, words and characters of Devnagari script. Nearly 100% successful segmentation achieved in line and word segmentation but character level segmentation needs more effort as it is complicated for Devnagari script. This is challenging work due to following reasons. • Compound letters are connected at various places. It is difficult to identify exact connecting points for segmentation. • Upper and lower modifier segmentation needs different approaches. • Separating anuswara (.) and full stop (.) from noise is critical as both resemble the same. Knowledge of natural language processing techniques needs to be applied here. • Handwritten unconnected compound letter segmentation is also critical. • Handwritten unintentionally connected simple letter segmentation is also critical. All these issues will be dealt in the future for printed and handwritten documents in Devnagari script by using various approaches. REFERENCES [1] Nallapareddy Priyanka, Srikanta Pal, Ranju Mandal, (2010) “Line and Word Segmentation Approach for Printed Documents”, IJCA Special Issue on Recent Trends in Image Processing and Pattern Recognition-RTIPPR, pp 30-36. [2] K. Wong, R. Casey and F. Wahl, (1982) “Document Analysis System”, IBM j. Res. Dev., 26(6), pp. 647-656. [3] G. Nagy, S. Seth, and M. Viswanathan, (1992) “A prototype document image analysis system for technical journals”, Computer, vol. 25, pp. 10-22. [4] Vijay Kumar, Pankaj K.Senegar, (2010) “Segmentation of Printed Text in Devnagari Script and Gurmukhi Script”, IJCA: International Journal of Computer Applications, Vol.3,pp. 24-29. [5] U. Pal and Sagarika Datta, (2003) “Segmentation of Bangla Unconstrained Handwritten Text”, Proc. 7th Int. Conf. on Document analysis and Recognition, pp. 1128-113.
  • 8. [6] Vikas J Dongre, Vijay H Mankar, (July 2011) “Segmentation of Devnagari Documents”, Communications in Computer and Information Science, 2011, Volume 198, Part 1, Springer proceedings, 1st International conference, ACITY Chennai, India, pp 211-218. [7] Vikas J Dongre, Vijay H Mankar, (2010) “A Review of Research on Devnagari Character Recognition”, International Journal of Computer Applications (0975 – 8887) Volume 12– No.2, pp. 8-15. [8] U. Pal, M. Mitra, and B. B. Chaudhuri, (2001) “Multi-skew detection of Indian script documents”, Proc. 6th Int. Conf. Document Analysis Recognition, pp. 292-296. [9] Likforman-Sulem L, Zahour A and Taconet B, (2007) “Text line Segmentation of Historical Documents: a Survey”, International Journal on Document Analysis and Recognition, Springer, Vol. 9, Issue 2, pp.123-138. [10] G. Magy (2000) “Twenty years of Document Analysis in PAMI”, IEEE Trans. in PAMI, Vol.22, pp. 38-61. [11] J. Serra, (1994) “Morphological Filtering: An Overview”, Signal Processing, vol. 38, no.1, pp.3-11. [12] Nafiz Arica, Fatos T. Yarman Vural, (2000) “An Overview of Character Recognition Focused On Off-line Handwriting”, IEEE C99-06-C-203. [13] Mohamed Cheriet, Nawwaf Kharma, Cheng-Lin Liu, Ching Y. Suen, (2007) “Character Recognition Systems: A Guide for students and Practitioners”, John Wiley & Sons, Inc., Hoboken, New Jersey. [14] Rajiv Kapoor, Deepak Bagai, T. S. Kamal, (2002) “Skew angle detection of a cursive handwritten Devnagari script character image”, Journal of Indian Inst. Science, pp. 161–175. [15] U. Pal, M. Mitra and B. B. Chaudhuri,(2001) “Multi-Skew Detection of Indian Script Documents”, CVPRU IEEE, pp 292-296. [16] V. H. Mankar et al, (2010) “Contour Detection and Recovery through Bio-Medical Watermarking for Telediagnosis”, International Journal of Tomography & Statistics, Vol. 14 (Special Volume), Number S10. [17] Guo Jing; Rajan D.; Chng Eng Siong, (2005) “Motion Detection with Adaptive Background and Dynamic Thresholds”, Fifth International Conference on Information, Communications and Signal Processing, Bangkok, W B.4, pp 41-45. Authors Vikas J Dongre received B.E and M.E. in Electronics in 19991 and 1994 respectively. He served as lecturer in SSVPS engineering college Dhule, (M.S.) India from 1992 to 1994. He Joined Government Polytechnic Nagpur as Lecturer in 1994 where he is presently working as lecturer (selection grade). His areas of interests include Microcontrollers, embedded systems, image recognition, and innovative Laboratory practices. He is pursuing for PhD in Offline Handwritten Devnagari Character Recognition. He has published one research paper in international journal and two research paper in international conferences. Vijay H. Mankar received M. Tech. degree in Electronics Engineering from VNIT, Nagpur University, India in 1995 and Ph.D. (Engg) from Jadavpur University, Kolkata, India in 2009 respectively. He has more than 17 years of teaching experience and presently working as a Lecturer (Selection Grade) in Government Polytechnic, Nagpur (MS), India. He has published more than 30 research papers in international conference and journals. His field of interest includes digital image processing, data hiding and watermarking.