III. New Thinning Algorithm

Because every fringe line in these images is very wide, we must thus use

a thinning algorithm ( Fig.3) to extract the skeleton of the fringe{4-5}. Generally

speaking, the processing steps for the thinning method have three different approaches.

(1) Execute saving or deletion only along one direction (shown as Fig.4(a)); that is, only considering the north edge-point, east edge-point, and south-west edge-point. However, the result of this approach isn't satisfactory. (2) Separately execute saving or deletion along four directions, that is the north edge-point, south edge-point, east edge-point and west edge-point (shown as Fig.4(c)). The result of this approach is good but it consumes much time. (3) Execute saving or deletion along two opposite directions: one for the east edge-point, south edge-point, north-west edge-point; the other for the west edge-point, north edge-point, south-east edge-point(shown as Fig.4(b)). The result of this approach is good and we can save more time.

In this paper, we use a new method for this purpose. In the binary pattern by using iterative deletions of the dark points ( i.e., changing them to white ) along the edges of a pattern until the pattern is thinned to a line drawing, and the thinned pattern must preserve the connectedness and shape of the original pattern. In the new thinning method, first we follow the coding method of Carlo Arcelli and Gabriella Sanniti{5} to encode the fringe pattern. This coding method consists of forward scanning (from top left to bottom right) and backward scanning (from bottom right to top left), which will mark some pixels in the image to distinguish the boundary and core from the object.

Then we utilize the new "saving-deletion rule" to save or delete these marked pixels, and therefore the boundary which doesn't destroy the skeleton shape will be deleted. We repeat the steps above, and the fringe skeleton is obtained. The detailed procedure is the following. First, we must define a keyword "cross-number" (CN) as the follows:

 

CROSS NUMBER : for any pixel P(I,J), in row I and column J of the image, let n_0,n_1...,n_7 be the values of its eight neighbors starting from P(I,J+1) counterclockwise. The cross number is defined as:

(Fig.5 is some examples for the calculation of CN)

 

CN = | n_{k+1}-n_k |

 

where the value n_0 to n_7 is 0 or 1.

and n_8 is equal to n_0.

 

In order to attain the purpose of thinning, we can take the following steps :

 

Step 1 : Divide the input image into two parts - the background and the

object. The black part stands for the object, and

the white part stands for the background.

 

Step 2 : Encode the picture element.

The code of the background is "0" (we won't mark "0" for a clean picture), and the code of the object is "1" when the 8-connected pixels have one or more backgrounds. The code of the other object region is "4".(We can change the code value but the result will be a little different.)

 

Step 3 : Forward scan once (from top left to bottom right), and change the code value. The changing rule is the following:

 

P'(I,J) = left { ba {ll} Max[ P(I,J),n_3-1,n_4-1,n_5-1,n_6-1] & if P(I,J)

 

P(I,J) & if P(I,J) = 0

 

Step 4 : Backward scan once (from bottom right to top left), and change the code

value. The changing rule is as the following :

 

P'(I,J) =left { ba {ll} Max[ P(I,J),n_2-1,n_1-1,n_0-1,n_7-1] & if P(I,J)

P(I,J) & if P(I,J) = 0

 

Step 5 : Saving-deletion rule : When we scan the whole image, we don't change the code value if P(I,J)=0 or 1 or 4, because P(I,J)=0 indicates this point is background, P(I,J)=4 indicates this point is core, and P(I,J)=1 indicates this point's deletion would cause excessive erosion. If P(I,J)=2 or 3, then we save or delete it according to the following saving-deletion rule.

The tree structure of the saving-deletion rule is shown as Fig.6, and Fig.7 shows some different cases of 8-connected pixels.

 

{it 1. when CN=2 } = {it if CP=1 } = {it then P(I,J) is a saved

point. }

> > (see Fig.7(1))

> > otherwise P(I,J) will be deleted.

> > (see Fig.7(2)-(3))

2. when CN=4 > i. CP=2 if (CPo >= 1) or (n_0 X n_4=1) or

(n_2 X n_6=1 )

> > then P(I,J) is a saved point.

> > (see Fig.7(4)-(5))

> > otherwise P(I,J) will be deleted.

> > (see Fig.7(6)-(7))

> ii. CP=3 > if (CPo=2) or (n_0 X n_4=1) or (n_2 X n_6=1 )

> > then P(I,J) is a saved point.

> > (see Fig.7(8)-(13))

> > otherwise P(I,J) will be deleted.

> > (see Fig.7(14)-(15))

> iii. CP=4 > if CPo > 2 then P(I,J) is a saved point.

 

> > (see Fig.7(16)-(18))

> > if (CPo=2) and (n_0times n_4=1 or n_2times

n_6=1 )

> > then P(I,J) is a saved point.

> > (see Fig.7(19)-(22))

> > otherwise P(I,J) will be deleted.

> > (see Fig.7(23)-(24))

> iv. CP=5 > if CPo=3 then P(I,J) is a saved point.

> > (see Fig.7(25)-(28))

> > otherwise P(I,J) will be deleted.

> > (see Fig.7(29)-(32))

> v. CP=6 > if (CPo=4) or (CPe=4 )

 

> > then P(I,J) is a saved point.

> > (see Fig.7(33)-(34))

> > otherwise P(I,J) will be deleted.

> > (see Fig.7(35)-(36))

3. when CN=6 > if CPe=3 > then P(I,J) will be deleted.

> > (see Fig.7(37)-(39))

> > otherwise P(I,J) is a saved point.

> > (see Fig.7(40)-(42))

4. when CN=8 > > then P(I,J) is a saved point.

> > (see Fig.7(43))

 

 

Step 6 : Repeat steps 2-5 until the image has no core region.

 

After this thinning procedure, we can obtain the fringe skeleton of the image.

 

nextindexback