20.01.2013 Views

Master Thesis - Department of Computer Science

Master Thesis - Department of Computer Science

Master Thesis - Department of Computer Science

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

P 9<br />

P 8<br />

P<br />

7<br />

(i−1, j+1)<br />

P 2<br />

P 1<br />

P 6<br />

P 3<br />

(i−1, j−1) (i, j−1) (i+1, j−1)<br />

(i−1, j)<br />

(i, j)<br />

(i, j+1)<br />

P 4<br />

(i+1, j)<br />

P 5<br />

(i+1, j+1)<br />

Figure A.13: The locations <strong>of</strong> the nine pixels in a window.<br />

is used in the thinning process, where P1 is the center pixel and P2, ..., P9 are its<br />

neighbors. Let P ′<br />

i be the pixel value <strong>of</strong> Pi. The method consists <strong>of</strong> two iterations<br />

applied to any pixels with a pixel value 1, and determines whether a center point<br />

must be to preserved or deleted. In the first iteration, the center point is deleted<br />

from the image, if the following conditions are satisfied:<br />

(a) 2 ≤ N(P1) ≤ 6;<br />

(b) S(P1) = 1;<br />

(c) P ′ 2 ∗ P ′ 4 ∗ P ′ 6<br />

= 0;<br />

(d) P ′ 4 ∗ P ′ 6 ∗ P ′ 8 = 0;<br />

where N(P1) is the number <strong>of</strong> nonzero neighbors <strong>of</strong> P1, that is, N(P1) = P ′ 2 +<br />

P ′ 3 + ... + P ′ 9 and S(P1) is the number <strong>of</strong> transitions from 0 to 1 for the order set<br />

{P ′ 2 , P ′ 3 , ..., P ′ 9 }. N(P1) = 0, N(P1) = 1, and N(P1) > 6 are corresponding to the<br />

center pixel P1 is an isolation point, end point and intermediate point, respectively.<br />

If S(P1) > 1, the center point P1 is a bridge that preserves the connectivity <strong>of</strong> a<br />

skeleton. For these four cases, the center pixel P1 will not be deleted to break the<br />

skeleton.<br />

In the second iteration, the conditions (a) and (b) remain the same, conditions<br />

(c) and (d) are modified as follows:<br />

(c’) P ′ 2 ∗ P ′ 4 ∗ P ′ 8<br />

(d’) P ′ 2 ∗ P ′ 6 ∗ P ′ 8<br />

= 0;<br />

= 0;<br />

Conditions (c) and (d) for the first iteration are used to remove south-east bound-<br />

ary points and north-west corner points which are not skeletal pixels. Similarly, con-<br />

136

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!