Next Article in Journal
Using SEBAL to Investigate How Variations in Climate Impact on Crop Evapotranspiration
Next Article in Special Issue
Enhancing Face Identification Using Local Binary Patterns and K-Nearest Neighbors
Previous Article in Journal
Assessment of Geometric Distortion in Six Clinical Scanners Using a 3D-Printed Grid Phantom
Previous Article in Special Issue
A Multi-Projector Calibration Method for Virtual Reality Simulators with Analytically Defined Screens
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Pattern Reconstructability in Fully Parallel Thinning

Department of Electrical Engineering, Yuan Ze University, Chungli, Taoyuan 320, Taiwan
*
Author to whom correspondence should be addressed.
J. Imaging 2017, 3(3), 29; https://doi.org/10.3390/jimaging3030029
Submission received: 16 June 2017 / Revised: 13 July 2017 / Accepted: 15 July 2017 / Published: 19 July 2017
(This article belongs to the Special Issue Computer Vision and Pattern Recognition)

Abstract

:
It is a challenging topic to perform pattern reconstruction from a unit-width skeleton, which is obtained by a parallel thinning algorithm. The bias skeleton yielded by a fully-parallel thinning algorithm, which usually results from the so-called hidden deletable points, will result in the difficulty of pattern reconstruction. In order to make a fully-parallel thinning algorithm pattern reconstructable, a newly-defined reconstructable skeletal pixel (RSP) including a thinning flag, iteration count, as well as reconstructable structure is proposed and applied for thinning iteration to obtain a skeleton table representing the resultant thin line. Based on the iteration count and reconstructable structure associated with each skeletal pixel in the skeleton table, the pattern can be reconstructed by means of the dilating and uniting operations. Embedding a conventional fully-parallel thinning algorithm into the proposed approach, the pattern may be over-reconstructed due to the influence of a biased skeleton. A simple process of removing hidden deletable points (RHDP) in the thinning iteration is thus presented to reduce the effect of the biased skeleton. Three well-known fully-parallel thinning algorithms are used for experiments. The performances investigated by the measurement of reconstructability (MR), the number of iterations (NI), as well as the measurement of skeleton deviation (MSD) confirm the feasibility of the proposed pattern reconstruction approach with the assistance of the RHDP process.

1. Introduction

The purpose of thinning is to remove a large number of unwanted points for extracting the isotropic thinned skeleton, which shall retain the pattern’s geometrical shape features for computers to efficiently perform image-related tasks, such as character recognition [1,2], fingerprint identification [3], posture recognition [4], retinal image analysis [5], and so on. Over the past half-century, many thinning algorithms have been proposed and can be roughly divided into two main categories: rule-based thinnings (iterative schemes) [6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26] and distance-based skeletonizations (non-iterative schemes) [27,28,29,30,31,32,33,34,35,36].
Rule-based thinning applies the thinning templates iteratively to remove the contour points until the unit-width skeleton is obtained. In accordance with the operating manner, rule-based thinning algorithms can be further divided into sequential [6] and parallel [7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26] thinning. For the sequential thinning, the thinning operation of a contour point depends on its neighboring points’ thinning results. The contour points can be removed as long as they are not interior, end and isolated points, in which the removal shall maintain pattern connectivity (for example, eight-connectivity for pattern pixels should be maintained if a (8, 4) binary picture is considered.). On the other hand, parallel thinning can operate the points simultaneously, and one thinning iteration may contain more than one sub-cycle (may also be named as a sub-iteration [7] or pass [12]) or subfield [13,26]. Sub-cycles used in an iteration are often adopted for developing a sub-cycle-based parallel thinning, where the operator/reduction may be changed with a period of 2, 4 or 8. For example, two-sub-cycle thinning removes symmetrically and iteratively the contour points from two opposite erosive directions until the thinned result converges to be of unit-width. If a thinning algorithm uses one sub-cycle, it is a fully-parallel algorithm. For a one-sub-cycle thinning as defined by Chen and Hsu [9], a contour point whose erosive direction is the same as its neighboring points can always be removed regardless whether the current iteration count is even or odd. Otherwise, if its erosive direction differs from one of its neighboring points, its removal is dependent on whether the current iteration count is odd or even like the checking in the two-sub-cycle scheme for the preservation of line connectivity. For a subfield-based (or subfield-sequential) algorithm, the binary picture is partitioned into more than two (say k) subfields, which are alternatively activated. During a given iteration step, k successive parallel reductions associated with these subfields are performed, and some pattern pixels in the active subfield can be designated for removal [13,26]. In order to generate the suitable deletion rules for parallel topological algorithms, some sufficient conditions for topology-preserving parallel reductions were proposed by Németh et al. [22]. Based on the sufficient conditions, fifty-four 2D parallel thinning and shrinking algorithms were constructed; and a four-sub-iteration scheme with intermediate deletion directions and the iteration-level endpoint checking in subfield-based algorithms were also introduced [22].
A comprehensive survey on thinning methodologies has been reported by Lam and Suen [11]. From the viewpoint of order dependence, the resultant thin line depends on the order of pixels examined in sequential thinning algorithms, whereas that depends on the order of the sub-iterations in parallel thinning algorithms. In order to avoid any kind of order dependence, Ranwez and Soille introduced the concept of order independent homotopic thinning and thus presented an order independent homotopic marking algorithm for thinning [17]. Palágyi further presented a class of equivalent deletion rules and related methods to bridge the order-independent sequential, fully-parallel and subfield-based algorithms [26]. Based on the framework of critical kernels [37], Bertrand and Couprie introduced the notion of crucial pixel to study the framework of digital topology, in which the link between critical kernels, minimal non-simple sets and P-simple points is clarified for thinning algorithm design [21].
For distance-based skeletonization [27,29], the local point with the maximum distance is defined as the skeletal point where distance transformation is performed by finding the shortest distance from the point to its nearest background point. It is the well-known medial axis transformation (MAT) thereafter. A good survey on skeletonization theories, methodologies and their applications can be found in the articles of Saha et al. [35,36]. In accordance with the original MAT definition [27], three important properties in skeletonization are addressed as follows after the investigation of the theory of skeleton and its representation for continuous objects [28,29].
  • The connectivity of the derived skeleton is preserved as long as the original object is connected.
  • The original object can be exactly reconstructed from its skeleton.
  • The geometry of the skeleton is invariant under picture rotation.
However, while considering the digitized plane, the distance-based skeletons are usually discrete, disconnected, as well as not of unit-width. This means that the three properties mentioned above are not easily maintained due to the effect of discrete metrics as investigated by the literature [31,38,39]. In order to render the advantage of the low boundary noise effect from the MAT and overcome the disconnected issue, a MAT-based thinning has been proposed by Chen and Chao [40]; who also argue a new challenge of “is it possible that the original line pattern can be completely restored with the thinned result?” Up to now, this issue is not easy for a conventional rule-based thinning algorithm since no reconstructable information is preserved, but the line connectivity during the thinning process. Therefore, the goal of this paper is to propose a pattern-reconstructable strategy embedded in a rule-based thinning so that a good thinning result can be maintained, as well as the original pattern can be reconstructed from the built thin line information (in MAT-based skeletonization, the pattern can be reconstructed from its MAT by a re-expansion process as mentioned by Peleg and Rosenfeld [30], whereas the pattern reconstruction from the built thin line containing the iterative and reconstructable information is considered in this article).
Since Jang and Chin proposed a reconstructable parallel thinning [12] in 1993, there have been very few reconstructable methods regarding rule-based parallel thinning presented and discussed. Jang and Chin’s method is based on a hybrid approach of a fully-parallel thinning algorithm and morphological skeleton transformation (MST). It first identifies a set of disjoint feature pixels containing the required information of reconstruction by means of morphological operations. Then, based on fully-parallel thinning, an iterative boundary removal procedure is adopted for producing a unit-width skeleton. Finally a labeling process is used to encode the resultant skeleton with three information (namely reduced feature pixel, feature pixel and the unit-width pixel obtained by thinning) for pattern reconstruction. Even though the resultant skeleton is connected, unit-width and reconstructable, this method is somewhat complicated for application. The reason is that “skeletons generated by the algorithm vary with different MST structuring templates chosen by the user for the extraction of feature pixels” as discussed by Jang and Chin [12]. Due to the extra feature pixels involved in the traditional skeletal pixels, noisy branches are very easily yielded. Such a phenomenon may easily be observed in a high-resolution pattern. For example, given a binary pattern shown in Figure 1a and performed by the MST-based algorithm, Figure 1c shows the completely reconstructed pattern from the thinned result shown in Figure 1b, where a number of noisy branches are yielded apparently.
In order to avoid the unwanted branches as suffered by Jang and Chin’s method [12], in this study, we present a pattern-reconstructable strategy and hidden-deletable-point removal method embedded in a fully-parallel thinning, where the former can extract the reconstructable information during the fully-parallel thinning process, and the latter can help with reducing the effect of the bias skeleton, thus further improving the reconstruction. Note here that a deletable point, but not be removed in a thinning iteration, is defined as hidden deletable point (HDP), which is usually accumulated in the portion of the L-corner and T-junction, thus yielding the phenomenon of the bias skeleton in a fully-parallel thinning [10,14]. The fundamental principles of designing the presented method are briefly introduced as follows. Basically, in the thinning process, for every iteration, it is of great importance for checking the line connectivity. Let 1-pixel and 0-pixel denote the pattern and background pixel, respectively, in this paper. In order to examine that a 1-pixel P is a deletable point ( C ( P ) = 1 ) or has been a skeletal point ( C ( P ) = 0 ) in the thinning iteration, a checking function C ( P ) based on the local connecting function defined by Chen and Hsu [9] is reformulated in Section 2 and used in our approach. To make the pattern reconstruction possible, the trajectory of thinning should be recorded. For a 1-pixel P first becoming a unit-width skeletal point, e.g., at the ( j ) -th iteration, it is regarded as a landmark on the thinning trajectory, and its eight neighbors at the ( j 1 ) -th iteration will be recorded as the reconstructable information. A RSP (reconstructable skeletal pixel) matrix will be built for storing the thinning flag (The thinning flag F is a trigger-once flag. Initially, it is set to zero. Once a 1-pixel P becomes a skeletal pixel, F ( P ) is set to one eventually during the thinning process.) (F), iteration count (I) and reconstructable information (R). The RSP matrix will be updated after a thinning iteration until the thinning result is not changed, as the flowchart depicted in Figure 2a, where the resultant thin line information is further reduced in a so-called skeleton table, which contains all of the skeletal point’s coordinates, iteration count I and reconstructable R information. In order to overcome the effect of bias skeleton, an HDP removal process can also be involved in the presented flowchart. In this way, both the effect of the bias skeleton and the number of thinning iterations can be further reduced. In accordance with the produced skeleton table, its original pattern can be reconstructed by means of uniting all dilation results for all skeletal pixels with their I and R information, as the flowchart given in Figure 2b.
The rest of this paper is organized as follows. In Section 2, followed by the fundamental definitions, the checking function is formulated, and the RSP information is defined. The RSP updating in a fully-parallel thinning, pattern reconstruction based on skeleton table, as well as HDP removal in thinning iteration are also detailed in Section 2. Section 3 shows experimental results and comparisons. The measurement of reconstructability (MR) [12], the number of iterations (NI) and the measurement of skeleton deviation (MSD) [40] are used for analyses and discussions. The conclusions and future works are finally drawn in Section 4.

2. Proposed Method

In order to facilitate a clear presentation for our method, some definitions shown in [9] are adopted here and given first. Let W × H binary images be composed of two-level pixels; one is the background pixel (or 0-pixel), and the other is pattern pixel (or 1-pixel). For a pixel P ( x , y ) , let N ( n ) , n = 0 , 1 , , 7 be its eight neighbors as depicted in Figure 3. In this 3 × 3 designation, let S e and S o denote the sets of integers {0, 2, 4, 6} and {1, 3, 5, 7}, respectively; and S x be the union set S e S o . Moreover, let K ( P ) = n = 0 7 N ( n ) be the sum of the eight neighbors, which is equal to the total number of 1-pixel neighbors. We can re-index from 0 to K 1 for these 1-pixel neighbors in clockwise order and derive a set of integers S b = { b | 0 , 1 , , K 1 } . Thus, a mapping function B : b n is defined to be B ( b ) = n . Based on these definitions, according to the systematic design of thinning algorithms [9], for the n-th 1-pixel neighbor, its connecting set S c ( n ) is defined by:
S c ( n ) = { n + 1 } , if   n S o { n + 1 , n + 2 } , if   n S e
Based on the S c , for any two consecutive elements in S b , take the connecting set S c ( B ( b ) ) of the former element and the location B ( b + 1 ) of the latter; the connecting operator ⊗ is expressed by:
S c ( B ( b ) ) B ( b + 1 ) = 1 , if   B ( b + 1 ) S c ( B ( b ) ) 0 , otherwise
Thus, a local connecting ( L C ) for pixel P is defined by:
L C ( P ) = b = 0 K 1 S c ( B ( b ) ) B ( b + 1 )
In the thinning iteration, the most important thing is that the removal of a 1-pixel P cannot destroy the line connectivity, which can be examined by a checking function C ( P ) . In this study, based on the original definition [9], our checking function is reformulated as below:
C j ( P ) = 1 , if   L C ( P ) = K 1 ( > 0 ) 0 , otherwise
where C j ( P ) = 1 tells that the 1-pixel P is possibly removed (or removable) at the (j)-th iteration. Otherwise, it cannot be removed and has become a skeletal point at this iteration. In the following, the result of the checking function is also named the C-value for convenient presentation.
In order to let the digital pattern be reconstructable from the thinning result, the trajectory of thinning is recorded in our approach. For a 1-pixel first becoming a skeletal point at the ( j ) -th iteration, for example, it is considered as a landmark on the thinning trajectory as mentioned in Section 1. The reconstructable information at the ( j 1 ) -th iteration for this landmark should be included, that is for a landmark, its eight neighbors at the ( j 1 ) -th iteration will be recorded as the reconstructable information. Therefore, in this study, a 16-bit data format shown in Figure 4 is newly defined to represent an RSP-pixel, which consists of the thinning flag (F, bit f), iteration count (I, bits i 6 - i 0 ) and reconstructable information (R, bits r 7 - r 0 ). Each bit indicates the binary value, 0 or 1. The RSP-pixel will be updated in each thinning iteration until the final unit-width thin line is obtained. Here, F = 1 represents that the 1-pixel has become a skeletal point. I and R can be expressed respectively as follows for converting the value from binary into decimal.
I = k = 0 6 i k × 2 k
R = k = 0 7 r k × 2 k
For convenience of presenting our approach, the RSP matrix can also be represented by three W × H matrices (F, I and R).

2.1. RSP Updating in a Rule-Based Thinning

In general, a rule-based thinning applies the thinning templates iteratively to remove the contour points until the unit-width thin line is obtained. For illustrating how to update the RSP matrix in a fully-parallel thinning, a series of iteratively thinning results is given in Figure 5, which are yielded by Chen and Hsu’s method [9] combining with the process of removing HDPs (which will be presented in Section 2.3). Note here that the pixels removed in a thinning iteration are numbered in Figure 5e, which will be helpful for the later presentation.
The mechanism of updating the RSP information for 1-pixel P is presented as follows. Let the RSP matrix be initially set to be null. Let T j 1 and T j be the intermediate thinning results at the ( j 1 )-th and (j)-th iteration, respectively. For a 1-pixel P T j , with the same order as given in Figure 3, let N ^ ( n ) , n = 0 , 1 , , 7 be the P’s eight neighbors T j 1 and r n , n = 0 , 1 , , 7 be the reconstructable information R j ( P ) for updating. Note here that the pixel N ^ ( n ) T j 1 could have been a final skeletal point if C j 1 ( N ^ ( n ) ) = 0 according to the definition of Equation (4). For a neighbor N ^ ( n ) , the corresponding r n = 1 if it is of 1-pixel and C j 1 ( N ^ ( n ) ) = 1 (this means that the 1-pixel neighbor N ^ ( n ) could be possibly removed at the next iteration). Otherwise, r n = 0 means that the neighbor N ^ ( n ) is 0-pixel or has already been a skeletal point satisfying C j 1 ( N ^ ( n ) ) = 0 . This can thus be expressed by:
r n = 1 , if   N ^ ( n ) = 1   and   C j 1 ( N ^ ( n ) ) = 1 0 , otherwise
For 1-pixel P, if F j 1 ( P ) = 0 and C j ( P ) = 0 , its reconstructable information ( r n , n = 0 , 1 , , 7 ) is updated as R j ( P ) , the iteration information ( i n , n = 0 , 1 , , 6 ) updated as I j ( P ) = j 1 , as well as F j ( P ) is set to 1 (this means that the 1-pixel P has become a skeletal point). Otherwise, F j ( P ) remains 0.
Consider the intermediate thinning results T 2 and T 3 as illustrated in Figure 5c,d, for a 1-pixel P T 3 denoted in Figure 6b; its eight neighbors T 2 are shown in Figure 6a confined by a dotted square. The current iteration count for thinning is j = 3 . By means of the checking function in Equation (4), we have C 2 ( N ^ ( 2 ) ) = 0 , C 2 ( N ^ ( 4 ) ) = 1 , C 2 ( N ^ ( 5 ) ) = 1 and C 3 ( P ) = 0 as the numeric presentation in Figure 6c. Because the thinning flag F 2 ( P ) = 0 and C 3 ( P ) = 0 , in this case, the reconstructable information is updated as r 7 r 6 r 5 r 4 r 3 r 2 r 1 r 0 = 00110000 by Equation (7) or further represented as R 3 ( P ) = 48 according to Equation (6). The iteration information ( j 1 = 2 ) is i 6 i 5 i 4 i 3 i 2 i 1 i 0 = 000010 or I 3 ( P ) = 2 according to Equation (5). Moreover, since F 2 ( P ) = 0 and C 3 ( P ) = 0 , the 1-pixel P becomes a skeletal point, and F 3 ( P ) is set to 1. Note here that for a 1-pixel P, once F ( P ) becomes 1, its RSP-pixel updating will not be performed at the following iterations since the necessary reconstructable information of the skeletal pixel, R S P ( P ) , should be kept at this landmark. Based on the RSP-pixel data format given in Figure 4, in this illustration, R S P ( P ) is finally updated as (1 000010 00110000), which can also be represented in decimal as (1 2 48) according to Equations (5) and (6).
Based on the operational mechanism presented above, the procedure of updating the RSP matrix in a fully-parallel thinning is summarized as follows.

RSP Updating: Procedure of Updating the RSP Matrix in a Rule-Based Thinning

  • Null a RSP matrix.
  • Consider the (j)-th iteration in a fully-parallel thinning process. Do Steps 3–5 for each 1-pixel P satisfying F j 1 ( P ) = 0 and C j ( P ) = 0 .
  • Update R j ( P ) according to Equation (7).
  • Update I j ( P ) j 1 .
  • Set F j ( P ) 1 . This is a landmark that the 1-pixel P first becomes a skeletal pixel.
  • Perform Steps 2–5 until the thinning result is not changed. The binary F matrix also represents the final thinning result indeed.
Following the current example, a series of thinning details for each pixel change is given in Figure 7 to illustrate the behavior of RSP updating. Consider a 9 × 9 digital pattern as given in Figure 5a; let T 0 be the original pattern, and the RSP matrix is set to be null initially, as shown in Figure 7a. After the first thinning iteration, we have the thinning result T 1 as shown in Figure 7b, where T 0 is confined by a dotted line, and thus, the removed pixel can be easily inspected for reference. There is not any RSP-pixel to be updated in this iteration since the corresponding C-value for every 1-pixel is 1, i.e., all of them are possibly further removed at the next thinning iteration. Figure 7c–h shows the updated RSP information for each 1-pixel P satisfying to C ( P ) = 0 in the thinning result T 2 (that is, they become skeletal pixels at this thinning iteration), where the reconstructable information R ( P ) is numbered for reference, and the current iteration count is j = 2 . Note here that for the 1-pixel at (3, 2), (2, 3) and (3, 3), their RSP information is not updated here since their C values are 1. Figure 7i shows the update RSP pixels with gray squares at this thinning iteration. After updating the RSP matrix in T 2 , we have just obtained the six skeletal pixels (4, 2), (5, 2), (6, 2), (2, 4), (2, 5), (2, 6), whose C values are 0, and thus, their updates of RSP information stop here.
Consider the next thinning iteration ( j = 3 ) for the current illustration; let the updated RSP matrix and the thinning result T 2 be redisplayed in Figure 8a,b, respectively. Figure 8c,d shows respectively the updated RSP information for the 1-pixel (2, 3) and (3, 2) having zero C value in T 3 . Note here that the 1-pixel (3, 3) in the T 2 has been removed in T 3 . The RSP matrix is finally updated as shown in Figure 8e. The thinning and its RSP updating process stop here for the current illustration. The RSP matrix can be decomposed into F, I and R matrices as shown in Figure 8f,g,h, respectively. This information will be useful for pattern reconstruction as presented in the next subsection.

2.2. Pattern Reconstruction Based on the Skeleton Table

By observing the obtained RSP information, the thinning result can be further represented by a skeleton table, which records only the final skeletal pixels with their coordinates, I and R information as listed in Table 1. The thin line is easily redrawn based on the coordinates in the skeleton table. More importantly, the digital pattern can be further reconstructed based on their I and R information.
According to the RSP-pixel updating as presented in Section 2.1, for each skeletal pixel P, its non-zero neighbors labeled in R ( P ) and iteration count I ( P ) for obtaining its reconstructable structure have been recorded. Therefore, the area of the reconstructed partial pattern for P, denoted as A ˙ ( P ) , can be easily performed by just dilating I ( P ) times the non-zero neighbors r R ( P ) with a 3 × 3 structure element ( S E ) and expressed by:
A ˙ ( P ) = r ( = 1 ) R ( P ) ( r S E ) I ( P ) ,
where ( r S E ) I ( P ) represents that morphological dilations are performed I ( P ) times for each 1-neighbor r R ( P ) with the S E as given below. Then, the union of all dilation results yields the partial reconstructed pattern A ˙ ( P ) .
S E = 1 1 1 1 1 1 1 1 1
Based on such a pattern reconstruction mechanism, the original pattern can be approximately reconstructed by the following union operation and denoted as A r e c , whereas the original pattern is denoted as A o r g for the calculation of pattern reconstructability presented in Section 3.
A r e c P skeleton   table A ˙ ( P ) ,
Figure 9 illustrates how to obtain the A ˙ ( P ) for all pixels in the skeleton table listed in Table 1. Note here that the reconstructable information 1-neighbor r R ( P ) is displayed by a gray square. Except that morphological dilations are performed twice for the cases of Figure 9a,e, it is performed only once for others. The final reconstructed pattern A r e c shown in Figure 9i is obtained by the union of all partial patterns ( A ˙ )s and is the same as the original digital pattern given in Figure 5a. The whole procedure of our pattern reconstruction from the skeleton table can be simply summarized as follows.

Pattern Reconstruction: Procedure of Pattern Reconstruction from the Skeleton Table

  • Null a W × H binary array, and input the skeleton table.
  • Find A ˙ ( P ) according to Equation (8) for each pixel P skeleton table.
  • Find the union A r e c according to Equation (10) and put it in the array. The pattern is thus reconstructed.

2.3. Removal of Hidden-Deletable Points in the Thinning Iteration

So far, we have presented how to yield the RSP information during a fully-parallel thinning process and to reconstruct the pattern based on the RSP information. In these illustrations, the used thinning result in each iteration is indeed obtained by means of two processes: the original fully-parallel thinning [9] and the process of removing hidden deletable points (RHDP) newly presented in this section. In the following, we will first examine the effect of our approach without the assistance of the RHDP process, then introduce the so-called hidden deletable point (HDP) and, finally, present our RHDP process.
Reconsider the digital pattern in Figure 5a and perform the fully-parallel thinning [9] on it without the assistance of the RHDP process; the original thinning results in each iteration, denoted by T i o r g , i = 1 , 2 , 3 , 4 , are shown in Figure 10. Compare them to Figure 5; the results are rather different, and the final thin line is biased obviously. In addition, it takes more thinning iterations (4 versus 3). Figure 10e shows the reconstructed pattern (gray squares) with the presented pattern reconstruction approach, where the result is over-reconstructed. In Chen’s early study [14], this phenomenon results from the so-called HDP effect. Contrary to the complicated vector analysis presented in [14] for detecting the HDPs, in this paper, a simple and feasible way for the removal of HDPs is newly presented as follows.
Recall that T j denotes the intermediate thinning result at the j-th iteration in Section 2.1. Let T j * be the intermediate thinning result obtained from T j 1 with only the original algorithm performed. Let δ j be the set of deleted points obtained by performing the set difference between T j 1 and T j * . Let β j be the boundary of T j 1 obtained by first eroding T j 1 with S E in Equation (9) and then performing the set difference between T j 1 and its erosion ( T j 1 S E ). Therefore, we have:
δ j = T j 1 T j *
β j = T j 1 ( T j 1 S E )
Note here that δ j β j . Let τ j be the set of points β j , but δ j ; thus, we have:
τ j = β j δ j
It also implies that β j = δ j τ j . Now, consider β j as an image array with the same size of original image. If the 1-pixel P τ j in the β j -image satisfies C j ( P ) = 1 , then it is regarded as an HDP, and the corresponding pixel T j * will be removed further. After performing such an HDP removal process as summarized below, the new thinning result T j can be obtained as used in Section 2.1.

RHDP: Process of Removing HDPs

  • Given the intermediate thinning result T j 1 .
  • Find δ j , β j and τ j according to Equations (11)–(13), respectively.
  • For each pixel P τ j , do Step 4.
  • If the pixel P in the β j -image satisfies C j ( P ) = 1 , then the corresponding pixel T j * is an HDP and removed from T j * .
  • Update T j T j * for the next thinning iteration.
Figure 11 illustrates how to transform T 1 * into T 1 via the RHDP process. Given T 0 as shown in Figure 5a, the next thinning result T 1 * purely obtained by Chen and Hsu’s method [9] is given in Figure 11a. Thus, we have δ 1 as shown in Figure 11b according to Equation (11). Based on Equation (12), the boundary of T 0 is shown in Figure 11c and denoted by β 1 , which can be further displayed as in Figure 11d by labeling the δ -point and τ -point. Since the τ points, (1, 1), (5, 4) and (4, 5), belong to HDPs by means of performing the checking function in Step 4 of RHDP, they can be further removed from T 1 * , and the new thinning result T 1 is thus obtained as shown in Figure 11e, which is the same as in Figure 5b.

3. Results and Discussion

The proposed algorithm is implemented by Microsoft Visual Studio 6.0 C++ and run on a laptop computer with Intel® Core TM i5 2.6 GHz CPU (Intel, Santa Clara, CA, USA) and 4 GB RAM. Let A o r g be the original pattern and A r e c be the reconstructed pattern obtained by Equation (10). In order to evaluate the reconstruction ability of the proposed approach, a measurement of reconstructability (MR) [12] is used and expressed as below.
M R ( A o r g , A r e c ) = 1 A r e a ( A o r g A r e c ) + A r e a ( A r e c A o r g ) A r e a ( A o r g )
Here, A o r g A r e c represents the set of pixels A o r g , but A r e c , and vice versa. The range of MR is between zero and one. The MR increases with the accuracy of reconstructability, where MR = 1 represents that the pattern is reconstructed completely. Since the HDPs removed or not in a thinning iteration will significantly affect the thinning result and number of iterations (NI), the measurement of skeleton deviation (MSD) [40] and NI are also adopted for our performance evaluations. To evaluate the MSD, we can give an original thin line pattern P l i n e , generate its thick-line pattern P t h i c k by a thickening procedure [14] and perform the P t h i c k by a thinning algorithm to obtain the skeleton result P s k e l e t o n . Then, the MSD can be computed as follows.
M S D ( P l i n e , P s k e l e t o n ) = q P l i n e D E ( q , P s k e l e t o n )
where D E ( q , P s k e l e t o n ) represents the minimum Euclidean distance between q and P s k e l e t o n . In this evaluation, the lower MSD means that the adopted thinning algorithm has a better performance to reduce the bias skeleton.
Reconsider the original digital pattern as given in Figure 1a; by performing the proposed approach on it, the resultant skeletons are shown respectively in Figure 12a without and Figure 12b with the assistance of the RHDP process. The former shows a biased skeleton taking 20 thinning iterations, whereas the latter shows a bias-reduced skeleton taking 14 thinning iterations. In the phase of pattern reconstruction, the reconstructed results are shown in Figure 12c (MR = 0.817) and Figure 12d (MR = 0.994), respectively. Here, we can find that the biased skeleton may result in the over-reconstructed pattern, as shown in Figure 12c. Accordingly, based on these results, not only the feasibility of our pattern reconstruction mechanism is confirmed, but also the developed RHDP process can effectively help to obtain the bias-reduced skeleton and reconstruct the pattern more closely.

3.1. Experiments with a Set of Unit-Width Letters

For investigating additionally the skeleton deviation with MSD, original thin lines should be given initially as ground truths. In this study, we built seven unit-width letters, “A”, “E”, “H”, “L”, “M”, “R” and “T” as shown in Figure 13a. By means of the thickening procedures [14], the thickened results shown respectively in Figure 13b are obtained and will be used for the following investigations of MR, NI, as well as MSD. Since the proposed approach is designed for the fully-parallel thinning algorithms as depicted in the flowcharts of Figure 2, three fully-parallel thinning algorithms, namely CH [9], AW [16] and Rockett [20], are used for comparisons and discussions. Figure 14a,b shows their thinning results without and with the RHDP process, respectively. It is obvious that the biased skeletons of Figure 14b are much less than those of Figure 14a. Note here that in the same test situation, the three algorithms have a similar performance due to such a thinning algorithm based on the similar design rules. This phenomenon can also be reported in the measurements of NI and MSD as listed in Table 2 and Table 3, respectively. Table 2 shows that the average NI with the RHDP process is approximately 27% less than that without the RHDP process. Table 3 shows that the average MSD with the RHDP process is approximately 42% less than that without the RHDP process. Note here that since the Rockett algorithm [20] is the improved version of AW [16], the Rockett algorithm (MSD = 190.7) is a little bit better than AW’s algorithm (MSD = 206.9) by the presented method without using the RHDP process. As a result, this experiment confirms that our RHDP process embedded in a thinning iteration can effectively reduce not only the bias skeleton effect, but also the number of iterations.
By means of performing the proposed pattern reconstruction approach depicted in Figure 2b on the skeleton tables of the thinning results shown in Figure 14, the corresponding reconstruction results are displayed in Figure 15. It can be seen that the reconstruction results of Figure 15a are over-reconstructed, whereas those of Figure 15b are closer to the originals. Table 4 reports that the average MR with the RHDP process is increased 12.5% compared to that without the RHDP process. This evaluation further confirms that the proposed approach with the assistance of the RHDP process (MR = 0.981) is very feasible for realizing the pattern reconstruction in a fully-parallel thinning.

3.2. Experiments with Some Patterns in the MPEG7 CE-Shape-1 Dataset

Some patterns (“Deer”, “Fly”, “Bird”, “Chicken”, “Device” and “glass’) from the MPEG7 CE-Shape-1 dataset [41] are used for further experiments and comparisons of the NI and MR measurements. Figure 16a shows the thinning results obtained by applying Jang and Chin’s MST-based reconstructable parallel thinning algorithm [12]. It can be observed that many unwanted branches are yielded in the final skeletons resulting from the fact that the feature points should be retained in the thinning process in order to completely reconstruct the whole pattern as shown in Figure 16b.
Again, the three fully-parallel thinning algorithms, CH [9], AW [16] and Rockett [20], involved in the proposed approach are used for comparisons and discussions. Figure 17 shows the obtained thinning and reconstruction results by the proposed approach without using the RHDP process. The phenomenon of over-reconstruction is very obvious. By means of the assistance of the RHDP process in the presented approach, Figure 18 demonstrates that the reconstruction results are near the original ones. In the NI and MR measurements, Table 5 reports that the average NI with the RHDP process is 28% less than that without the RHDP process, whereas Table 6 reports that the average MR with RHDP process is increased 28.4% compared to that without the RHDP process. The performances of these experiments are similar to those presented in Section 3.1. It is accordingly concluded that the feasibility of the pattern reconstruction mechanism developed for a fully-parallel thinning algorithms has been confirmed, and the bias skeleton phenomenon usually appearing in a fully-parallel thinning algorithm can be effectively reduced by involving the proposed RHDP process.
As a discussion, even the reconstruction result obtained by the proposed approach with the RHDP process is very close to the original pattern; the over-reconstructed situation is avoided; however the complete reconstruction is not easily achieved. For example, referring to Figure 15b and Figure 18, the unreconstructed portions usually appear in the convex boundaries. This phenomenon results apparently from the thinning templates and morphological structure elements adopted being of a square form, and the reconstruction result depends strongly on the thinning result. Therefore, it can be regarded as a new research direction in the near future by applying the hexagonal structure [42] to the proposed algorithms for overcoming such a phenomenon.

4. Conclusions and Future Works

In order to make a fully-parallel thinning algorithm capable of pattern reconstruction from the resultant skeleton, in this paper, an RSP-updating mechanism embedded in a thinning iteration has been presented for recording the necessary information of the thinning flag, the iteration count, as well as the reconstructable structure, thus obtaining a useful skeleton table (also the thinning result). Based on the information of the iteration count and the reconstructable structure for each skeletal pixel in the skeleton table, the pattern can be reconstructed by means of the dilating and uniting operations. In this approach, the reconstruction result is strongly related to the thinning result. If the thinning result reflects more likely the original pattern, the reconstructed pattern will be closer to the original one. For a fully-parallel thinning algorithm, there unfortunately exists a bias skeleton effect, in particular on the portions of the T-junction and L-junction. Such a biased skeleton usually results from the HDPs and will yield the over-reconstructed result using the proposed approach. Therefore, in this paper, a process of removing HDPs (RHDP) has also been presented and embedded in a thinning iteration to further reduce the bias skeleton effect. With the assistance of the RHDP process, the resultant thinning can more likely reflect the original pattern, and thus, the reconstructed pattern is closer to the original one using the proposed approach. Three well-known fully-parallel thinning algorithms investigated by means of the proposed approach with the assistance of the RHDP process confirm that 98% reconstructability (without the over-reconstructed phenomenon) can be achieved. In addition, the number of thinning iterations with the RHDP process can be reduced by about 25% compared to that without the RHDP process. Even the experimental results have confirmed the feasibility of our pattern reconstruction mechanism and RHDP process in a fully-parallel thinning algorithm; the complete (100%) reconstruction is difficult to achieve using the developed approach. The reason given is that the thinning templates and morphological structure elements adopted here are of a square form, and the reconstruction result depends strongly on the thinning result. In other words, the limit is due to the different eight-neighbor distances in a square grid as argued recently by Chen and Chao [40]. According to the equal six-neighbor distances in a hexagonal grid as reported by He and Jia [42], how to apply the hexagonal structure in the fully-parallel thinning algorithm design and the proposed approach could be a good topic and will be considered as our future works.

Acknowledgments

This work was supported in part by the Ministry of Science and Technology, Taiwan, under Grant Number MOST105-2221-E-155-063.

Author Contributions

Yung-Sheng Chen and Ming-Te Chao conceived of and designed the experiments. Ming-Te Chao performed the experiments. Yung-Sheng Chen and Ming-Te Chao analyzed the data. Yung-Sheng Chen and Ming-Te Chao wrote the paper.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this article:
AWAhmed and Ward [16]
CHChen and Hsu [9]
HDPHidden deletable point
MATMedial axis transformation
MRMeasurement of reconstructability
MSDMeasurement of skeleton deviation
MSTMorphological skeleton transformation
NINumber of iterations
RHDPRemoving hidden deletable points
RSPReconstructable skeletal pixel
SEStructure element

References

  1. Lam, L.; Suen, C.Y. An evaluation of parallel thinning algorithms for character recognition. IEEE Trans. Pattern Anal. Mach. Intell. 1995, 17, 914–919. [Google Scholar] [CrossRef]
  2. Santosh, K.C.; Wendling, L. Character recognition based on non-linear multi-projection profiles measure. Front. Comput. Sci. 2015, 9, 678–690. [Google Scholar] [CrossRef]
  3. Ji, L.; Yi, Z.; Shang, L.; Pu, X. Binary fingerprint image thinning using template-based PCNNs. IEEE Trans. Syst. Man Cybern. 2007, 37, 1407–1413. [Google Scholar] [CrossRef]
  4. Xie, F.; Xu, G.; Cheng, Y.; Tian, Y. Human body and posture recognition system based on an improved thinning algorithm. IET Image Process. 2011, 5, 420–428. [Google Scholar] [CrossRef]
  5. Salazar-Gonzalez, A.; Kaba, D.; Li, Y.; Liu, X. Segmentation of the blood vessels and optic disk in retinal images. IEEE J. Biomed. Health Inform. 2014, 18, 1874–1886. [Google Scholar] [CrossRef] [PubMed]
  6. Hilditch, C.J. Linear skeletons from square cupboards. In Machine Intelligence IV; Meltzer, B., Michie, D., Eds.; American Elsevier: New York, NY, USA, 1969; pp. 403–420. [Google Scholar]
  7. Zhang, T.Y.; Suen, C.Y. A fast parallel algorithm for thinning digital patterns. Commun. ACM 1984, 27, 236–239. [Google Scholar] [CrossRef]
  8. Chen, Y.S.; Hsu, W.H. A modified fast parallel algorithm for thinning digital patterns. Pattern Recognit. Lett. 1988, 7, 99–106. [Google Scholar] [CrossRef]
  9. Chen, Y.S.; Hsu, W.H. A systematic approach for designing 2-subcycle and pseudo 1-subcycle parallel thinning algorithms. Pattern Recognit. 1989, 22, 267–282. [Google Scholar] [CrossRef]
  10. Chen, Y.S.; Hsu, W.H. A 1-subcycle parallel thinning algorithm for producing perfect 8-curves and obtaining isotropic skeleton of the L-shape pattern. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, San Diego, CA, USA, 4–8 June 1989; pp. 208–215. [Google Scholar]
  11. Lam, L.; Lee, S.W.; Suen, C.Y. Thinning methodologies: A comprehensive survey. IEEE Trans. Pattern Anal. Mach. Intell. 1992, 14, 869–885. [Google Scholar] [CrossRef]
  12. Jang, B.K.; Chin, R.T. Reconstructable parallel thinning. Int. J. Pattern Recognit. Artif. Intell. 1993, 7, 1145–1181. [Google Scholar] [CrossRef]
  13. Hall, R. Parallel connectivity-preserving thinning algorithms. In Topological Algorithms for Digital Image Processing; Kong, T.Y., Rosenfeld, A., Eds.; Elsevier: Amsterdam, The Netherlands, 1996; pp. 145–179. [Google Scholar]
  14. Chen, Y.S. Hidden deletable pixel detection using vector analysis in parallel thinning to obtain bias-reduced skeletons. Comput. Vis. Image Underst. 1998, 71, 294–311. [Google Scholar] [CrossRef]
  15. Bernard, T.T.; Manzanera, A. Improved low complexity fully parallel thinning algorithm. In Proceedings of the IEEE International Conference on Image Analysis and Processing, Venice, Italy, 27–29 September 1999; pp. 215–220. [Google Scholar]
  16. Ahmed, M.; Ward, R. A rotation invariant rule-based thinning algorithm for character recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2002, 24, 1672–1678. [Google Scholar] [CrossRef]
  17. Ranwez, V.; Soille, P. Order independent homotopic thinning for binary and grey tone anchored skeletons. Pattern Recognit. Lett. 2002, 23, 687–702. [Google Scholar] [CrossRef]
  18. Huang, L.; Wan, G.; Liu, C. An improved parallel thinning algorithm. In Proceedings of the International Conference on Document Analysis and Recognition, Edinburgh, UK, 3–6 August 2003; pp. 780–783. [Google Scholar]
  19. Patil, P.M.; Suralkar, S.R.; Sheikh, F.B. Rotation invariant thinning algorithm to detect ridge bifurcations for fingerprint identification. In Proceedings of the IEEE International Conference on Tools with Artificial Intelligence, Hong Kong, China, 14–16 November 2005; pp. 634–641. [Google Scholar]
  20. Rockett, P.I. An improved rotation-invariant thinning algorithm. IEEE Trans. Pattern Anal. Mach. Intell. 2005, 27, 1671–1674. [Google Scholar] [CrossRef] [PubMed]
  21. Bertrand, G.; Couprie, M. Two-dimensional parallel thinning algorithms based on critical kernels. J. Math. Imaging Vis. 2008, 31, 35–56. [Google Scholar] [CrossRef]
  22. Németh, G.; Kardos, P.; Palágyi, K. 2D parallel thinning and shrinking based on sufficient conditions for topology preservation. Acta Cybern. 2011, 20, 125–144. [Google Scholar]
  23. Chen, W.; Sui, L.; Xu, Z.; Lang, Y. Improved Zhang-Suen thinning algorithm in binary line drawing applications. In Proceedings of the International Conference on Systems and Informatics, Yantai, China, 19–20 May 2012; pp. 1947–1950. [Google Scholar]
  24. Tarabek, P. A robust parallel thinning algorithm for pattern recognition. In Proceedings of the IEEE International Symposium on Applied Computational Intelligence and Informatics (SACI), Timisoara, Romania, 24–26 May 2012; pp. 75–79. [Google Scholar]
  25. Kwon, J.S. Improved parallel thinning algorithm to obtain unit-width skeleton. Int. J. Multimed. Its Appl. 2013, 5, 1–14. [Google Scholar] [CrossRef]
  26. Paágyi, K. Equivalent sequential and parallel reductions in arbitrary binary pictures. Int. J. Pattern Recognit. Artif. Intell. 2014, 28, 1460009. [Google Scholar]
  27. Blum, H. A transformation for extracting new descriptors of shape. In Models for the Perception of Speech and Visual Form; Wathen-Dunn, W., Ed.; MIT Press: Cambridge, MA, USA, 1967; pp. 362–380. [Google Scholar]
  28. Montanari, U. Continuous skeletons from digitized. J. ACM 1969, 16, 534–549. [Google Scholar] [CrossRef]
  29. Blum, H.; Nagel, R.N. Shape description using weighted symmetric axis features. Pattern Recognit. 1978, 10, 167–180. [Google Scholar] [CrossRef]
  30. Peleg, S.; Rosenfeld, A. A min-max medial axis transformation. IEEE Trans. Pattern Anal. Mach. Intell. 1981, 3, 208–210. [Google Scholar] [CrossRef] [PubMed]
  31. Chen, Y.S.; Hsu, W.H. MATNET: A neural network for medial axis transformation. J. Chin. Inst. Eng. 1993, 16, 757–771. [Google Scholar] [CrossRef]
  32. Shih, F.Y.; Pu, C.C. A skeletonization algorithm by maxima tracking on Euclidean distance transform. Pattern Recognit. 1995, 28, 331–341. [Google Scholar] [CrossRef]
  33. Chang, S. Extracting skeletons from distance maps. Int. J.Comput. Sci. Netw. Secur. 2007, 7, 213–219. [Google Scholar]
  34. Yan, T.Q.; Zhou, C.X. A continuous skeletonization method based on distance transform. Commun. Comput. Inf. Sci. 2012, 304, 251–258. [Google Scholar]
  35. Saha, P.K.; Borgefors, G.; di Baja, G.S. A survey on skeletonization algorithms and their applications. Pattern Recognit. Lett. 2016, 76, 3–12. [Google Scholar] [CrossRef]
  36. Saha, P.K.; Borgefors, G.; di Baja, G.S. Skeletonization: Theory, Methods and Applications, 1st ed.; Academic Press, Elsevier Ltd.: Cambridge, MA, USA, 2017. [Google Scholar]
  37. Bertrand, G. On critical kernels. C. R. Math. 2007, 345, 363–367. [Google Scholar] [CrossRef]
  38. Rosenfeld, A.; Kak, A.C. Digital Picture Processing, 2nd ed.; Academic Press: New York, NY, USA, 1982; Volume 2. [Google Scholar]
  39. Gonzalez, R.C.; Woods, R.E. Digital Image Processing, 2nd ed.; Prentice-Hall Inc.: Upper Saddle River, NJ, USA, 2002. [Google Scholar]
  40. Chen, Y.S.; Chao, M.T. MAT based thinning for line patterns. Int. J. Pattern Recognit. Artif. Intell. 2016, 30, 1654001. [Google Scholar] [CrossRef]
  41. Latecki, L.J.; Lakamper, R.; Eckhardt, U. Shape descriptors for non-rigid shapes with a single closed contour. In Proceedings of the International Conference on Computer Vision and Pattern Recognition, Hilton Head Island, SC, USA, 13–15 June 2000; pp. 424–429. [Google Scholar]
  42. He, X.; Jia, W. Hexagonal structure for intelligent vision. In Proceedings of the International Conference on Information and Communication Technologies, Karachi, Pakistan, 27–28 August 2005; pp. 52–64. [Google Scholar]
Figure 1. Illustration of Jang and Chin’s MST-based reconstructable parallel thinning. (a) Feature pixels obtained from the MST, (b) the final skeleton containing reduced feature pixels, feature pixels and the unit-width pixels to ensure pattern reconstruction, as well as (c) the reconstructed pattern.
Figure 1. Illustration of Jang and Chin’s MST-based reconstructable parallel thinning. (a) Feature pixels obtained from the MST, (b) the final skeleton containing reduced feature pixels, feature pixels and the unit-width pixels to ensure pattern reconstruction, as well as (c) the reconstructed pattern.
Jimaging 03 00029 g001
Figure 2. Flowchart of the proposed approach for digital pattern (a) thinning and (b) reconstruction.
Figure 2. Flowchart of the proposed approach for digital pattern (a) thinning and (b) reconstruction.
Jimaging 03 00029 g002
Figure 3. Definition of eight neighbors for a pixel P.
Figure 3. Definition of eight neighbors for a pixel P.
Jimaging 03 00029 g003
Figure 4. Definition of 16-bit data format for a reconstructable skeletal pixel (RSP)-pixel.
Figure 4. Definition of 16-bit data format for a reconstructable skeletal pixel (RSP)-pixel.
Jimaging 03 00029 g004
Figure 5. (a) Input digital pattern. The thinning results at the 1st, 2nd and 3rd iteration are shown in (bd), respectively. The numbers in (e) illustrate the points removed at the related thinning iteration.
Figure 5. (a) Input digital pattern. The thinning results at the 1st, 2nd and 3rd iteration are shown in (bd), respectively. The numbers in (e) illustrate the points removed at the related thinning iteration.
Jimaging 03 00029 g005
Figure 6. Illustrations of a 1-pixel P T 3 in (b) and its eight neighbors T 2 confined by a dotted square. The current iteration count for thinning is 3. According to the Equation (4), (c) presents the C-value calculated for the three 1-neighbor N ^ ( 2 ) , N ^ ( 4 ) , and N ^ ( 5 ) T 2 in (a) and that calculated for the 1-pixel P T 3 in (b).
Figure 6. Illustrations of a 1-pixel P T 3 in (b) and its eight neighbors T 2 confined by a dotted square. The current iteration count for thinning is 3. According to the Equation (4), (c) presents the C-value calculated for the three 1-neighbor N ^ ( 2 ) , N ^ ( 4 ) , and N ^ ( 5 ) T 2 in (a) and that calculated for the 1-pixel P T 3 in (b).
Jimaging 03 00029 g006
Figure 7. Illustrations of RSP updating from T 1 to T 2 . (a) Null RSP matrix initially. That is, the RSP information is set to be (0 0 0) 10 in decimal or (0 000000 00000000) 2 in binary. (b) Thinning result T 1 , where the original pattern is regarded as T 0 and confined by a dotted line for reference. (bh) show the updated RSP information for each 1-pixel P satisfying C ( P ) = 0 in T 2 , where the reconstructable information R ( P ) is numbered. (i) The updated RSP pixel is denoted with a gray square.
Figure 7. Illustrations of RSP updating from T 1 to T 2 . (a) Null RSP matrix initially. That is, the RSP information is set to be (0 0 0) 10 in decimal or (0 000000 00000000) 2 in binary. (b) Thinning result T 1 , where the original pattern is regarded as T 0 and confined by a dotted line for reference. (bh) show the updated RSP information for each 1-pixel P satisfying C ( P ) = 0 in T 2 , where the reconstructable information R ( P ) is numbered. (i) The updated RSP pixel is denoted with a gray square.
Jimaging 03 00029 g007aJimaging 03 00029 g007b
Figure 8. Illustrations of RSP updating from T 2 to T 3 . (a) The RSP matrix at j = 2 , where six skeletal pixels have been identified. (b) Thinning result T 2 . (c,d) show respectively the updated RSP information for the 1-pixel (2, 3) and (3, 2) having zero C value in T 3 . (e) The updated RSP pixel is denoted with a gray square. The RSP matrix can be decomposed into F, I and R matrices, as shown in (f,g,h), respectively.
Figure 8. Illustrations of RSP updating from T 2 to T 3 . (a) The RSP matrix at j = 2 , where six skeletal pixels have been identified. (b) Thinning result T 2 . (c,d) show respectively the updated RSP information for the 1-pixel (2, 3) and (3, 2) having zero C value in T 3 . (e) The updated RSP pixel is denoted with a gray square. The RSP matrix can be decomposed into F, I and R matrices, as shown in (f,g,h), respectively.
Jimaging 03 00029 g008aJimaging 03 00029 g008b
Figure 9. Illustrations of pattern reconstruction from the skeleton table. Reconstructed partial pattern from (a) R S P ( 3 , 2 ) , (b) R S P ( 4 , 2 ) , (c) R S P ( 5 , 2 ) , (d) R S P ( 6 , 2 ) , (e) R S P ( 2 , 3 ) , (f) R S P ( 2 , 4 ) , (g) R S P ( 2 , 5 ) and (h) R S P ( 2 , 6 ) . Here, the reconstructable information 1-neighbor r R ( P ) is displayed by a gray square. (i) shows the final reconstructed pattern A with the union of these partial patterns ( A ˙ )s.
Figure 9. Illustrations of pattern reconstruction from the skeleton table. Reconstructed partial pattern from (a) R S P ( 3 , 2 ) , (b) R S P ( 4 , 2 ) , (c) R S P ( 5 , 2 ) , (d) R S P ( 6 , 2 ) , (e) R S P ( 2 , 3 ) , (f) R S P ( 2 , 4 ) , (g) R S P ( 2 , 5 ) and (h) R S P ( 2 , 6 ) . Here, the reconstructable information 1-neighbor r R ( P ) is displayed by a gray square. (i) shows the final reconstructed pattern A with the union of these partial patterns ( A ˙ )s.
Jimaging 03 00029 g009
Figure 10. (ad) The original thinning results at the 1st, 2nd, 3rd and 4th iteration by means of the fully-parallel thinning without the assistance of RHDP process. (e) Gray squares show the reconstructed pattern with our approach. It is obviously over-reconstructed due to the HDP effect.
Figure 10. (ad) The original thinning results at the 1st, 2nd, 3rd and 4th iteration by means of the fully-parallel thinning without the assistance of RHDP process. (e) Gray squares show the reconstructed pattern with our approach. It is obviously over-reconstructed due to the HDP effect.
Jimaging 03 00029 g010
Figure 11. Illustrations of transforming T 1 * into T 1 . With T 0 in Figure 5a, (a) shows the next thinning result T 1 * purely obtained by Chen and Hsu’s algorithm [9]; (b,c) shows the corresponding δ 1 and β 1 . To clarify, let the δ - and τ -points be marked on the β 1 -image, as shown in (d). According to the Step 4 of RHDP, the three τ points, (1, 1), (5, 4) and (4, 5), are HDPs. They can be further removed from T 1 * , and the new thinning result T 1 is thus obtained as shown in (e).
Figure 11. Illustrations of transforming T 1 * into T 1 . With T 0 in Figure 5a, (a) shows the next thinning result T 1 * purely obtained by Chen and Hsu’s algorithm [9]; (b,c) shows the corresponding δ 1 and β 1 . To clarify, let the δ - and τ -points be marked on the β 1 -image, as shown in (d). According to the Step 4 of RHDP, the three τ points, (1, 1), (5, 4) and (4, 5), are HDPs. They can be further removed from T 1 * , and the new thinning result T 1 is thus obtained as shown in (e).
Jimaging 03 00029 g011
Figure 12. The thinning result obtained (a) without and (b) with the assistance of RHDP. (c,d) show the corresponding reconstruction result, where the original pattern pixels and the reconstructed pixels are marked by “black region squares” and “gray frame squares” respectively.
Figure 12. The thinning result obtained (a) without and (b) with the assistance of RHDP. (c,d) show the corresponding reconstruction result, where the original pattern pixels and the reconstructed pixels are marked by “black region squares” and “gray frame squares” respectively.
Jimaging 03 00029 g012
Figure 13. (a) Seven unit-width letters used as ground truths for MSD measurements. (b) Thickened digital patterns from (a) used for the investigations of MR, NI and MSD.
Figure 13. (a) Seven unit-width letters used as ground truths for MSD measurements. (b) Thickened digital patterns from (a) used for the investigations of MR, NI and MSD.
Jimaging 03 00029 g013
Figure 14. Thinning results (a) without and (b) with the RHDP process are obtained by the three fully-parallel thinning algorithms involved in the proposed approach for comparisons. The biased skeletons of (b) are much less than those of (a).
Figure 14. Thinning results (a) without and (b) with the RHDP process are obtained by the three fully-parallel thinning algorithms involved in the proposed approach for comparisons. The biased skeletons of (b) are much less than those of (a).
Jimaging 03 00029 g014
Figure 15. Reconstruction results (a) without and (b) with the RHDP process are obtained by the three fully-parallel thinning algorithms involved in the proposed approach for comparisons. The reconstruction results of (a) are over-reconstructed, whereas those of (b) are closer to the originals.
Figure 15. Reconstruction results (a) without and (b) with the RHDP process are obtained by the three fully-parallel thinning algorithms involved in the proposed approach for comparisons. The reconstruction results of (a) are over-reconstructed, whereas those of (b) are closer to the originals.
Jimaging 03 00029 g015aJimaging 03 00029 g015b
Figure 16. (a) Thinning results and (b) reconstruction results of some patterns from the MPEG7 CE-Shape-1 dataset are obtained by Jang and Chin’s MST-based reconstructable parallel thinning algorithm. To completely reconstruct the whole pattern, the feature points obtained by MST are retained in the thinning process, and thus, many unwanted branches are yielded in the resultant skeletons.
Figure 16. (a) Thinning results and (b) reconstruction results of some patterns from the MPEG7 CE-Shape-1 dataset are obtained by Jang and Chin’s MST-based reconstructable parallel thinning algorithm. To completely reconstruct the whole pattern, the feature points obtained by MST are retained in the thinning process, and thus, many unwanted branches are yielded in the resultant skeletons.
Jimaging 03 00029 g016
Figure 17. Results of some patterns from the MPEG7 CE-Shape-1 dataset are obtained by the three fully-parallel thinning algorithms involved in the proposed approach without the RHDP process for comparisons. Here, the thinning and reconstruction results are placed on the first and second row, respectively. The phenomenon of over-reconstruction is very obvious. (a) CH [9]; (b) AW [16]; (c) Rockett [20].
Figure 17. Results of some patterns from the MPEG7 CE-Shape-1 dataset are obtained by the three fully-parallel thinning algorithms involved in the proposed approach without the RHDP process for comparisons. Here, the thinning and reconstruction results are placed on the first and second row, respectively. The phenomenon of over-reconstruction is very obvious. (a) CH [9]; (b) AW [16]; (c) Rockett [20].
Jimaging 03 00029 g017
Figure 18. Results of some patterns from the MPEG7 CE-Shape-1 dataset are obtained by the three fully-parallel thinning algorithms involved in the proposed approach with the RHDP process for comparisons. Here, the thinning and reconstruction results are placed at the first and second row, respectively. The reconstruction results are near the original ones. (a) CH [9]; (b) AW [16]; (c) Rockett [20].
Figure 18. Results of some patterns from the MPEG7 CE-Shape-1 dataset are obtained by the three fully-parallel thinning algorithms involved in the proposed approach with the RHDP process for comparisons. Here, the thinning and reconstruction results are placed at the first and second row, respectively. The reconstruction results are near the original ones. (a) CH [9]; (b) AW [16]; (c) Rockett [20].
Jimaging 03 00029 g018
Table 1. The final 8 skeletal pixels, recorded with their coordinates, I and R information, form a skeleton table.
Table 1. The final 8 skeletal pixels, recorded with their coordinates, I and R information, form a skeleton table.
Skeletal PixelsCoordinatesIR
1(3, 2)248
2(4, 2)1255
3(5, 2)1255
4(6, 2)1255
5(2, 3)26
6(2, 4)1255
7(2, 5)1255
8(2, 6)1255
Table 2. NI measurements for the results given in Figure 14 by applying the presented approach with three fully-parallel thinning algorithms. The average NI with the RHDP process is 27% less than that without the RHDP process.
Table 2. NI measurements for the results given in Figure 14 by applying the presented approach with three fully-parallel thinning algorithms. The average NI with the RHDP process is 27% less than that without the RHDP process.
Without RHDP With RHDP
PatternCH [9]AW [16]Rockett [20] CH [9]AW [16]Rockett [20]
“A”202020 151515
“E”191919 131313
“H”212121 141414
“L”191919 141414
“M”212121 181818
“R”222222 161616
“T”212121 141414
Average20.420.420.4 14.914.914.9
Table 3. MSD measurements for the results given in Figure 14 by applying the presented approach with three fully-parallel thinning algorithms. The average MSD with the RHDP process is 42% less than that without the RHDP process.
Table 3. MSD measurements for the results given in Figure 14 by applying the presented approach with three fully-parallel thinning algorithms. The average MSD with the RHDP process is 42% less than that without the RHDP process.
Without RHDP With RHDP
PatternCH [9]AW [16]Rockett [20] CH [9]AW [16]Rockett [20]
“A”295.1328.3288.1 221.9218.1218.1
“E”116124116 242222
“H”120120120 121212
“L”404040 252323
“M”469.9512.6469.9 342.4348.4348.4
“R”238.8263.6240.9 162.8164.5164.5
“T”606060 666
Average191.4206.9190.7 113.4113.4113.4
The Rockett [20] is the improved version of AW [16]; it can be seen that the Rockett algorithm is a little bit better than AW’s algorithm.
Table 4. MR measurements for the results given in Figure 15 by applying the presented pattern reconstruction approach with three fully-parallel thinning algorithms. The average MR with the RHDP process is increased 12.5% compared to that without the RHDP process.
Table 4. MR measurements for the results given in Figure 15 by applying the presented pattern reconstruction approach with three fully-parallel thinning algorithms. The average MR with the RHDP process is increased 12.5% compared to that without the RHDP process.
Without RHDP With RHDP
PatternCH [9]AW [16]Rockett [20] CH [9]AW [16]Rockett [20]
“A”0.6950.7000.700 0.9820.9820.982
“E”0.9270.9270.927 0.9880.9880.988
“H”0.9000.9000.900 0.9810.9810.981
“L”0.9310.9310.931 0.9750.9750.975
“M”0.8780.8780.878 0.9760.9760.976
“R”0.7510.7540.754 0.9920.9920.992
“T”0.9110.9110.911 0.9740.9740.974
Average0.8560.8570.857 0.9810.9810.981
Table 5. NI measurements for the thinning results given in Figure 17 and Figure 18 by applying the presented approach with three fully-parallel thinning algorithms. The average NI with the RHDP process is 28% less than that without the RHDP process.
Table 5. NI measurements for the thinning results given in Figure 17 and Figure 18 by applying the presented approach with three fully-parallel thinning algorithms. The average NI with the RHDP process is 28% less than that without the RHDP process.
Without RHDP With RHDP
PatternCH [9]AW [16]Rockett [20] CH [9]AW [16]Rockett [20]
Deer313131 252525
Fly393939 313131
Bird525252 302929
Chicken626161 444444
Device262525 212121
Glass363636 262626
Average41.040.740.7 29.529.329.3
Table 6. MR measurements for the reconstruction results given in Figure 17 and Figure 18 by applying the presented pattern reconstruction approach with three fully-parallel thinning algorithms. The average MR with the RHDP process is increased 28.4% compared to that without the RHDP process.
Table 6. MR measurements for the reconstruction results given in Figure 17 and Figure 18 by applying the presented pattern reconstruction approach with three fully-parallel thinning algorithms. The average MR with the RHDP process is increased 28.4% compared to that without the RHDP process.
Without RHDP With RHDP
PatternCH [9]AW [16]Rockett [20] CH [9]AW [16]Rockett [20]
Deer0.7510.7590.759 0.9810.9810.981
Fly0.7720.7730.773 0.9810.9790.979
Bird0.5410.5430.543 0.9890.9890.989
Chicken0.6640.6700.670 0.9780.9780.978
Device0.7120.7130.713 0.9880.9880.988
Glass0.7550.7550.755 0.9940.9940.994
Average0.6990.7020.702 0.9850.9850.985

Share and Cite

MDPI and ACS Style

Chen, Y.-S.; Chao, M.-T. Pattern Reconstructability in Fully Parallel Thinning. J. Imaging 2017, 3, 29. https://doi.org/10.3390/jimaging3030029

AMA Style

Chen Y-S, Chao M-T. Pattern Reconstructability in Fully Parallel Thinning. Journal of Imaging. 2017; 3(3):29. https://doi.org/10.3390/jimaging3030029

Chicago/Turabian Style

Chen, Yung-Sheng, and Ming-Te Chao. 2017. "Pattern Reconstructability in Fully Parallel Thinning" Journal of Imaging 3, no. 3: 29. https://doi.org/10.3390/jimaging3030029

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop