International Journal of Computer Theory and Engineering, Vol. 2, No. 3, June, 2010 1793-8201 329 Abstract – To make use of non editable scanned image of thedocument, one has to pass through the recognition process. The recognition process consists of sub processes like pre processing, segmentation and then recognition. Segmentation process is the most significant process because if the segmentation is incorrect then we can not have the correct result, it is just like garbage in and garbage out. On the same time it is one of the complex processes too. It is more difficult if the document is handwritten because in that case only few points are there which can be used to make segmentation. In this paper, we tried to formulate a procedure which is used to segment the scanned document image into lines then into words and finally to characters. For that purpose we used the concept of flexible window, that is, the window whose size can be adjusted according to needs. One module is designed to find the window. Same module is used to get the different types of outputs (lines, words, and characters) with a little bit adjustment to parameters passing as well as to the procedure itself. The concept was applied to different documents and we got good reasonable results. Index Terms — OCR, Segmentation, Handwritten, Flexible, Window. I. INTRODUCTION The objective of automatic document processing is to recognise text, graphics and pictures in digital images and extract the intended information, as would a human. Textual and graphical are two categories of document processing dealing, respectively, with the text and the graphics components of a document image. Document processing leads to the theory of optical character recognition (OCR). But before recognising the character it is required to segment area which would have that character. So to have such area, a perfect segmentation of characters is required before individual characters are recognized. Therefore segmentation techniques are to apply to word images before actually putting those images to reorganization process. The simplest way to segment the characters is to use inter – character gap as a segmentation point. However, this technique results in partial failure if the text to be segmented contains touching characters. If the document is made up of handwritten characters then the situation becomes complex. Our work is related with the segmentation of handwritten text written in Gurmukhi script which is one of the popular scripts used to write Punjabi , a popular spoken language of northern India. Gurmukhi script alphabet consists of 41 consonants and 12 vowels. Besides these, some characters in the form of half characters are present in the feet of characters. Writing style is from left to right. In Gurmukhi, there is no concept of upper or lowercase characters. A line of Gurmukhi script can be partitioned into three horizontal zones namely, upper zone, middle zone and lower zone. Consonants are generally present in the middle zone. These zones are shown in figure1. The upper and lower zones may contain parts of vowel modifiers and diacritical markers. Figure 1 : a) Upper zone from line number 1 to 2, b) Middle Zone from line number 3 to 4, c) lower zone from line number 4 to 5 II. PRE PROCESSING The image file is in grey scale. But we require two types of information – either zero or one. For that purpose, we calculated the average of intensities of all the pixels present in the document image file. Then the intensity of each pixel is set as per the following rule: if (pixel intensity < Average intensity) then pixel intensity = 0 else pixel intensity = 1 The quality of scanned image depends upon the scanner type too and it plays an important role in segmentation. We are using higher end scanner for the scanning purposes. But even if some impurities are introduced due to used paper quality or due to scanner quality then these are taken care by using anti – windowing concept. As per this concept, first the area is searched with a window of width dw. If there is only few pixel and nothing is around the window then those intensities of present pixel values are set to zero. The words and characters are handwritten. Between any two lines and any two words there is a definite gap of minimum width. A line is supposed to have different words and the words are made up of one or more characters. The lines consisting of words are generally straight in nature. If there is any skew then present work may not work properly. III. FLEXIBLE WINDOW Flexible window is the window which can be adjusted as per the change in the requirements. Here is the concept to get a window which is flexible in size: From the image’s starting point (generally it is 0, 0), get first pixel position present in a row and move towards right side to get right most pixel position i.e. get first and last Detection and segmentation of Handwritten Text in Gurmukhi Script using Flexible Windowing Rajiv Kumar and Amardeep Singh