Documente Academic
Documente Profesional
Documente Cultură
Brijmohan Singh, Nitin Gupta, Rashi Tyagi, Ankush Mittal, and Debashish Ghosh
Astt. Professor, Computer Science Deptt., College of Engineering Roorkee, Roorkee-247667, Uttarakhand, India bmsingh1981@gmail.com
Abstract. Fast and accurate algorithms are necessary for Optical Character Recognition (OCR) systems to perform operations on document images such as pre-processing, segmentation, extracting features, training-testing of classifiers and post processing. The main goal of this research work is to make segmentation accurate and faster for processing of large numbers of Devnagari document images using parallel implementation of algorithm on Graphics Processing Unit (GPU). Proposed method employs extensive usage of highly multithreaded architecture and shared memory of multi-cored GPU. An efficient use of shared memory is required to optimize parallel reduction in Compute Unified Device Architecture (CUDA). Proposed method achieved a speedup of 20x-30x over the serial implementation when running on a GPU named GeForce 9500 GT. Keywords: OCR, Segmentation, Parallelization, GPU, CUDA.
1 Introduction
Research on Devnagari character and word recognition is very difficult due to its challenging properties. This area of research is still open for further research due to the extent of variation among writing styles, speed, thickness of character and direction of different writers, Real-world handwriting is a mixture of cursive and noncursive parts, which makes the problem of recognition and synthesis more difficult, Similar looking characters may give ambiguity, Characters segment may touch where they should not or vice versa, variations and noises introduced during scanning and continuously increasing demand for accuracy, fast recognition, cheap and more practical to implement recognition system. The applications [1-3] of OCR such as form processing, automatic mail sorting, bank checks processing, and office automation for text entry. In handwritten document processing, half of the errors are due to segmentation. Segmentation process is challenging due to touching components, wide variety of handwriting styles, text line segmentation, location of word boundaries, overlapping of characters, identification of physical gaps between words and characters. Some elaborate studies on line, word and character segmentation are in [4-9]. In this work, we modified the traditional profiling based segmentation method and parallelized to make it faster using CUDA.
C. Singh et al. (Eds.): ICISIL 2011, CCIS 139, pp. 9297, 2011. Springer-Verlag Berlin Heidelberg 2011
93
94
B. Singh et al.
If Intensity is less than threshold Then increment the density for each row Output_kenel(image) Use to create an image Modify_kernel() Calculate average of all the vertical intensities and then check the leftover parts between neighbour segmented lines. Divide it in to two parts and compare the density of upper and lower halfs, using neighbour pixels and according to this results either neglect these part or embed with segmented image. End Function 3.2 Sequential and Parallel Implementation of Word Segmentation Method Proposed method for word segmentation for sequential processing was implemented first and then in CUDA to get more efficiency. Parallelized algorithm is more efficient than sequential in terms of time. The parallel implementation followed the structure shown in the pseudo code below: Input 2 D image, Threshold Vale Output Segmentated Words M : Image intensity matrix Density: An array having number of pixels less than threshold value. Minima : An array having the position from where image is to be segmented Subroutine main() Define a block and grid For each column in M Call Density_Kernel(Image) End For Set i:=0 For each column (j) in M If (Density[j] ==0 && (Density[j - 1] > 0 || Density[j + 1] > 0)) Then minima[i++]=j; End For While(minimaLength !=null) Calculate height between two rows Call Output_ Kernels(image) End While End Subroutine Density_kernel(image) If Intensity is less than threshold Then increment the density for each row Output_kenel(image)
95
Use to create an image Modify_kernel() Calculate average of all the horizontal intensities and then check the leftover parts between neighbour segmented lines. Divide it in to two parts and compare the density of upper and lower halfs, using neighbour pixels and according to this results either neglect these part or embed with segmented image. End Function
S.N.
Input Image
Proposed Method
1.
96
B. Singh et al.
S.N.
Input Image
Proposed Method
2.
3.
4.
Fig. 1. (continued)
Proposed Method
Parallel Implementation of Devanagari Document Image Segmentation Approach Table 1. Shown comparison of execution time CPU over GPU
97
Image 1.
2.
3.
4.
Execution time on CPU (Sec) 1.24 1.24 1.23 .61 .62 .61 1.12 1.13 1.12 1.91 1.93 1.91
Execution time on GPU(Sec) .0413 .0423 .0413 .0277 .0279 .0278 .0412 .0412 .0413 .0706 .0709 .0705
.61
.0277
22x
1.12
.0412
28x
1.91
.0707
27x
5 Conclusion
In this work a fast and modified profiling based segmentation algorithm has been presented and analyzed. The results of proposed method on the graphics device are very fast, with large two dimensional images than sequential algorithm. This algorithm serves as an excellent framework to solve a diverse array of problems. Parallelization plays important role in OCR research to speed up any algorithm to make faster processing.
References
1. Marinai, S.: Introduction to Document Analysis and Recognition. SCI, vol. 90, pp. 120 (2008) 2. Tang, Y.Y., Suen, C.Y., Yan, C.D., Cheriet, M.: Document Analysis and Understanding: a Brief Survey. In: First ICDAR 1991, France, pp. 1731 (September-October 1991) 3. Plamondon, R., Srihari, S.N.: On-line and Off-line Handwritten Recognition: A Comprehensive Survey. IEEE Trans. on PAMI 22, 6284 (2000) 4. Lecolinet, E., Crettez, J.: A Grapheme Based Segmentation Technique for Cursive Script Recognition. In: Proceeding of First ICDAR 1991, France, pp. 740748 (SeptemberOctober 1991) 5. Yanikoglu, B., Sandon, P.A.: Segmentation of Off-Line Cursive Handwriting using Linear Programming. Pattern Recognition 31(12), 18251833 (1998) 6. Plessis, B., Siscu, A., Menu, E., Moreau, J.W.V.: Isolated Handwritten Word Recognition for Contextual Address Reading. In: Proc. USPS 51h Advanced Technology Conference, vol. 27(1), pp. 158164 (November 1992) 7. Paquet, T., Lecourtier, Y.: Handwritten Recognition: Application on Bank Cheques. In: Proceeding of First ICDAR 1991, France, pp. 749757 (September/October 1991) 8. Leroux, M., Salome, J.C., Badard, J.: Recognition of Cursive Script Words in a Small Lexicon. In: Proc. of first ICDAR 1991, France, pp. 774775 (September/October 1991) 9. Chaudhuri, B.B., Pal, U.: Skew Angle Detection of Digitized Indian Script Documents. IEEE Trans. on Pattern Analysis and Machine Intelligence 19(2), 182186 (1997) 10. Nvidia Corporation, CUDA Zone, http://www.nvidia.com