pattern recognition lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/prl2014.pdfh. chatbri, k....

10
Using scale space filtering to make thinning algorithms robust against noise in sketch images q Houssem Chatbri a,, Keisuke Kameyama b a Graduate School of Systems and Information Engineering, Department of Computer Science, University of Tsukuba, Japan b Faculty of Engineering, Information and Systems, University of Tsukuba, Japan article info Article history: Received 15 August 2013 Available online 31 January 2014 Keywords: Thinning algorithm Robustness against noise Scale space filtering Sketch image preprocessing abstract We apply scale space filtering to thinning of binary sketch images by introducing a framework for making thinning algorithms robust against noise. Our framework derives multiple representations of an input image within multiple scales of filtering. Then, the filtering scale that gives the best trade-off between noise removal and shape distortion is selected. The scale selection is done using a performance measure that detects extra artifacts (redundant branches and lines) caused by noise and shape distortions intro- duced by high amount of filtering. In other words, our contribution is an adaptive preprocessing, in which various thinning algorithms can be used, and which task is to estimate automatically the optimal amount of filtering to deliver a neat thinning result. Experiments using five state-of-the-art thinning algorithms, as the framework’s thinning stage, show that robustness against various types of noise was achieved. They are mainly contour noise, scratch, and dithers. In addition, application of the framework in sketch matching shows its usefulness as a preprocessing and normalization step that improves matching performances. Ó 2014 Elsevier B.V. All rights reserved. 1. Introduction Thinning algorithms are classic in digital image processing and used to extract a pattern’s skeleton, that is a thin or nearly thin rep- resentation of the pattern [1]. Thinning algorithms have been used in many applications such as OCR [2,3], document image analysis [4,5], fingerprint identification [6,7,8], biometric authentication using retinal images [9,10], signature verification [11–13], sketch matching and sketch-based image retrieval [14–17], etc. In OCR, thinning is used as a normalization step to insure invariance to pen thickness and handwriting styles. In fingerprint identification, thinning is used as a key preprocessing step essential before fea- ture extraction. In authentication systems using retinal images, thinning is applied in order to produce a one-pixel-wide vascular tree of blood vessels, whose geometrical and topological properties are used in the identification process. In document analysis, signa- ture verification and sketch-based image retrieval, thinning is used as a preprocessing and normalization step. A thinning algorithm is considered desirable if it meets the fol- lowing properties [1,18]: produce a thin or nearly thin skeleton; preserve the connectivity of the original pattern, which means that connected parts in the original pattern should stay con- nected in the skeleton; preserve the visual topology of the original pattern, which means that although the skeleton is a compact representation of the original pattern, it should deliver the same visual information; be robust against noise. Although many thinning algorithms have been presented, the criteria above are rarely met altogether. Usually, choosing a partic- ular thinning algorithm is an application dependent issue moti- vated by the ability of the algorithm to fulfill a particular criterion among the mentioned above. For instance, the necessity of producing one-pixel-wide skeletons is a priority in some appli- cations [19], however it is sacrificed in other applications in order to preserve the topology of the pattern [18]. While many thinning algorithms have satisfying performances regarding connectivity and topology preservation, most of the algorithms are sensitive to noise [11,20]. Using a state-of-the-art thinning algorithm [21] to thin the noisy patterns in Fig. 3(a) gave the results in Fig. 3(b). Such noisy skeletons are a challenge for applications such as OCR [22], Content-Based Image Retrieval [19], and fingerprint recognition [7]. http://dx.doi.org/10.1016/j.patrec.2014.01.011 0167-8655/Ó 2014 Elsevier B.V. All rights reserved. q This paper has been recommended for acceptance by A. Koleshnikov. Corresponding author. Tel.: +81 80 3937 5254; fax: +81 29 853 6200x8480. E-mail addresses: [email protected] (H. Chatbri), [email protected]. tsukuba.ac.jp (K. Kameyama). Pattern Recognition Letters 42 (2014) 1–10 Contents lists available at ScienceDirect Pattern Recognition Letters journal homepage: www.elsevier.com/locate/patrec

Upload: others

Post on 24-Sep-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pattern Recognition Lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/PRL2014.pdfH. Chatbri, K. Kameyama/Pattern Recognition Letters 42 (2014) 1–10 3 describing the overall structure

Pattern Recognition Letters 42 (2014) 1–10

Contents lists available at ScienceDirect

Pattern Recognition Letters

journal homepage: www.elsevier .com/locate /patrec

Using scale space filtering to make thinning algorithms robust againstnoise in sketch images q

http://dx.doi.org/10.1016/j.patrec.2014.01.0110167-8655/� 2014 Elsevier B.V. All rights reserved.

q This paper has been recommended for acceptance by A. Koleshnikov.⇑ Corresponding author. Tel.: +81 80 3937 5254; fax: +81 29 853 6200x8480.

E-mail addresses: [email protected] (H. Chatbri), [email protected] (K. Kameyama).

Houssem Chatbri a,⇑, Keisuke Kameyama b

a Graduate School of Systems and Information Engineering, Department of Computer Science, University of Tsukuba, Japanb Faculty of Engineering, Information and Systems, University of Tsukuba, Japan

a r t i c l e i n f o a b s t r a c t

Article history:Received 15 August 2013Available online 31 January 2014

Keywords:Thinning algorithmRobustness against noiseScale space filteringSketch image preprocessing

We apply scale space filtering to thinning of binary sketch images by introducing a framework for makingthinning algorithms robust against noise. Our framework derives multiple representations of an inputimage within multiple scales of filtering. Then, the filtering scale that gives the best trade-off betweennoise removal and shape distortion is selected. The scale selection is done using a performance measurethat detects extra artifacts (redundant branches and lines) caused by noise and shape distortions intro-duced by high amount of filtering. In other words, our contribution is an adaptive preprocessing, in whichvarious thinning algorithms can be used, and which task is to estimate automatically the optimal amountof filtering to deliver a neat thinning result. Experiments using five state-of-the-art thinning algorithms,as the framework’s thinning stage, show that robustness against various types of noise was achieved.They are mainly contour noise, scratch, and dithers. In addition, application of the framework in sketchmatching shows its usefulness as a preprocessing and normalization step that improves matchingperformances.

� 2014 Elsevier B.V. All rights reserved.

1. Introduction

Thinning algorithms are classic in digital image processing andused to extract a pattern’s skeleton, that is a thin or nearly thin rep-resentation of the pattern [1]. Thinning algorithms have been usedin many applications such as OCR [2,3], document image analysis[4,5], fingerprint identification [6,7,8], biometric authenticationusing retinal images [9,10], signature verification [11–13], sketchmatching and sketch-based image retrieval [14–17], etc. In OCR,thinning is used as a normalization step to insure invariance topen thickness and handwriting styles. In fingerprint identification,thinning is used as a key preprocessing step essential before fea-ture extraction. In authentication systems using retinal images,thinning is applied in order to produce a one-pixel-wide vasculartree of blood vessels, whose geometrical and topological propertiesare used in the identification process. In document analysis, signa-ture verification and sketch-based image retrieval, thinning is usedas a preprocessing and normalization step.

A thinning algorithm is considered desirable if it meets the fol-lowing properties [1,18]:

� produce a thin or nearly thin skeleton;� preserve the connectivity of the original pattern, which means

that connected parts in the original pattern should stay con-nected in the skeleton;� preserve the visual topology of the original pattern, which

means that although the skeleton is a compact representationof the original pattern, it should deliver the same visualinformation;� be robust against noise.

Although many thinning algorithms have been presented, thecriteria above are rarely met altogether. Usually, choosing a partic-ular thinning algorithm is an application dependent issue moti-vated by the ability of the algorithm to fulfill a particularcriterion among the mentioned above. For instance, the necessityof producing one-pixel-wide skeletons is a priority in some appli-cations [19], however it is sacrificed in other applications in orderto preserve the topology of the pattern [18].

While many thinning algorithms have satisfying performancesregarding connectivity and topology preservation, most of thealgorithms are sensitive to noise [11,20]. Using a state-of-the-artthinning algorithm [21] to thin the noisy patterns in Fig. 3(a) gavethe results in Fig. 3(b). Such noisy skeletons are a challenge forapplications such as OCR [22], Content-Based Image Retrieval[19], and fingerprint recognition [7].

Page 2: Pattern Recognition Lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/PRL2014.pdfH. Chatbri, K. Kameyama/Pattern Recognition Letters 42 (2014) 1–10 3 describing the overall structure

Fig. 1. Using scale space filtering in ATF: Images in the first row are results of different amount of filtering. Images in the second row are binarized images corresponding tothe ones of the first row. Images in the third row are skeletons corresponding to binary images of the second row. ATF should be able to select the amount of filteringproducing the best trade-off between noise removal and shape alterations, as shown in the blue box. (For interpretation of the references to colour in this figure caption, thereader is referred to the web version of this article.)

2 H. Chatbri, K. Kameyama / Pattern Recognition Letters 42 (2014) 1–10

In this work, we introduce a framework for making thinningalgorithms robust against noise, using scale space filtering. Inputsof our method are hand-drawn binary images that are scannedor introduced using a computer graphics software or a tablet. Werefer to this class of images as sketch images. Our method producesmultiple representations of an input image within multiple scalesof filtering. Then, the filtering scale that gives the best trade-off be-tween noise removal and shape distortion is selected. For optimalscale selection, we introduce a performance measure that detectsirrelevant artifacts caused by noise and shape distortions intro-duced by high amounts of filtering. The selection is automaticand done adaptively to each input image. Hence, we call our meth-od Adaptive Thinning Framework (ATF). ATF is aimed to deal withthe typical types of noise which exist in sketch images. They arecontour noise, scratch and dithers.

The remainder of this paper is as follows: Section 2 is a state-of-the-art review. ATF is explained in detail in Section 3, and evalu-ated in Section 4. Section 5 concludes the paper.

2. Related work

Thinning algorithms received considerable attention with theemergence of pattern recognition applications requiring to trans-form an image to a compact form that preserves geometrical andtopological properties.

Thinning algorithms for binary images can be categorized intosequential algorithms, parallel algorithms, and medial axis algo-rithms [1]. Sequential algorithms proceed by deleting iterativelycontour points in a predetermined order, and hence are non-isotro-pic. Parallel algorithms deal with this limitation by making pointsdeletion based on the result of only the previous iteration.

Medial axis algorithms produce a medial or central line of thepattern by line following methods or distance transform.

The parallel paradigm received more attention than the twoother categories and many parallel algorithms have satisfying per-formances in preserving connectivity and topology [1]. In a typicalparallel thinning algorithm, the image pixels are checked from

top-left to bottom-right, and those satisfying certain conditionsor matching specific templates are flagged. Then, when all pixelsare checked, the flagged ones are removed.

We refer the reader to [1] for a comprehensive survey on thin-ning algorithms.

Most algorithms require a binary image as input [1,18–26]. Incase of grayscale images, a binarization step is needed beforeapplying the algorithm. Alternatively, several thinning algorithmsthat work directly on grayscale images without binarization havebeen introduced [27–31].

Despite the vast repository of thinning algorithms, sensitivity tonoise remains an open issue [11,20]. Some attempts for makingthinning algorithms robust against noise have been presented. In[23], Chen and Yu presented an entropy-based method for thinningnoisy images inspired from the human vision process. Their methodcomputes the circular range containing the maximal informationfor each pixel. A symmetry score of the pixels distribution in the cir-cular range in then computed. The symmetry information is treatedas a grayscale image which is then thinned to obtain the skeleton.

Chen and Yu’s method has been reported to maintain good per-formances under reasonable noise levels [24]. However, it becomesvulnerable once the amount of noise is significant [25], and it istime-consuming [26].

Hoffman and Wong presented an algorithm for thinning both bin-ary and grayscale images using scale space filtering [27]. Their algo-rithm generates filtered versions of an image, then it extracts theskeleton by finding the peak, ridge and saddle points in the grayscalefiltered image. The extracted pixels are called ‘‘The Most ProminentRidge-Line pixels (MPRL)’’ and used to form the skeleton. A MPRL pix-el in the image scale space pyramid is a pixel such that all ridge-linepixels in its sub-pyramid have greater second derivatives. The qualityof the skeleton in regards to noise depends strongly on a parameterthat determines the minimum amount of smoothing to be appliedon the image. This parameter has to be set manually by the user.

In a recent work [28], Cai introduced a thinning algorithm forthinning noisy patterns based on Oriented Gaussian Filters. Theauthor dealt with contour noise present in handwriting and finger-prints, caused by pen perturbations and scanning documents and

Page 3: Pattern Recognition Lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/PRL2014.pdfH. Chatbri, K. Kameyama/Pattern Recognition Letters 42 (2014) 1–10 3 describing the overall structure

Fig. 2. Image datasets.

H. Chatbri, K. Kameyama / Pattern Recognition Letters 42 (2014) 1–10 3

images. Cai’s algorithm proceeds by classifying pixels into edges,valleys and ridges using Oriented Gaussian Filters, and thenremoving noise pixels by trimming negative parts of ridge energyimages. Finally, skeletons are extracted based on smooth intensitysurfaces of ridge energy images and principal directions. Cai’s algo-rithm is designed to work specifically on images of handwritingand fingerprints, and the oriented scales of the Gaussian filtersare predetermined in a specific way for each class of images.

The main concern with thinning algorithms is their sensitivity tonoise. So far, approaches for making thinning algorithms robustagainst noise are domain-specific and semi-automatic. In this work,we introduce a framework that aims at making thinning algorithmsrobust against three types of noise which commonly appears insketch images. They are mainly contour noise, scratch and dithernoise (Fig. 3(a)). Unlike other algorithms that serve the same pur-pose, the proposed framework automatically selects the amountof filtering needed adaptively to each image, and any thinning algo-rithm can be used during the framework’s thinning stage.

3. The proposed approach

3.1. Overview

Adaptive Thinning Framework (ATF) uses scale space filtering toderive multiple representations of an input image within multiple

scales of filtering. Then, the filtering scale that gives the best trade-off between noise removal and shape distortion is automaticallyselected. The optimal scale selection is done using a measure thatexpresses the amount of noise and shape distortion.

In Section 3.2, we clarify the theoretical considerations for usingscale space filtering. Then, we highlight the key operations of ourframework (Sections 3.3 and 3.4). Finally the detailed procedureis explained (Section 3.5).

3.2. Scale space filtering

Scale space filtering, introduced by Witkin [29], is a techniqueto derive representations of the image through multiple filteringscales, allowing a set of descriptions of the data that range fromfine (capturing local and detailed informations) to coarse (captur-ing only the overall structure).

Formally, for a given image f : N2 ! N, the scale space repre-sentation L : N2 � Rþ ! N is defined as follows [30]:

Lð:; :; 0Þ ¼ f

and

Lð:; :;rÞ ¼ /ð:; :;rÞ � f

where � is the convolution operation, /ð; :; ;rÞ is the filtering kerneland r controls the scale. A larger r generates a coarser scale,

Page 4: Pattern Recognition Lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/PRL2014.pdfH. Chatbri, K. Kameyama/Pattern Recognition Letters 42 (2014) 1–10 3 describing the overall structure

4 H. Chatbri, K. Kameyama / Pattern Recognition Letters 42 (2014) 1–10

describing the overall structure of the image, while a smaller r cor-responds to finer scales containing details of the data.

Scale space filtering paves the way to study how the imagechanges as the scale is varied. Applications of this include selectinga scale where the image representation is the most appropriate fora particular task [31], detection of local image features that are sta-ble against multi-scale representations [32], or studying the evolu-tion of the image within multiple scales [33].

In this work, the goal is to generate several filtered images andthen select the scale that gives the best thinning result. Fig. 1 illus-trates this idea: as the scale increases, the image’s noisy contoursbecome softer, gaps caused by scratch become filled, and artifactscaused by dithers become connected and form flat regions whichremoves the extra branches after the thinning. When the scale be-comes large, topology distortion is introduced. The challenge isthen to reach a trade-off between noise reduction and shapedistortion.

As for the filter, we use the Gaussian filter which point spreadfunction is defined as:

gðx; y;rÞ ¼ 12pr2 e�ðxþyÞ2=2r2

where r is the smoothing parameter that controls the scale, and xand y are pixel coordinates.

3.3. Sensitivity measure

The sensitivity measure is the performance measure used toselect the best thinned image from the scale space. It should re-flect the sought trade-off between noise removal and shapedistortion.

In [34], Zhou et al. introduced an objective measure for skeletonnoise estimation by calculating the number of transitions fromblack to white pixels in the neighborhood of each skeleton’s pixel(Eq. (3)), using the assumption that this number tends to be largein noisy skeletons and relatively smaller in neat skeletons. How-ever, there are two issues with this measure:

� It does not consider isolated black pixels that are caused bynoise.� It has not been designed to express shape distortions caused by

filtering. Therefore, without modification, it cannot be usedwithin a scale space based framework.

We modify Zhou et al.’s measure in order to incorporate isolatedblack pixels and shape distortions. Our measure is as follows:

SmðIthÞ ¼1n

XN

i¼1

XM

j¼1

S1ði; jÞ ð1Þ

where:

S1ði; jÞ ¼

1; TBWði; jÞ > 2 OR TBWði; jÞ ¼ 0OR½ðIthði; jÞ ¼ 1Þ AND ðIði; jÞ ¼ 0Þ�

0; otherwise:

8>>><>>>:

ð2Þ

where n is the number of foreground pixels in Ith, and M and N arethe image Ith dimensions. TBWði; jÞ, in the first condition, returns thenumber of transitions from 1 (black foreground pixel) to 0 (whitebackground pixel) in the neighborhood of pixel (i, j) (the neighbor-ing pixels are ordered from the middle top pixel until the north toppixel). TBWði; jÞ is defined as follows:

TBWði; jÞ ¼X8

k¼1

transitionðPkÞ ð3Þ

where:

transitionðPkÞ ¼1; if ðPk ¼ 1Þ AND ðPðkþ1Þ mod 8 ¼ 0Þ;0; otherwise:

The modifications are the conditions inside the boxes in Eq. (2).The second condition, TBWði; jÞ ¼ 0, penalizes isolated black pixelsthat come usually from noise. The third condition, [(Ith(i, j) = 1) AN-D (I(i, j) = 0)], penalizes black pixels of the thinned image Ith, thatcome from shape distortions caused by the filtering, although donot originally exist in the original image I.

3.4. Optimal scale selection

The framework generates a number of filtered images depend-ing on the width w of the image. Therefore, the filtering scale rtakes discrete values in the interval ½r0;2wþ 1�, where r0 is theinitial scale value and 2wþ 1 is the maximum scale value. Initially,rmin is selected within this interval.

In order to find the optimal scale rbest , regression by a quadraticfunction is used. For this purpose, the sensitivity Sm samples atrmin;rmin � Dr and rmin þ Dr to estimate a quadratic regressionfunction. Then, rbest corresponds to the zero-crossing of the qua-dratic function’s derivative.

3.5. Detailed procedure

ATF operates as follows: the width w of the input image is esti-mated by calculating the boundary points removing operationsneeded until no more foreground points exist. Then, during eachframework iteration, the input image is first filtered using a Gauss-ian filter of scale ri, which produces a gray-scale image IGðiÞ. Next,IGðiÞ is binarized using a binarization algorithm [35] to produce im-age IBðiÞ, and a plugged thinning algorithm is used to produce athinned image IthðiÞ. Then, a sensitivity measure Sm is calculatedfor IthðiÞ. Afterwards, the Gaussian scale ri is incremented and thewhole process is repeated until ri ¼ 2wþ 1. Finally, the best scalerbest is estimated using a quadratic regression that takes the scalermin corresponding to the smallest value of Sm, the previous scalermin � Dr and the next scale rmin þ Dr. The output of the frame-work, IthðbestÞ, is the skeleton generated using rbest .

Any thinning method can be used during the thinning step. Weonly assume that a thinning algorithm takes a binary or grayscaleimage as input, and produces a binary image of the skeleton. Incase of using a thinning algorithm for grayscale images, the binari-zation step is omitted.

As a whole, ATF is similar to Hoffman and Wong’s method [27]as both use scale space filtering. However, ATF automatically esti-mates the optimal filtering scale, contrarily to Hoffman and Wong’smethod that depends on a static parameter. In addition, ATF allowsfor any thinning algorithm to be used during the thinning stage,while in Hoffman and Wong’s method the thinning mechanism ishard-coded.

4. Experiments

We evaluate ATF to examine the following:

� ATF’s performance in presence of noise and the degree of shapedistortions that it introduces (Section 4.2).� ATF’s usefulness in sketch-based image retrieval (Section 4.3).

4.1. Image datasets

We begin by introducing the image datasets used for theexperiments.

Page 5: Pattern Recognition Lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/PRL2014.pdfH. Chatbri, K. Kameyama/Pattern Recognition Letters 42 (2014) 1–10 3 describing the overall structure

Fig. 3. Results of Experiment 1.

H. Chatbri, K. Kameyama / Pattern Recognition Letters 42 (2014) 1–10 5

4.1.1. Dataset 1This dataset contains 136 images of scanned hand-drawn

sketches, drawings generated by computer graphics software, withvarious stroke thickness and noise (Fig. 2(a)). The dataset imageshave various dimensions ranging from 22� 29 to 654� 636 pixels.Sketch thickness ranged from 4 to 42 pixels.

4.1.2. Dataset 2This dataset of scanned images contains 1431 images of hand-

written alphabets, digits, mathematical symbols and expressions.The number of classes is 105 and the number of images per classranges between 8 and 16 images. The images were collected byasking 8 subjects to imitate a sample of each class. Scale variancewas introduced by asking the subject to introduce a same imagein a different scale (Fig. 2(b)).

4.1.3. Dataset 3This dataset was generated by using a thinning algorithm [36]

to produce skeletons of Dataset 2 images (Fig. 2(c)).

4.1.4. Dataset 4This dataset was generated by using ATF to produce skeletons of

Dataset 2 images (Fig. 2(d)).

4.1.5. Dataset 5We use the ‘‘Shape data for the MPEG-7 core experiment CE-

Shape-1’’ dataset [37], which contains 1402 images of various pat-terns such as animals, insects, mechanical tools, solid shapes, etc.(Fig. 2(e)). The images of this dataset are much thicker than theimages of Dataset 1.

Although these images are not generally considered as typicalsketch images, they are used here to evaluate ATF in case wherethe thickness of the input images is large.

4.2. Experiment 1

This experiment aims to evaluate ATF’s robustness against noiseand the degree of topology distortions it introduces. For this pur-pose, sensitivity measure Sm (Section 3.3) was used to measurethe effect of noise, and two measures for the probability of topol-ogy preservation T1 and T2 were used to estimate shape distor-tions. For the sake of simplicity, we refer to T1 and T2 astopology preservation measures. Images of Dataset 1 were used.

Evaluation measures. The topology preservation measures aredefined as follows:

� Topology preservation measure 1 [38]:

T1 ¼Area½IMD�

Area½I� ; ð0 < T 6 1Þ

Here, IMD is the image formed by the maximal discs that fit to theoriginal image along the skeleton (we refer the reader to [38] fora detailed explanation), and I is the original image. Large valuesnear 1 express topology preservation, while small values near 0 ex-press significant distortion.� Topology preservation measure 2 [21]:

T2 ¼ 1� 12� Nth

Nc

��������

Here, Nth is the number of foreground pixels in the skeleton, and Nc isthe number of contour pixels in the original image. This measure con-siders that, for an image with a relatively smooth contour, the pixelsof the contour of the original image are nearly as twice as those in theskeleton, based on the assumption that the skeleton should be nearthe ideal medial axis and one pixel width. The measure is normalizedin order to make values near 1 expressing thinning preserving thetopology, and values near 0 expressing significant distortion effects.

Thinning algorithms. Experiments were held using five thin-ning algorithms:

� Zhang and Suen’s thinning algorithm [39]: performs thinning ofbinary images by repeating two sub-iterations: one deletes thesouth-east boundary points and the north-west corner pointswhile the other one deletes the north-west boundary pointsand the south-east corner points. Point deleting is done accord-ing to a specific set of rules. The two sub-iterations are repeateduntil no more points validate the deleting rules.� Huang et al.’s thinning algorithm [21]: the algorithm uses a set

of templates to decide if a contour point should be deleted in abinary image. Iterations of contours points deleting arerepeated until no more points validate the deleting templates.� Zhang et al.’s thinning algorithm [36]: this algorithm works

similarly to Zhang and Suen’s algorithm [39], with introducingan additional point deleting rule to improve connectivitypreservation.

Page 6: Pattern Recognition Lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/PRL2014.pdfH. Chatbri, K. Kameyama/Pattern Recognition Letters 42 (2014) 1–10 3 describing the overall structure

6 H. Chatbri, K. Kameyama / Pattern Recognition Letters 42 (2014) 1–10

� Chatbri and Kameyama’s thinning algorithm [40]: performsthinning of binary images in two stages: during the first stage,contour pixels are removed iteratively using template matchinguntil reaching a thinned image containing 1 and 2-pixels-widthstrokes. Then, during the second stage, pixels from the 2-pixel-width strokes are removed to generate finally a 1-pixel-widthskeleton.� Weiss’s thinning algorithm [41]: Weiss describes a thinning

methodology for grayscale images by threshold superposition:the grayscale image is decomposed into constituent binaryimages by thresholding. Then, the binary images are thinned.Finally, the skeleton is reconstituted by summing the thinnedbinary images.

Result and evaluation. The table in Fig. 3(d) shows the averagevalues of performance measurements of the five algorithms used

Fig. 4. Visualization of ATF applied on image (a) (The algorithm described in [45] was usImages (e)–(n) show thinning results after applying a Gaussian filter of scale r. In this c

directly, and when plugged in ATF. The values show that thinningalgorithms always had a better sensitivity measure when pluggedin ATF than when applied directly. The two topology preservationmeasures decreased for all algorithms when using ATF, and this isexplained by the noise removal caused by the Gaussian filtering,and considered as a topology distortion. Fig. 3(c) shows examplesof the experimental results.

Figs. 4 and 5 show a visualization of ATF applied on images inFigs. 4(a) and 5(a). The image in Fig. 4(a) combines contour andscratch noises caused by digitization and imperfection of digitalsketching pens, but still the image can be considered relativelyneat. The framework’s output was the image in Fig. 4(h) requir-ing a Gaussian filtering of rbest ¼ 6 (Fig. 4(b)) and keeping highvalues of topology measure T1 and topology measure T2

(Figs. 4(c) and 4(d)). As r increases, distortions in topology are

ed for thinning). Plots (b)–(d) show the performance measures changing as r varies.ase, ATF produced the skeleton (h) requiring a Gaussian filtering of rbest ¼ 6.

Page 7: Pattern Recognition Lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/PRL2014.pdfH. Chatbri, K. Kameyama/Pattern Recognition Letters 42 (2014) 1–10 3 describing the overall structure

Fig. 5. Visualization of ATF applied on image (a) (The algorithm described in [45] was used for thinning). Plots (b)–(d) show the performance measures changing as r varies.Images (e)–(o) show thinning results after applying a Gaussian filter of scale r. In this case, ATF produced the skeleton (o) requiring a Gaussian filtering of rbest ¼ 21.

H. Chatbri, K. Kameyama / Pattern Recognition Letters 42 (2014) 1–10 7

introduced (Figs. 4(i)–4(n)), increasing sensitivity measure Sm

and decreasing topology measure T1 and topology measure T2.The image in Fig. 5(a) includes dither noise. In this case, ATF

needed a Gaussian filtering of rbest ¼ 21 for sensitivity measureSm to reach a minimum (Fig. 5(b)) corresponding to the skeletonin Fig. 5(o). Meanwhile, larger filtering scales caused topologymeasure T1 and topology measure T2 to decrease significantly(Fig. 5(c) and (d)).

The best filtering scale rbest gives the minimum value of sensi-tivity measure Sm because the filtering leads to the following:

� Decreasing noise by softening the noisy contours.� Filling the gaps in scratch areas.

� Connecting between black pixels caused by dither to form con-nected regions that, once thinned, give lower sensitivitymeasures.

When the noise is reduced, the skeleton contains less artifacts(redundant branches and lines caused by noise), and hence, sensi-tivity measure Sm will be lower.

As for the scratch noise, the goal is to obtain the skeleton thatcontains single lines instead of double lines and bump-like struc-tures in the scratch areas (Fig. 3(c)). This would increase sensitivitymeasure Sm since the medial lines are artifacts and do not origi-nally exist in the original image. However, when the scratch noiseis not abundant, artifact medial lines will not affect significantly

Page 8: Pattern Recognition Lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/PRL2014.pdfH. Chatbri, K. Kameyama/Pattern Recognition Letters 42 (2014) 1–10 3 describing the overall structure

8 H. Chatbri, K. Kameyama / Pattern Recognition Letters 42 (2014) 1–10

the overall sensitivity measure Sm, and ATF’s output will be theskeleton with the best beautification effect.

4.3. Experiment 2

In this experiment, the goal is to evaluate using ATF as a prepro-cessing for sketch-based image retrieval.

Evaluation procedure. Performances of sketch-based image re-trieval methods when using a conventional thinning algorithm[36] and when using ATF are compared. Three state-of-the-artmethods are used to check their performances: Angular Partitioning(AP) [14], Edge Relational Histogram (ERH) [42,43], and Shape Con-text (SC) [44]. Evaluation is done using precision-recall graphs,which are obtained by varying the number of recalled images,and the Area Under the Curve (AUC) measure. Images of Dataset 3(Section 4.1.3) and Dataset 4 (Section 4.1.4) were used in thisexperiment.

Result and evaluation. Fig. 6 shows precision-recall graphsrespective to the retrieval methods. The result shows that the

Fig. 6. Effect of using ATF as a preprocessing and normalization step on sketch-based imAUCSC=1.03. (d) Improvement on the similarity measure introduced by ATF when match

use of ATF improves retrieval performances comparing to conven-tional thinning.

This improvement in retrieval performances is due to the abilityof ATF to produce neat skeletons (table in Fig. 6(d)): when usingATF instead of a conventional thinning algorithm, the dissimilaritymeasure for AP [14] decreased by a factor of 3, the similarity mea-sure for ERH [42,43] increased by a factor of 4.6, and the dissimilar-ity measure for SC [44] decreased by a factor of 59.25.

This result encourages using ATF in similar applications wherethinning is required such as OCR, document analysis, signature rec-ognition, etc.

4.4. Experiment 3

In this experiment, we evaluate ATF’s performance in thinningpatterns with large stroke thickness.

Evaluation procedure. We compare between the performanceof Zhang et al.’s thinning algorithm [36] when used directly, andits performance when plugged inside ATF, using the same metricsin Experiment 1.

age retrieval: (a) AUCAP+ATF/AUCAP=1.13. (b) AUCERH+ATF/AUCERH=1.28. (c) AUCSC+ATF/ing sketches with different amount of noise.

Page 9: Pattern Recognition Lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/PRL2014.pdfH. Chatbri, K. Kameyama/Pattern Recognition Letters 42 (2014) 1–10 3 describing the overall structure

Fig. 7. Results of Experiment 3.

H. Chatbri, K. Kameyama / Pattern Recognition Letters 42 (2014) 1–10 9

Result and evaluation. The table in Fig. 7(b) shows that, simi-larly to Experiment 1, ATF improves the performance of thinningin presence of noise without harming topology preservation. Skel-etons produced using ATF are neat comparing to results of a Zhanget al.’s algorithm (Fig. 7(a)). However, since the stroke thicknesshere is significantly large, most of the visual information is lost,and the skeletons do not reflect the original patterns. This is bestillustrated in images of the bat and the bell (Fig. 7(a)).

5. Conclusion

In this paper, we introduced a framework for making thinningalgorithms robust against noise in sketch images. Our frameworkuses scale space filtering to generate multiple representations ofan input image within multiple scales. Then, the filtering scale thatgives the best trade-off between noise removal and shape distor-tion is selected. The framework estimates the optimal filteringscale automatically and adaptively to the input image. In addition,any thinning algorithm can be used during the framework’s thin-ning stage. Experimental results, using five state-of-the-art thin-ning algorithms, showed that our framework is robust againsttypical types of noise which exist in sketch images, mainly contournoise, scratch and dithers. In addition, application of the frame-work as a preprocessing step in sketch matching shows its useful-ness as a preprocessing and normalization step that improvesmatching performances.

Acknowledgement

The authors would like to thank Prof. Mark E. Hoffman for hiskind and prompt assistance with his paper, and anonymousreviewers for their constructive criticism and useful comments.

References

[1] L. Lam, S. Lee, C. Suen, Thinning methodologies-a comprehensive survey, IEEETrans. Pattern Anal. Mach. Intell. 14 (9) (1992) 869–885.

[2] F. Stentiford, R. Mortimer, Some new heuristics for thinning binaryhandprinted characters for OCR, IEEE Trans. Syst. Man Cybern. 13 (1) (1983)81–84.

[3] L. Lam, C.Y. Suen, An evaluation of parallel thinning algorithms for characterrecognition, IEEE Trans. Pattern Anal. Mach. Intell. 17 (9) (1995) 914–919.

[4] K.-C. Fan, J.-M. Lu, L.-S. Wang, H.-Y. Liao, Extraction of characters from formdocuments by feature point clustering, Pattern Recognit. Lett. 16 (9) (1995)963–970.

[5] S.J.F. Guimarães, M. Couprie, A. de Albuquerque Araújo, N. Jerônimo Leite,Video segmentation based on 2D image analysis, Pattern Recognit. Lett. 24 (7)(2003) 947–957.

[6] G.L. Marcialis, F. Roli, Fingerprint verification by fusion of optical andcapacitive sensors, Pattern Recognit. Lett. 25 (11) (2004) 1315–1322.

[7] Y. He, J. Tian, X. Luo, T. Zhang, Image enhancement and minutiae matching infingerprint verification, Pattern Recognit. Lett. 24 (9) (2003) 1349–1360.

[8] M. Fons, F. Fons, E. Cantó, Fingerprint image processing acceleration throughrun-time reconfigurable hardware, IEEE Trans. Circuits Syst. Express Briefs 57(12) (2010) 991–995.

[9] T. Chanwimaluang, G. Fan, An efficient algorithm for extraction of anatomicalstructures in retinal images, International Conference on Image Processing(ICIP), vol. 1, IEEE, 2003, pp. 1193–1196.

[10] M.M. Fraz, P. Remagnino, A. Hoppe, B. Uyyanonvara, A.R. Rudnicka, C.G. Owen,S.A. Barman, Blood vessel segmentation methodologies in retinal images – asurvey, Comput. methods programs biomed. 108 (1) (2012) 407–433.

[11] G. Zhu, Y. Zheng, D. Doermann, S. Jaeger, Signature detection and matching fordocument image retrieval, IEEE Trans. Pattern Anal. Mach. Intell. 31 (11)(2009) 2015–2031.

[12] H. Lv, W. Wang, C. Wang, Q. Zhuo, Off-line chinese signature verification basedon support vector machines, Pattern Recognit. Lett. 26 (15) (2005) 2390–2399.

[13] R. Kumar, J. Sharma, B. Chanda, Writer-independent off-line signatureverification using surroundedness feature, Pattern Recognit. Lett. 33 (3)(2012) 301–308.

[14] A. Chalechale, G. Naghdy, A. Mertins, Sketch-based image matching usingangular partitioning, IEEE Trans. Syst. Man Cybern. 35 (1) (2005) 28–41.

[15] W. Leung, T. Chen, Trademark retrieval using contour–skeleton strokeclassification, International Conference on Multimedia and Expo (ICME), vol.2, IEEE, 2002, pp. 517–520.

Page 10: Pattern Recognition Lettersadapt.cs.tsukuba.ac.jp/~chatbri/web/pdf/PRL2014.pdfH. Chatbri, K. Kameyama/Pattern Recognition Letters 42 (2014) 1–10 3 describing the overall structure

10 H. Chatbri, K. Kameyama / Pattern Recognition Letters 42 (2014) 1–10

[16] T. Kato, T. Kurita, N. Otsu, K. Hirata, A sketch retrieval method for full colorimage database-query by visual example, in: IAPR International Conference onPattern Recognition, Conference A: Computer Vision and Applications, vol. I,IEEE, 1992, pp. 530–533.

[17] K. Bozas, E. Izquierdo, Large scale sketch based image retrieval using patchhashing, Adv. Visual Comput. 7431 (2012) 210–219.

[18] C. Arcelli, Pattern thinning by contour tracing, Comput. Graphics ImageProcess. 17 (2) (1981) 130–144.

[19] H. Chatbri, K. Kameyama, Sketch-based image retrieval by shape pointsdescription in support regions, in: International Conference on Systems,Signals and Image Processing (IWSSIP), 2013, pp. 19–22.

[20] H. Chatbri, K. Kameyama, Towards making thinning algorithms robust againstnoise in sketch images, in: International Conference on Pattern Recognition(ICPR), 2012, pp. 3030–3033.

[21] L. Huang, G. Wan, C. Liu, An improved parallel thinning algorithm, in:International Conference on Document Analysis and Recognition (ICDAR),IEEE, 2003, pp. 780–783.

[22] L. Lam, C.Y. Suen, Evaluation of thinning algorithms from an OCR viewpoint, in:International Conference on Document Analysis and Recognition (ICDAR),IEEE, 1993, pp. 287–290.

[23] Y. Chen, Y. Yu, Thinning approach for noisy digital patterns, Pattern Recognit.29 (11) (1996) 1847–1862.

[24] R. Singh, V. Cherkassky, N. Papanikolopoulos, Determining the skeletaldescription of sparse shapes, in: International Symposium on ComputationalIntelligence in Robotics and Automation (CIRA), IEEE, 1997, pp. 368–373.

[25] R. Palenichka, M. Zaremba, Multi-scale model-based skeletonization of objectshapes using self-organizing maps, International Conference on PatternRecognition (ICPR), vol. 1, IEEE, 2002, pp. 143–146.

[26] Y. Chen, Hidden deletable pixel detection using vector analysis in parallelthinning to obtain bias-reduced skeletons, Comput. Vision Image Underst. 71(3) (1998) 294–311.

[27] M.E. Hoffman, E.K. Wong, Scale-space approach to image thinning using themost prominent ridge line in the image pyramid data structure, in: PhotonicsWest’98 Electronic Imaging, International Society for Optics and Photonics,1998, pp. 242–252.

[28] J. Cai, Robust filtering-based thinning algorithm for pattern recognition,Comput. J. 55 (7) (2012) 887–896.

[29] A. Witkin, Scale-space filtering: a new approach to multi-scale description,International Conference on Acoustics, Speech, and Signal Processing (ICASSP),vol. 9, IEEE, 1984, pp. 150–153.

[30] T. Lindeberg, Scale-space theory: a basic tool for analyzing structures atdifferent scales, J. appl. stat. 21 (1–2) (1994) 225–270.

[31] T. Sezgin, R. Davis, Scale-space based feature point detection for digital ink, in:ACM SIGGRAPH 2006 Courses, ACM, 2006, pp. 29–35.

[32] D. Lowe, Distinctive image features from scale-invariant keypoints, IJCV 60 (2)(2004) 91–110.

[33] F. Mokhtarian, S. Abbasi, J. Kittler, Efficient and robust retrieval by shapecontent through curvature scale space, Ser. Softw. Eng. Knowl. Eng. 8 (1997)51–58.

[34] R. Zhou, C. Quek, G. Ng, A novel single-pass thinning algorithm and an effectiveset of performance criteria, Pattern Recognit. Lett. 16 (12) (1995) 1267–1275.

[35] N. Otsu, A threshold selection method from gray-level histograms, Automatica11 (285–296) (1975) 23–27.

[36] F. Zhang, Y. Wang, C. Gao, S. Si, J. Xu, An improved parallel thinning algorithmwith two subiterations, Optoelectron. Lett. 4 (1) (2008) 69–71.

[37] Shape data for the mpeg-7 core experiment ce-shape-1 (2013).<www.cis.temple.edu/latecki/TestData/mpeg7shapeB.tar.gz>.

[38] B. Jang, R. Chin, One-pass parallel thinning: analysis, properties, andquantitative evaluation, IEEE Trans. Pattern Anal. Mach. Intell. 14 (11)(1992) 1129–1140.

[39] T. Zhang, C. Suen, A fast parallel algorithm for thinning digital patterns,Commun. ACM 27 (3) (1984) 236–239.

[40] H. Chatbri, K. Kameyama, An adaptive thinning algorithm for sketch imagesbased on gaussian scale space, IEICE technical report. Image engineering111(442) (2012) 33–38.

[41] J.M. Weiss, Grayscale thinning, in: Computers and Their Applications, 2002, pp.86–89.

[42] Y. Kumagai, T. Arikawa, G. Ohashi, Query-by-sketch image retrieval using edgerelation histogram, in: MVA2011 IAPR Conference on Machine VisionApplications, 2011, pp. 83–86.

[43] Y. Kumagai, G. Ohashi, Query-by-sketch image retrieval using edge relationhistogram, IEICE E96-D (2) (2013) 340–348.

[44] S. Belongie, J. Malik, J. Puzicha, Shape matching and object recognition usingshape contexts, IEEE Trans. Pattern Anal. Mach. Intell. 24 (4) (2002) 509–522.

[45] Z. Guo, R. Hall, Parallel thinning with two-subiteration algorithms, Commun.ACM 32 (3) (1989) 359–373.