[go: up one dir, main page]

Academia.eduAcademia.edu
DANUBE ADRIA ASSOCIATION FOR AUTOMATION & MANUFACTURING DAAAM INTERNATIONAL VIENNA PDF OFF-PRINTS Author(s): BOIANGIU, C[ostin] A[nton] & RADUCANU, B[ogdan] This Publication has to be referred as: Boiangiu, C.A. & Raducanu, B. (2008). Effects of Data Filtering Techniques in Line Detection (2008). 0125-0126, Annals of DAAAM for 2008 & Proceedings of the 19th International DAAAM Symposium, ISBN 978-3-901509-68-1, ISSN 1726-9679, pp 063, Editor B. Katalinic, Published by DAAAM International, Vienna, Austria 2008 www.daaam.com DAAAM INTERNATIONAL VIENNA – VIENNA UNIVERSITY OF TECHNOLOGY Austrian Society of Engineers and Architects – ÖIAV 1848 Annals of DAAAM for 20008 & Proceeding gs of the 19th International DAAA AM Symposium, ISSN 1726-96799 ISBN N 978-3-901509-668-1, Editor B. Kaatalinic, Publisheed by DAAAM Innternational, Vien nna, Austria 20088 Makke Harmony Between Technology and a Nature, and Y Your Mind will Fly F Free as a Birdd E EFFECTS OF DATA FILTERIN NG TECHN NIQUES IN N LINE DE ETECTION N BOIANG GIU, C[ostin] A[nton] & RADUCANU, R , B[ogdan] Abstract: Linne detection haas a key role in any Autom matic Content Convversion system m. Such system ms generate digital d models and documents from fr scanned paper copiees of D this prrocess, one off the newspapers, books, etc. During subtasks is thee classification of regions from m the input imagge as different docuument entities. For F example groups g of charaacters should be classsified as paraggraphs, whereaas groups of aliigned non-characterr elements shoould be classif ified as lines. The detection of lines is very heelpful in the unnderstanding of the s colum mns in structure of a parsed documeent: lines can separate p or they can form a tablee whose structuure is a newspaper page, otherwise impossible to extraact. Key words: automatic conntent conversion, line detecction, form, document digitization, daata filters Hough Transfo Fig. 1. Discrete Linne Parameterizaation In an n image with heeight h, a line ddescribed by throu ugh the points 1. INTRODU UCTION D moduule is typically implemented at a the The Line Detection software appliication level off an Automatic Content Conveersion System. This module is beiing fed a black and white im mage which holds enough e informaation to solve the t considered task. The desired ouutput is a collecction of lines reepresented eithher by their analyticaal parameters orr by a list of pixxel collections (each ( made of a series of connectedd black pixels). This task proves to be less l straightforrward than it might m seem as linees are often imperfect, conntaining noisees or deformations. The line detecction module shhould be develloped b able accept a set of calibraating parameterrs (in such that to be order to help it cover the broaad range of possible line types). There are a number of approaches too the line deteection problem. Amoong the most poopular and reseearched are the ones based on votting, firstly inntroduced alonng with the Hough H Transform meethod. Their effficiency lies in their ability too deal with noises (D Duda & Hart, 19972). 2. THE HOU UGH TRANS SFORM When usinng the Hough Transform, linnes are viewed as a ( ρ ,θ ) . A line equation pair of polar parameters, p e in term ms of these parameteers would be (P Princen et al., 19992): ρ = y * sin θ + x * cosθ ( x0 ,0) and (xx0 , dx) ( x0 + dx, h) . Retrieving R the lines from the vvoting space iss a fundamentall prob blem and requuires a well thhought approacch (Niblack & Petk kovic, 1990). When W working with scanned nnewspaper or book b pages, thee accu umulator is flooded with votees from the larrge contents off charracters. It is impportant to find a stable threshold mechanism m so characters do noot yield many faalse lines. 4. PARAMETER P R SPACES Looking L at the voting space aas a greyscale image i (brighterr pixeels correspond to t higher votingg counts) we ob btain a visual off the voting v process. One O way to exxtract informatiion from the tw wo spaces is too find points with vaalues above a tthreshold. Linees imply a highh num mber of votes, thhus they will paass the threshold d. The problem m is th hat characters arre responsible ffor the majority y of votes. Thee diffeerence betweenn a false line pooint and a correcct line point, inn term ms of votes, couuld be very smaall (5%) and it is i impossible too estab blish a thresholld in this case. A second apprroach is to annalyze local maxima m points.. Charracters particippate with highh probability with w the samee num mber of votes to a set of lines so they will not influence locall max xima. The probllem with this aapproach is thatt the parameterr spacce is constructeed point by poinnt and this heav vily affects thee conttinuous nature of o local maximaa. (1) Every poinnt in the input im mage counts ass a vote for eachh line it may lay on. In the generated parrameter spacee (or o by accumulator) lines are identtified either as a maximum or applying a threeshold (Sklankssy, 1978). 3. DISCRET TE LINE PAR RAMETERIIZATION Following the approach of the Hough Transform, T we have developed a syystem which em mploys a differeent parameterizzation in order to achhieve better ressults for our paarticular targets. The parameterizatiion of a line is set in terms off the pair ( x0 , dx) and called Discrete D Parameterization - it i was designeed to resemble a diggital line, as draawn onto a discrrete memory sppace. passess Fig. 2. a) Input Imaage, b) Discretee Space, c) Houg gh space 5. FILTERING THE PARAMETER SPACES Both problems presented above can be solved by using resampling filters. Such a filter modifies the points in the parameter space and assigns them new values based on a weighted sum their neighbours’ values. The filters have a macro scale effect of blurring or smoothing the space, which is the exact solution for the local maxima sweep problem. Particularly useful for this is the Triangle filter (Umbaugh, 2005). ⎧1− | t |, | t |< 1 T (t ) = ⎨ ⎩0, otherwise (2) Fig. 4. Negative Lanczos Filtering, a) Discrete Space, b) Hough Space Equation (2) shows a one dimensional Triangle filter. To apply this to the two dimensional parameter space, we first apply it for every row and obtain a preliminary array. Finally we apply the filter again for each column, thus obtaining a 2D effect. This approach is only possible for symmetrical filters such as this one. The Triangle Filter gives higher weights to points closer to the origin point and lower values as points are further apart, thus real local maxima are enhanced while false maxima are decimated. The filter has overcome this problem and in the resulting space, the lines have become more obvious. A thresholding scheme can now be applied with greater stability as the range of possible values has been greatly decreased. Points with high vote counts are now more visible, in the sense that they strongly disperse from the vote average. This effect is caused by the special quality of the Lanczos filter to normalize high frequency values while enhancing peak values. These examples show how filtering the parameter spaces can enhance particular characteristics and turn out helpful in determining the intended points. Depending on the desired characteristics, other filters can be used. A median filter can be used first to diminish noises propagated in the parameter space. To further enhance local maxima, a Gauss convolution filter may be applied. For larger kernel dimensions, a Gauss filter can prove more accurate than the Triangle filter. 6. CONCLUSIONS Fig. 3. Triangle Filtering, a) Discrete Space, b) Hough Space The parameter spaces in Fig. 3. have been filtered with a Triangle Filter. Correct local maxima (represented by bright pixels) are more obvious now, while noise generated maxima disappeared. To solve the thresholding problem, a different, more complex, filter is adopted. This is the Lanczos scaling filter. t ⎧⎪ sin c(t ) * sin c( ),−a < t < a L(t ) = ⎨ a ⎪⎩ 0, otherwise (3) Equation (3) represents a one dimensional Lanczos filter. It is applied to the two dimensional parameter space first rowwise then column-wise. The Lanczos filter is typically used for scaling images because it has the property that it retains protruding aspects of the original image, producing results of higher quality. To diminish the effects of the large number of characters on the voting space, we first apply the Lanczos filter on the space and then we subtract the original space from it. This is called a Negative filter effect and the results are shown in Fig. 4. Before applying this filter, the parameter space was heavily composed of the votes generated by characters. Lines were difficult to detect because their vote count was negligible higher than the average. When working with digital signals, such as images or sounds, there is no stable way of extracting certain characteristics like maximums, frequencies or gradients. Hence, an important preprocessing is the naturalization of the signal which leads to resampling of the discrete data in order to conform to a continuous domain. In this paper we have shown how resampling an input image, considered as a two dimension array of data, can enhance its characteristics and improve the computation of useful information about it. Statistical methods, like the ones proposed in this paper, are a powerful method of solving difficult tasks without a deterministic solution. Hence, these filtering techniques may prove useful in determining a good approximating solution for a problem in any domain. 7. REFERENCES Duda, R. & Hart, P. (1972). Use of the Hough Transformation to Detect Lines and Curves in Pictures, Comm. ACM, Vol. 15, Issue 1, (January 1972) pp. 11–15, ISSN: 0001-0782 Niblack, W. & Petkovic, D. (1990). On improving the accuracy of the Hough Transform, Mach. Vision Appl,. Vol. 3, Issue 2, (March 1990) pp. 87–106, ISSN: 0932-8092 Princen, J.; Illingworth, J. & Kittler, J. (1992). A Formal Definition of the Hough Transform: Properties and Relationships, JMIV, Vol. 1, No. 2, (July 1992) pp. 153168, ISSN: 0924-9907 Sklanksy, J. (1978). On the Hough Technique for Curve Detection, IEEE Transactions on Computers, Vol. 27, Issue 10, (October 1978) pp. 923-926, ISSN: 0018-9340 Umbaugh, S. E. (2005). Digital Image Analysis and Processing, CRC, ISBN: 0849329191