Detecton and Removal of Graphcal Components n Pre-Prnted Documents N. Shobha Ran Department of Computer Scence, Amrta Vshwa Vdyapeetham, Amrta Unversty, Mysuru campus, Karnataka, Inda. Vneeth,P Department of Computer Scence, Amrta Vshwa Vdyapeetham, Amrta Unversty, Mysuru campus, Karnataka, Inda. Deeptha Ajth Department of Computer Scence, Amrta Vshwa Vdyapeetham, Amrta Unversty, Mysuru campus, Karnataka, Inda. Abstract Pre-processng of document mages s one of the most ntensve operatons for pre-prnted document mages. The recognton of text n pre-prnted documents s most senstve to graphcal components coexstng wth t. In ths paper we address the problem of detecton and removal of graphcal components lke logos, emblems and other symbolc enttes, whch leads to an error free document processng n the subsequent stages of Optcal Character Recognton. The detecton of graphcal enttes s performed by employng Zernke moments and hstogram of gradent features, followed by whch the lne detecton and removal s accomplshed by maskng the mage wth a vertcal lne structurng element by computaton of regon covered by convex hull wthn the area by structurng element n the mage. The detecton of lne structurng element also addresses the problem of characters overlappng wth lnes leadng to retenton of the character durng eroson of lnes from the mage. The expermental outcomes produced by emblem detecton of algorthm are apprecable wth accuracy of around 97% for the emblem detecton and 92% accurate outcomes n case of lne detecton and removal. Keywords: emblem detecton, graphcal components, preprnted documents, lne detecton, moments and HOG features. Introducton Enhancement of document mage pror to Regon of Interest (ROI) processng s the nclnaton of effcent optcal recognton systems. The document mages are of vared categores. There are document mage rangng from smple text to documents wth fully complex gradent detals. The smple text documents are composed ether prnted or handwrtten text, whereas few documents are composed of handwrtten as well as prnted text. There are stll some hybrd documents whch consst of both graphcal and textual components, ths type of documents are termed as pre-prnted documents [1]. The pre-prnted documents are prnted by Government or prvate organzatons, as per the varety of job requrements that are relatve to ther task accomplshments. These documents are defned wth a pre structured layout ndcatng varous felds for data entry. It s also conssts wth nformaton lke company name, purpose, captons, logos and symbolc enttes ndcatng the detals of organzaton, department etc. These graphcal dacrtcs are overlad wth text n most of the documents durng the process of data entry. The detecton and removal of all these graphcal elements may lead to the error free subsequent processng, that s segmentaton, feature extracton, classfcaton, and fnally result to an accurate character recognton by OCR. Snce text exst s the very mnute gradent nformaton that s senstve to the nosy content n the mage and when ths textual portons are bounded or overlad wth the graphcal enttes lke horzontal or vertcal lnes, presence of logos, symbols, photos etc. It ncreases conflcts n accurate resoluton process of textual components n the mage. The accurate resoluton of textual components n the mage s connected mostly wth the pure textual mages. Therefore t s very much sgnfcant to have the mage free from all the graphcal enttes that are mentoned above. The present work focuses on pre-processng of pre-prnted document mages. The pre-prnted documents n the proposed work belongs to the regons of Anantapur dstrct of Andhra Pradesh state. Fgure 1 depcts one of such pre-prnted document. The pre-prnted document represented n fgure 1 conssts of prnted components, handwrtten and other graphcal components lke horzontal or vertcal edges, symbols, logos etc. The varous graphcal enttes that we propose to work on are as depcted n Fgure 2. The graphcal enttes that are n Fgure 2 may obstruct the process of text recognton. Ths requres the separaton of graphcal enttes from the textual portons. Thus t s more crucal to detect and remove the graphcal enttes. There are numerous expermentatons n the lterature addresses more on pre-processng of the document mages. Moreover the preprnted documents dffers from one type of organzaton to the other. Some of the expermentatons that are revsed n the lterature are dscussed below. 4849
Fgure 1: The pre-prnted document Fgure 2: Types of graphcal enttes Gatos et. al. [2] had proposed an algorthm for automatc table detecton n documents usng lne length and lne wdth estmaton by usng edge detecton operators.yefenget. al [3] had contrbuted an algorthm to detect the severely broken parallel lnes n handwrtten document mages based on drectonal sngle connected chan method usng three parameters called skew angle, vertcal lne gap and vertcal translaton. The expermentaton had produced results of around 94% for Arabc documents. Shobhaet. al [4], proposed a generc lne elmnaton methodology for removal of horzontal grd lke structures usng crcular structurng element for applcaton form mages and had acheved an accuracy of more than 90%. Png et. al. [5], proposed a novel face detecton system usng hybrd feature extracton and three set of face features are extracted. Ths system acheved accuracy of 95%. Blal et. al. [6] had proposed an adaptve local Bnarzaton method for document mages whch ncludes two type of experments: vsual experment provdes a clear dea of the mage and an analytcal test that provdes a statstcal measurement based on a benchmark dataset and evaluaton measurement and gave best performance. Subhadpet. al. [7] had developed a novel framework wth the mplementaton of Hough transform for recognton of postal codes n Latn, Devnagr, Bangla and Urdu scrpt from multscrpt postal address block. Ths work acheved around 98% postal-code localzaton accuracy. Manjunathet. al. [8], descrbed the study of robust text detecton n color and regular mage. Frst stage used combnaton wavelet transform and Gabor flter to extract sharpened edges and textural features of the mage. In second stage wavelet entropy s mposed to get the further expermental values. They acheved 97.9% of accuracy. Battsta et. al. [9] had proposed a comprehensve survey and categorzaton of computer vson and pattern recognton technques proposed so far aganst mage spam, and make an expermental analyss and comparson of some of them on real, publcly avalable data sets. Alvaro et. al [10], contrbuted a robust method to localze and recognze text n natural mage usng CC-based approach that extract and dscard basc letter canddates usng a seres of easy and fast-to compute features. Rohanet. al. [11], had presented a completely automated way to detect bran tumor. Boundng box method usng symmetry s used to detect the locaton of tumor and they acheved good accuracy. Aswnet. al. [12], had proposed a system mplements SURF to extract local features from logos and to match the features. They proposed a smple and compact SURF algorthm. Prof. Mrnalneeet. al.[13], developed an mproved approach for logo detecton and recognton. They used SIFT and CDS to extract feature and match the mage logo. Amrapalet. al. [14], extended CDS method to mplementng scalable and hghly effectve method for logo detecton.frojet. al. [15] had used boundng boxes by morphologcal dlaton for the segmentaton of Arabc word. They have tested approprate methods on documents of Arabc scrpt and thers have obtaned encouragng results from proposed technques. Vctor et. al. [16] had dscussed how the boundng box can be further used to mpose a powerful topologcal pror, whch prevents the soluton from excessve shrnkng and ensures that the user provded box bounds the segmentaton n a suffcently tght way. Thawaret. al. [17], n ther paper three knds of moments: Geometrcal, Zernke and Legendre moments have been evaluated for classfyng 3D object mage usng Nearest Neghbor classfer. Subhajtet. al. [18] had proposed an effcent algorthm for recognzng palm prnts for bometrc dentfcaton of ndvduals by complex Zernke moments are constructed usng a set of complex polynomals. Jyotsnaranet. al. [19], presented a reconstructon of the basc characters n Orya text, whch can handle dfferent font szes and font types, by usng Hu s seven moments and Zernke moments. Dptet. al. [20], dscussed the form mage regstraton technque and the mage maskng and mage mprovement technques mplemented n ther system as part of the character mage extracton process. To best of our knowledge the works reported n the lterature focus on graphcal component detecton specfc to the type of documents that are proposed to work n ther research and none of the works addresses the problem of emblem detecton wth respect to the e-seva documents belongng to the regons 4850
of Andhra Pradesh state. Thus, we propose to work on the detecton of emblems and lnes nherent n pre-prnted e-seva documents. Proposed Methodology The proposed methodology for detecton and removal of graphcal components n pre-prnteddocuments s comprsed of two crucal stages. The stage one prefers the processng of graphcal components lke emblems and logos. Horzontal and the vertcal lne overlad wth the text s accomplshed n stage two. The block dagram of proposed methodology s depcted n Fgure 3. If D represents a pre-processed mage whch s subjected to capture the varous objects. The objects n the document are captured by employng boundng box construct, whch encloses a set of pxels fully connected wth n a rectangle to ts borders. The set of pxels fully connected represents an object that can be ether a graphcal component lke emblem or logo or character mages. D Fgure 3: Block dagram of graphcal entty detecton system The subsecton A and B descrbes the methodologes for logo and emblem detecton and detecton of horzontal and vertcal lnes Detecton of graphcal enttes - logos and emblems In stage 1, the proposed methodology for the detecton and removal of graphcal enttes from applcaton form mages has been addressed. Here we manly focus on the detecton of graphcal enttes lke emblems and logos n the pre-prnted documents. The detecton and removal of emblems from applcaton form mages wll reduces the computatonal conflcts durng segmentaton and classfcaton of characters and renders to an error free recognton by OCR. The algorthm for emblem detecton and removal ntally prompts the user for acquston of pre-prnted document mage as nput. The acqured nput s subject to pre-processng to obtan a transformed and enhanced bnary mage. Further the bnary mage s processed to connect all the broken gradent detals by employng morphologcal brdge operaton [21]. The detecton of emblems s accomplshed by trackng all the objects n the mage wth boundng boxes and flterng t further to dentfy only the requred graphcal enttes. Fnally the Hstogram of Gradent and Zernke moments features are computed for the detecton of boundng box wth emblems or logos. Fgure 4 depcts the block dagram of algorthm for emblem or logo detecton. Fgure 4: Flow chart of proposed algorthm Obj, Obj, Obj... n Let 1 2 3 Obj are the objects captured by applyng boundng boxes to pre-processed mage D. Each object Obj wll be nterpreted to dentfy whether the Obj Class( C ) or h Obj Class( G ) where 1,2,3... n, Class( C ) Class( Gc ) c h and represents the set of objects wth textual components and graphcal components. Fgure 5 and fgure 6 presents the pre-processed mage and the objects captured wthn the mage usng boundng boxes. Once the objects are captured n the mage, each object Obj s nspected to check whether t s maxmum area boundng box or not. The maxmum area boundng boxes exsts for those objects wth graphcal enttes lke logos, photos and emblems and termed as max area objects M as shown n fgure 7. obj 4851
Fgure 7: maxmum area objects Fgure 5: Pre-processed mage The max area objects M obj are fltered from the other objects.e., objects wth textual components. If H s the flter appled on each object to flter the max area objects, then flterng of max area objects s gven by equaton (1) M H Obj (1) obj () ( ) The flter H mples a transformaton to detect whether t s max area object or not. The flter H s assocated wth a crteron gven by equaton (2). (2) The flter returns the top two maxmum length boundng boxes whch are usually called as nested objects. The outcome of flterng transformaton s shown n fgure 8. Once the nested objects are detected, each nested object N s subjected to undergo the concatenaton transformaton Obj that converts a nested object nto a smple object. The concatenaton transformaton C combnes all the smaller boundng boxes nto a boundng box of maxmum length and wdth. The concatenaton transformaton C s gven by equaton (3). Obj C ( N ) (3) T obj T T Fgure 6: Image wth objects detected usng boundng boxes Fgure 8: The result of flterng transformaton H 4852
The fgure 9 represents the smple object applyng concatenaton transformaton C. T Obj obtaned after The graphcal representaton for the ph value computed for the emblem and the other graphcal components are shown n the fgure 10 below. Fgure 9: Result of Concatenaton transformaton C T The transformed nested objects are forwarded for classfcaton of objects nto varous graphcal enttes that nclude logos, photos and emblems. The classfcaton n the proposed methodology accomplshed through the hstogram of gradent (HOG)[22]and Zernke moments features respectvely, the classfcaton s performed by thresholdng operatons on the feature value extracted. Once we get the bggest boundng box after concatenaton transformaton, Itmake sure that the algorthm detected the logo only. Ths detecton stage s done wth the help of moment and HOG values. From the expermentaton result(refer table 1) for fourth order Zernke moment, the degree of rotaton s negatve(e, ant-clockwse) for emblems. Smlarly for dentfyng e-seva emblem HOG descrptor s used. Proposed algorthm fnds the range of HOG value for the specfc type of emblem from a set of 30 emblems. Then ths range s used for further classfcaton. Zernke Moments Generally moments explans numerc quanttes at some dstance from one reference pont or one axs. The man advantage of usng Zernke moment s better accuracy and smple rotaton nvarance. Zernke moments are used here to fnd the ph value (degree of rotaton) of the emblem detected n the applcaton form mages.the gven table 1 gven below shows few observed ph values. Fgure 10: features of zernke moments n degrees Here the negatve value clearly shows that the graphcal components are emblem where as features n a negatve value ndcates other graphcal components. HOG Descrptors The man objectve of Hstograms for orented gradents (HOG) s object detecton. The basc dea s, local shape nformaton often s well descrbed by the dstrbuton of ntensty gradents or edge drectons even wthout precse nformaton about the locaton of the edges themselves. The HOG features dffers greatly from a boundng box wth emblem to a boundng box wth smple text, thus we employ HOG features n our work The computed HOG features for varous types of emblems depct a great dssmlarty n features of graphcal component to a non-graphcal component. Table 2 shows an overvew of HOG descrptor features of the varous graphcal components detected. Table 2: Hog descrptor values Table 1: Phase angle of the moment n degree 4853
Fgure 13: Detecton of horzontal and vertcal lnes and removal Fgure 11: HOG descrptor features The gven fgure 11 shows the graphcal representaton for the HOG descrptor. After detectng emblems n the applcaton form mages, t converts nto the background pxels. So t wll remove from the mage. Result of ths proposed algorthm n applcaton form mages s shown n fgure 12below. Fgure 12: Applcaton form mage before and after applyng the algorthm Detecton of horzontal and vertcal lnes In ths second stage, the proposed algorthm focuses on the detecton and removal of horzontal and vertcal lnes from the pre-prnted applcaton form mages. The applcaton form mages for undergoes for the ntal pre-processng operatons lke bnarzaton and nose reducton. From the bnarzed mage the contnuous count of black pxel values locate the poston of horzontal or vertcal lne. Rectangular element mask After dentfyng the horzontal and vertcal lnes the maskng operaton s employed usng rectangular structurng element.a 11 x 2 rectangular element mask wth ts mddle row as the target used here to detect the horzontal lne and n the same way a 2 x 11 rectangular element mask wth mddle column as target used for the detecton of vertcal lnes. Fgure 13 gves an overvew of the algorthm proposed by rectangular structurng element. For removng the vertcal lne presented n the applcaton form mages the mask wll move through the dentfed row wth orgn of mask as the target pxel. The 2 x 11 mask determnes the presence of black pxels and f more than 20 percentage of row length, the contnuous black s encountered to ts rght then the target pxel wll replace wth back ground. The same method wll repeat wth 11 x 2 mask for the removal of horzontal lne Expermental Analyss The expermental analyss n the proposed system s conducted on the datasets of around 80 pre-prnted documents. The documents are collected from the e-seva centers of Andhra Pradesh regons. The accuracy n the proposed system s defned ndvdually for stage 1 and stage 2. The accuracy of emblem detecton s the number of emblems correctly detected D to the total number of graphcal components orgnally detected D as gven by equaton Accuracy D c D c (4) The accuracy n stage 2 s the number of lnes detected correctly L to the total number of lnes present L n the c mage as gven n equaton (5). Accuracy L c (5) L The expermental outcomes of the proposed system are as depcted n fgure 14. Fgure 14: Accuracy of proposed methodology 4854
Concluson The proposed algorthm for emblem detecton has employed boundng boxes for detecton of objects and features of Zernke moments and HOG descrptors for the detecton and removal of emblems n the applcaton form mages. The Boundng box s very effcent detecton of the objects n the applcaton form mages and the features employed are consstent and adequate enough n detecton of objects wth emblems. For the specfc e-seva emblem ths proposed algorthm workng wth hgh effcency and for the other graphcal components t provdes satsfactory results. The algorthm proposed for the vertcal and horzontal lne detecton and removal works effcently n detecton horzontal and vertcal lnes. In future, the work can be further extended to remove lnes where text s overlappng. The proposed work s applcable for the pre-prnted document of varous languages. The dynamc detecton threshold values for the emblem and lne detecton can consdered as a future work. References [1] Akram, S., Dar, M.D. and Quyoum, A., 2010. Document Image Processng-A Revew. Internatonal Journal of Computer Applcatons, 10(5), pp.35-40. [2] Gatos, B., Danatsas, D., Pratkaks, I. and Perantons, S.J., 2005. Automatc table detecton n document mages.in Pattern Recognton and Data Mnng (pp. 609-618).Sprnger Berln Hedelberg. [3] Zheng, Y., L, H. and Doermann, D., 2003, August. A model-based lne detecton algorthm n documents.in Document Analyss and Recognton, 2003.Proceedngs. Seventh Internatonal Conference on (pp. 44-48). IEEE. [4] Shobha Ran N, Vasudev T., 2014. A Generc Lne Elmnaton Methodology usng Crcular Masks for Prnted and Handwrtten Document Images, Proceedngs of second nternatonal conference on emergng research n computng, nformaton, communcaton and applcatons, ERCICA, ISBN: 9789351072638. [5] Zhang, P. and Guo, X., 2012. A cascade face recognton system usng hybrd feature extracton. Dgtal Sgnal Processng, 22(6), pp.987-993. [6] Bataneh, B., Abdullah, S.N.H.S. and Omar, K., 2011. An adaptve local bnarzaton method for document mages based on a novel thresholdng method and dynamc wndows. Pattern Recognton Letters, 32(14), pp.1805-1813. [7] Basu, S., Das, N., Sarkar, R., Kundu, M., Naspur, M. and Basu, D.K., 2010. A novel framework for automatc sortng of postal documents wth multscrpt address blocks. Pattern Recognton, 43(10), pp.3507-3521. [8] Aradhya, V.M., Pavthra, M.S. and Naveena, C., 2012. A robust multlngual text detecton approach based on transforms and wavelet entropy. Proceda Technology, 4, pp.232-237. [9] Bggo, B., Fumera, G., Plla, I. and Rol, F., 2011. A survey and expermental evaluaton of mage spam flterng technques. Pattern Recognton Letters, 32(10), pp.1436-1446. [10] González, Á. and Bergasa, L.M., 2013. A text readng algorthm for natural mages. Image and Vson Computng, 31(3), pp.255-274. [11] Kaus, M.R., Warfeld, S.K., Nabav, A., Black, P.M., Jolesz, F.A. and Kkns, R., 2001. Automated segmentaton of mr mages of bran tumors 1.Radology, 218(2), pp.586-591. [12] C. Aswn, D. Chtra., 2014, Enhanced Logo Matchng and Recognton usng SURF Descrptor. Internatonal Journal of Engneerng Research & Technology (IJERT). Vol. 3.4, ISSN: 2278-0181. [13] Prof. MrunalneePatole, MeeraSambhajSawalkar., 2014, Improved approach for logo detecton and recognton. Internatonal Journal of Emergng Trends & Technology n Computer Scence (IJETTCS).ISSN 2278-6856.Vol 3.6. [14] Amrapal A. Dudhgaonkar, Prof. N.N. Thune., 2014, Novel and Scalable Soluton for Logo Detecton and Recognton usng CDS method. Internatonal Journal of Engneerng Research & Technology (IJERT). ISSN: 2278-0181.vol 3.6 [15] Parwej, F., 2013. A Perceptve Method for Arabc Word Segmentaton usng Boundng Boxes by Morphologcal Dlaton. Internatonal Journal of Computer Applcatons, 71(1). [16] Lemptsky, V., Kohl, P., Rother, C. and Sharp, T., 2009, September. Image segmentaton wth a boundng box pror.in Computer Vson, 2009 IEEE 12th Internatonal Conference on (pp. 277-284).IEEE. [17] Arf, T., Shaaban, Z., Krekor, L. and Baba, S., 2009. Object classfcaton va geometrcal, zernke and legendre moments. Journal of Theoretcal and Appled Informaton Technology, 7(1), pp.31-37. [18] Karar, Subhajt, and Ranjan Parekh., 2012, "Palm Prnt Recognton usng Zernke Moments." Internatonal Journal of Computer Applcatons 55.16. [19] Trpathy, J., 2010. Reconstructon of orya alphabets usng Zernke moments. Internatonal Journal of Computer Applcatons (0975-8887), 8(8). [20] Deodhare, D., Sur, N.R. and Amt, R., 2005. Preprocessng and Image Enhancement Algorthms for a Form-based Intellgent Character Recognton System. IJCSA, 2(2), pp.131-144. 4855
[21] Dougherty, Edward R., Roberto A. Lotufo, and The Internatonal Socety for Optcal Engneerng SPIE., 2003, Hands-on morphologcal mage processng. Vol. 71. Washngton: SPIE Optcal Engneerng Press. [22] Dalal, N. and Trggs, B., 2005, June. Hstograms of orented gradents for human detecton.in Computer Vson and Pattern Recognton, 2005.CVPR 2005.IEEE Computer Socety Conference on (Vol. 1, pp. 886-893).IEEE. 4856