• No results found

Image Analysis on Wood Fiber Cross-Section Images

N/A
N/A
Protected

Academic year: 2022

Share "Image Analysis on Wood Fiber Cross-Section Images"

Copied!
35
0
0

Loading.... (view fulltext now)

Full text

(1)

IT 11 028

Examensarbete 30 hp Maj 2011

Image Analysis on Wood Fiber Cross-Section Images

Sitao Feng

Institutionen för informationsteknologi

(2)
(3)

Teknisk- naturvetenskaplig fakultet UTH-enheten

Besöksadress:

Ångströmlaboratoriet Lägerhyddsvägen 1 Hus 4, Plan 0

Postadress:

Box 536 751 21 Uppsala

Telefon:

018 – 471 30 03

Telefax:

018 – 471 30 00

Hemsida:

http://www.teknat.uu.se/student

Abstract

Image Analysis on Wood Fiber Cross-Section Images

Sitao Feng

Lignification of wood fibers has a significant impact on wood properties. To measure the distribution of lignin in compression wood fiber cross-section images, a crisp segmentation method had been developed. It segments the lumen, the normally lignified cell wall and the highly lignified cell wall of each fiber. In order to refine this given segmentation the following two fuzzy segmentation methods were evaluated in this thesis: Iterative Relative Multi Objects Fuzzy Connectedness and Weighted Distance Transform on Curved Space. The crisp segmentation is used for the multi-seed selection.

The crisp and the two fuzzy segmentations are then evaluated by comparing with the manual segmentation. It shows that Iterative Relative Multi Objects Fuzzy

Connectedness has the best performance on segmenting the lumen, whereas

Weighted Distance Transform on Curved Space outperforms the two other methods regarding the normally lignified cell wall and the highly lignified cell wall.

IT 11 028

Examinator: Anders Jansson Ämnesgranskare: Cris Luengo Handledare: Bettina Selig

(4)
(5)

Acknowledgments

First of all I would like to express my gratitude to my supervisor Bettina Selig and my reviewer Cris L. Luengo Hendriks at CBA (Centre for Image Analysis, Uppsala, Sweden) for the constructive suggestions and instructions. The thesis would have been harder without your help.

Also I would like to thank all the staff in the CBA. You are very kind. A special thanks to Joakim Lindblad and Filip Malmberg, for your valuable suggestions on my thesis.

Finally many thanks to my loving parents who have supported my master studies in Sweden mentally and materially.

(6)
(7)

Contents

1 Introduction 3

1.1 Background . . . 3

1.2 Project description . . . 4

1.3 Thesis purpose . . . 4

2 Methods 5 2.1 Fuzzy Connectedness . . . 5

2.1.1 Fuzzy adjacency . . . 6

2.1.2 Fuzzy affinity . . . 6

2.1.3 How to calculate fuzzy connectedness . . . 7

2.1.4 Iterative Relative Multi Object Fuzzy Connectedness . . . . 8

2.2 Weighted Distance Transform on Curved Space . . . 10

2.2.1 Step distance . . . 10

2.2.2 How to calculate the shortest path length . . . 11

2.2.3 Multiple objects segmentation using the WDT method . . . 11

3 Implement details 13 3.1 Running environment . . . 13

3.2 Provided data . . . 13

3.3 Parameter settings for the FC method . . . 15

3.3.1 Fuzzy adjacency . . . 15

3.3.2 Fuzzy affinity . . . 15

3.4 Parameter settings for the WDT method . . . 15

3.5 Multi-seed selection . . . 16

3.6 Comparison methods . . . 18

3.6.1 Overlapping degree of the segmented regions . . . 18

3.6.2 Deviation between the segmentation boundaries . . . 19

4 Evaluation and results 21 4.1 Qualitative evaluation . . . 21

4.2 Quantitative evaluation . . . 22

4.2.1 Evaluation by using the overlapping degree method . . . 22

4.2.2 Evaluation by using the boundary deviation method . . . 23

4.2.3 Final evaluation result . . . 24

4.3 Special case analysis . . . 24

5 Conclusion and future work 27

Bibliography 28

(8)
(9)

1 Introduction

1.1 Background

Wood is a biological composite material, which is formed by complex multi-cell layered structure and special phenomena of molecular mechanics [1]. The word fiber is often used to call all wood cells. However, fibers refer to a specific cell type in the wood morphology, called tracheids [2]. These tracheids are the basic units of the xylem, consisting of a single elongated cell with a thick, tough cell wall and an empty space in the center, which is called lumen [3]. The space between the cells is called middle lamellae containing lignin, which holds the cells together [4].

As lignin is also found in the cell walls, it confers the mechanical strength to the cells and enhances decay resistance to wood [2]. Modifications in lignin content have an important effect of wood properties [1]. It is particularly abundant in compression wood (see Fig. 1.1) [5].

Fig. 1.1: Compression wood cross-section. Highly lignified regions marked with white arrow

The production and accumulation of lignin into the wood cell walls is called lignifi- cation. Lignification of compression wood starts at the cell corners and condenses the lignin through the cell walls to the lumen [3, 4]. It transforms the normally lignified cell wall into the highly lignified cell wall. Fig. 1.2 shows the structure of a compression wood cell, including the two regions of cell walls.

Fig. 1.2: Structure of a compression wood cell

(10)

1.2 Project description

The regions lumen (L), normally lignified cell wall (NL) and highly lignified cell wall (HL) need to be segmented, so they can be measured individually. This seg- mentation was previously done manually, but it is tedious, expensive and can be dependent on the operators [3].

Therefore an automatic method was developed to replace the manual segmenta- tion [3]. The result of this method is a crisp segmentation that divides each wood cell in L, NL and HL.

The boundaries between the different regions are fuzzy by nature in the original image of wood cell, especially the boundary between HL and ML. Therefore the boundary is not well defined and it is difficult to set a crisp segmentation line.

Naturally we would think to use a fuzzy segmentation method for the compression wood fiber cross-section images.

1.3 Thesis purpose

The main objective of the thesis project is to use the fuzzy segmentation methods to refine the crisp segmentation results provided by [3]. This includes the following concrete steps:

1. Find one or several suitable fuzzy segmentation methods.

2. Segment the regions L, NL, HL and ML individually with the fuzzy segmen- tation methods by using the given crisp results.

3. Compare the performance among these segmentation methods.

4

(11)

2 Methods

Some segmentation methods based on the thresholding, like Otsu’s method [6] and Fukunaga’s method [7], are used in many applications frequently. Thresholding utilizes the significant intensity variations between regions. It does not work well here because the gray values of the different regions are not distinct enough. Fig.

2.1 depicts a compression wood cell and its corresponding histogram. Clearly from the histogram that there is one obvious valley between L and other regions, which means L is easy to detect. But NL and HL are not able to segment by thresholding accurately.

Fig. 2.1: A compression wood cell and its histogram

In recent years, fuzzy segmentation as an alternative method to traditional “crisp”

segmentation methods had a big development. It is an effective way to extract ob- jects in different image types, especially microscope images [8]. In this project, we have the results of the crisp segmentation provided. We want to refine the results by creating the fuzzy segmentation and use the crisp segmentation for initiation.

In what follows, first we explain the concept of fuzzy connectedness that mea- sures the hanging-togetherness of objects in a given image. We then present an algorithm based on this concept, called Iterative Relative Multi Object Fuzzy Con- nectedness (FC) [9], which segments the multiple objects in the given image. The above are presented in section 2.1. The second method is based on Weighted Distance Transform on Curved Space (WDT) [10], which transforms gray-level images to weighted distance images. Here, we apply a competition mechanism on the weighted distance images to segment multiple objects in the given image, which is presented in section 2.2.

2.1 Fuzzy Connectedness

Fuzzy connectedness in images builds on two basic fuzzy relations: the fuzzy adjacency of pixels, which is decided by the properties of a plane integer space, and the fuzzy affinity between pixels, which depends on the fuzzy adjacency of pixels and their intensity values [11]. We first present the definitions and notations of these two fuzzy relations in section 2.1.1 and 2.1.2 respectively. We then state how to calculate the fuzzy connectedness between pixels in section 2.1.3. At last,

(12)

the Iterative Relative Multi Object Fuzzy Connectedness (FC), which is used to decide the memberships of pixels, is introduced in section 2.1.4.

2.1.1 Fuzzy adjacency

Fuzzy adjacency is a fuzzy relation, denoted by α, which represents the adjacent degree of points in a plane positive integer space Z2. An image is defined as I = hC, f i, where C is the set of coordinates of points in Z2 and the intensity function f is to calculate the intensity value of each point [12]. Fuzzy adjacency is reflexive and symmetric, which depends on the coordinates of pixels in Z2 [12].

We define a function µα(p, q) to calculate the fuzzy adjacency between any two pixels p and q in the image. It is a non-increasing function on the distance between pixels [13]. We use the following definition to calculate the fuzzy adjacency α:

µα(p, q) =

1 1+k1

q P2

i=1(pi−qi)2

 if qP2i=1(pi− qi)2 ≤ 2

0 otherwise

, (1)

where p, q ∈ C, denoted as (p1, p2) and (q1, q2) respectively. k1 is the distance decline factor. It is clear from Eq. 1 to see the closer the pixels, the larger the adjacency values.

q P2

i=1(pi− qi)2 ≤ 2 determines the scope of fuzzy adjacency.

Fig. 2.2 shows the fuzzy adjacency scope of a pixel p. The blue grids represent the adjacent pixels to p. The scope depends on the spatial coverage function you defined.

Fig. 2.2: Fuzzy adjacency scope of a pixel p 2.1.2 Fuzzy affinity

Fuzzy affinity, denoted by κ combines the fuzzy adjacency of pixels and their intensity values. It describes the grades of homogeneity of the adjacent pixels. It is also reflexive and symmetric [11, 12]. In practice, we define a function µκ(p, q) for any p, q ∈ C to calculate the affinity degrees. We use the following definition to compute the fuzzy affinity κ:

µκ(p, q) = µα(p, q)

1 + k2|f (p) − f (q)|, (2) where k2 is the gradient weight. It is clear from Eq. 2 to find that the higher the fuzzy adjacency between p and q and the smaller the intensity difference of p and q, the greater the fuzzy affinity between p and q.

6

(13)

Usually, the function of fuzzy affinity is more complex than the one that is defined in Eq. 2. Trying to find a better function to calculate the fuzzy affinity is one of the most important and difficult parts in segmentation based on fuzzy connectedness.

2.1.3 How to calculate fuzzy connectedness

Now we capture the global hanging-togetherness, which builds on the fuzzy adja- cency and fuzzy affinity, called fuzzy connectedness. Before presenting the defini- tion of fuzzy connectedness, we first state a definition of path. A path is defined as a sequence of pixels, which connects any two pixels in the image [12]. And each pair of successive pixels in the path are 8-connected [11]. All the possible paths between any two pixels p and q in the image are denoted by P athpq. Fig. 2.3 (left) depicts three paths in P athpq.

Fig. 2.3: Three possible paths between pixels p and q (left) and the strength of one path (µκ(i) denotes the affinity between the i-th pair of successive pixels)

(right)

The strength of a path is determined as the minimum affinity between every pair of successive pixels along this path, denoted by µN, that can be considered as the weakest link of the path [11, 12].

µN(path) = M inµκ(i)∈pathκ(i)), (3) where µκ(i) is the fuzzy affinity between i-th pair of successive pixels in the path.

Fig. 2.3 (right) displays the strength of one path between p and q. For any p, q ∈ C, the fuzzy connectedness K between p and q is defined as follows [9].

µK(p, q) = M axpath∈P athpqN(path)) (4) The fuzzy connectedness of every pair of pixels p and q in the image is determined as the strength of the strongest path between them [11], which is depicted in Fig.

2.4.

(14)

Fig. 2.4: Fuzzy connectedness µK between two pixels p and q (µN(i) represents the strength of the i-th path between p and q)

2.1.4 Iterative Relative Multi Object Fuzzy Connectedness

In this subsection, we present the FC method, which segments multiple objects in a given image and works on a set of seeds for each object [9]. An algorithm κ-fuzzy object extraction for multiple seeds is iteratively called by the FC method [12], which outputs a fuzzy connectivity image (FCI) for a set of seeds with a specific fuzzy affinity κ. We define F CIκ,S = hC, fκ,Si. For every p ∈ C, the fκ,S(p) is defined as follow:

fκ,S(p) = M axs∈SK(p, s)), (5) where S is a set of seeds for an object. The FCI gives the strongest fuzzy con- nectedness between every pixel and the set of seeds.

The FC method is an improved version of relative fuzzy connectedness (RFC), which is devised to overcome the problem in the RFC method [14, 15]. The FC method outperforms the RFC method in peripheral subtle region of an object [9].

Another outperformance of the FC method is to avoid “holes” exiting in the seg- mented objects except there is at least one seed of another object in that “hole” [9].

A “hole” is some connected background pixels in a segmented object. It is proba- bly caused by noise.

The segmentation procedure of the FC method with a specific fuzzy affinity κ is presented as follow: We first define a set of seeds for each object, and then we choose a set of seeds S for the selected object to explain how the FC method works. For the seeds S of the selected object, we calculate its corresponding fuzzy connectivity image F CIκ,S. Then we compute another fuzzy connectivity image F CIκ,W by using the rest sets of seeds W . Afterwards, compare F CIκ,S with F CIκ,W, and put these pixels into the selected object if their corresponding in- tensity values in F CIκ,S are larger than them in F CIκ,W. After that, we set the affinities of the identified pixels with all other pixels to 0 and get a modified fuzzy affinity κM. We then use this κM to calculate a new F CIκM,W for the rest

8

(15)

seed sets W . Then iteratively compare F CIκ,S with F CIκM,W and put the pixels, which have larger values in F CIκ,S than in F CIκM,W, into the selected object, until there are no affinities of pixels changed. By now the selected object has been totally segmented. Repeat the above procedure for the rest seed sets of the objects until all the objects are segmented. A pseudo-code of the FC method, which gives the detail of data structure and program flew, is described as follows.

Input: I = hC, f i, κ as defined in section 2.1.1 and 2.1.2. The sets of seeds of all objects Seed = {S1, S2, . . . , Sn}. Any two sets are non-intersection.

Output: ISeed= hC, fSeedi containing all the segmented objects. Different objects correspond to different labels and the pixels have the same label to form an object.

Auxiliary data structures: For Si ∈ Seed, the F CIκ,Si = hC, fκ,Sii. The rest seed sets W = ∪(Seed\{Si}) and its corresponding F CIκM,W = hC, fκM,Wi, where κM is the modified affinity after each iteration, and the temporary image It = hC, fti such that ft = 1 if the intensity value of one pixel in F CIκ,Si is greater than that in F CIκM,W. Index i refers to the iteration number; that is, the number of completed while loops, in Steps 5-17, for each fixed Si.

begin

1. for Si ∈ Seed do 2. compute F CIκ,Si; 3. set all pixels of It to 0 ; 4. set κM = κ and flag = true;

5. while flag = true do 6. set flag = false;

7. compute F CIκM,W; 8. for all p ∈ C do

9. if ft(p) = 0 and fκ,Si(p) > fκM,W(p) then 10. set ft(p) = 1;

11. set flag = true;

12. for all q ∈ C, q 6= p, do 13. set κS(p, q) = 0;

14. endfor ;

15. endif ; 16. endfor ;

(16)

17. endwhile;

18. for all p ∈ C do 19. if ft(p) = 1 20. fSeed = i;

21. endif ; 22. endfor ; 23. endfor ;

24. Output ISeed = hC, fSeedi;

end

2.2 Weighted Distance Transform on Curved Space

The Weighted Distance Transform on Curved Space (WDT) gives the shortest path length between pixels in the image, and we use the weighted distance to represent the length of a path [16]. The weighted distance of a path builds on the step distance between every two successive pixels along the path. In section 2.2.1, we present the definition of the step distance. The weighted distance and how to calculate the shortest path length between pixels are stated in section 2.2.2. At last we explain how to use the WDT method to decide the belongingness of pixels in section 2.2.3.

2.2.1 Step distance

The step distance sd is the distance from one pixel to one of its 8-connected neighbors, which depends on the Euclidean distance between the two pixels and their intensity values [17]. For any two pixels p, q ∈ C, we use the following definition to compute the step distance:

sd(p, q) =

( q P2

i=1(pi− qi)2+ k32(f (p) − f (q))2 if P2i=1|pi− qi| ≤ 2

Inf otherwise , (6)

where k3 is the scale factor between intensity and Euclidean distance. Fig. 2.5 depicts the 8-connected neighbors (represented in blue) of pixel p. Eq. 6 illustrates that the closer the intensity values of p and q and the smaller the Euclidean distance between them, the smaller the step distance from p to q.

Fig. 2.5: The 8-connected pixels of one pixel p 10

(17)

2.2.2 How to calculate the shortest path length

The weighted distance of one path is the sum of all the step distances along this path [16], which is denoted Wd. The following definition is used to calculate Wd.

Wd(path) =

n

X

i=1

sd(i), (7)

where sd(i) is the step distance of i-th pair of successive pixels in the path. Fig.

2.6 shows the weighted distance of one path between p and q.

Fig. 2.6: The weighted distance of one path between p and q

The shortest path length between pixels is determined as the minimal weighted distance of all possible paths between these pixels [16]. For any two pixels p, q ∈ C, the shortest path length is calculated by WDT(p, q) as follow.

WDT(p, q) = M inpath∈P athpq(Wd(path)), (8) where P athpq is a set of all possible paths between p and q. Fig. 2.7 depicts the shortest path length WDT(p, q).

Fig. 2.7: The shortest path length between p and q (Wd(i) represents the weighted distance of the i-th path between p and q)

2.2.3 Multiple objects segmentation using the WDT method

The WDT algorithm is introduced in [16]. Now we state how to determine the belongingness of pixels by using the result of the WDT algorithm. First we select

(18)

a set of seeds for each object. Then we use the WDT method to calculate the shortest path length between each pixel and each set of seeds. Finally the pixel is assigned to the object, whose seed is closest according to the WDT [9]. A pseudo- code of this multiple objects segmentation using the WDT method is described as follows.

Input: I = hC, f i, sd as defined in section 2.1.1 and 2.2.1, the sets of seeds of all objects Seed = {S1, S2, . . . , Sn} of pairwise disjoint sets of seed pixels.

Output: ISeed= hC, fSeedi contains all segmented objects. Different objects cor- respond to different intensity values, the pixels of the same intensity value constitute an object.

Auxiliary data structures: For Si ∈ Seed, the WDT image Msd,Si = hC, fsd,Sii, where fsd,Si computes the shortest path length between each pixel and Si. The rest sets of seeds W = ∪(Seed\{Si}) and its corresponding WDT image Msd,W = hC, fsd,Wi. Index i marks every set of seeds, which is between 1 and n.

begin

1. set all pixels of ISeed to 0;

2. for Si ∈ Seed do

3. compute Msd,Si and Msd,W by using the WDT method;

4. for all p ∈ C do

5. if fSeed(p) = 0 and fsd,Si(p) < fsd,W(p) 6. set fSeed(p) = i;

7. endif ; 8. endfor ; 9. endfor ;

10. output ISeed = hC, fSeedi;

end

12

(19)

3 Implement details

We built on available implementations for the FC method and the WDT method.

The FC method was implemented by Joakim Lindblad in MATLAB and Filip Malmberg provided a program that calculates the WDT for one single seed. We extended this further to work on multiple objects and allow a set of seeds for each object. The parameter values in both methods are determined in terms of the properties of the wood fiber cross-section images and several experiments.

In what follows, running environment is listed in section 3.1. The provided data, such as the wood fiber cross-section image and the results of the crisp segmentation and manual segmentation provided, are pooled together in section 3.2. Parameter settings for the FC method and the WDT method are presented in section 3.3 and 3.4, respectively. An example is presented in section 3.5 to demonstrate the multi- seed selection for the regions L, NL, HL and ML. The overlapping degree of the segmented regions and the deviation between the segmentation boundaries, which are used to evaluate the performance of the FC method and the WDT method, are stated in section 3.6.

3.1 Running environment

The following inventory shows the operating system and the application softwares, which are used in this thesis.

1. Operating System: Red Hat Enterprise Linux Client release 5.6 (Tikanga) 2. Intel(R) Xeon(TM) CPU 3.60GHz

3. Cache size: 2048KB 4. MATLAB 7.11.0 (2010b)

3.2 Provided data

There are three kinds of provided image data in this project.

1. The cross-section image: Pinus sylvestris L., a sample (2 × 1 × 1 cm3) of Scots pine is used to generate the wood fiber cross-section image. Then a 20 µm thick cross-section was cut using a sledge microtome. The section was mounted on glass slides with some drops of distilled water and viewed with an epifluorescence microscope (Leica DM RE) and a HCX PLFLUOTAR 40x objective. 16-bit intensity image was obtained from the microscope with a Leica DFC490 CCD camera attachment and a blue filter (470 µm). The size of the image is 3264 ×2448 and the resolution is 0.1072 µm/pixel [3]. The acquired image, which is shown in Fig. 3.1(a), is divided into sub-images.

Each sub-image includes a whole compression wood cell. Fig. 3.1(b) shows one sub-image.

(20)

a b

Fig. 3.1: (a) The acquired wood fiber cross-section image. (b) One sub-image of a compression wood cell

2. Automatic segmentation results of 29 sub-images: For each cell there are three crisp segmentation results, which are corresponding to L, NL and HL respectively. These segmentations were achieved with the method described by Selig et al. [3]. Fig. 3.2 (a-c) depict the crisp segmentation results of Fig.

3.1(b).

3. Manual segmentation results of 29 sub-images (same as for automatic seg- mentation): For each cell there are three manual segmentation results, which are corresponding to L, NL and HL respectively. The cells were delineated manually by an expert. Fig. 3.2 (d-f) depict the manual segmentation results of Fig. 3.1(b).

a b c

d e f

Fig. 3.2: (a-c) Crisp segmentation of a sub-image in L, NL and HL in sequence.

(d-f) Manual segmentation of a sub-image in L, NL and HL in sequence

14

(21)

3.3 Parameter settings for the FC method

The FC method is based on fuzzy connectedness. And fuzzy connectedness builds on fuzzy adjacency and fuzzy affinity. We present how to choose the values for each parameter in fuzzy adjacency and affinity in section 3.3.1 and 3.3.2, respectively.

3.3.1 Fuzzy adjacency

The function of calculating the adjacency contains three input parameters: the original image I, the adjacent scope and the distance decline factor k1. In this thesis, I is the sub-image of each compression wood cell. The adjacent scope of one pixel p is shown in Fig. 2.2 in section 2.1.1. Eq. 1 in section 2.1.1 is used to calculate the adjacency of a given image. k1 was chosen experimentally.

Therefore, we tested the values between 0.1 and 1.0, and 0.5 was the best choice.

As mentioned in section 2.1.1, the adjacency value is in [0 1], which just depends on the Euclidean distance between any two adjacent pixels. The maximum Euclidean distance is 2 in the defined adjacent scope. So k1 = 0.5 makes the adjacency values distribute in [0.5 1].

The output of the function is a square matrix, whose row length is the number of pixels in a given image. Each row of the matrix contains the adjacency values between one pixel and all the pixels in the image.

3.3.2 Fuzzy affinity

Three input parameters need to be specified in the affinity function, see Eq. 2 in section 2.1.2. They are the image I, the adjacency matrix and the gradient weight k2. The image I and the adjacency matrix were used as described in section 3.3.1.

But here, we converted the intensity values of I to the range [0 1]. k2 was chosen experimentally, we tried 10, 20, . . . , 100 and 20 was the best choice. The difference of intensity values of two adjacent pixels was too small due to range of the intensity values. Therefore, we set k2 = 20 to increase the impact of the intensity values of pixels.

The result of this affinity function is also a square matrix, same as the fuzzy adjacency matrix. But here, the values in each row are the fuzzy affinity values between one pixel and all the pixels in the image.

3.4 Parameter settings for the WDT method

We state how to choose values for each parameter in the WDT method in this section. There are three parameters in this method: the original image I, the positions of the seeds and the scale factor k3 in Eq. 6 in section 2.2.1. In this thesis, image I is the sub-image of each cell as described in section 3.2. The position of the seed is the linear index of seed in image I. We set k3 = 1.0. It keeps the original effect of the intensity values of pixels.

The result of the WDT method is a matrix, whose size is same with the image I. The value of each element in the matrix is corresponding to the shortest path length from the pixel to the closest seed.

(22)

3.5 Multi-seed selection

Seeds selection is one of the most important parts in these two fuzzy segmentation methods. Seeds are pixels, which are chosen to represent an object. It needs a good strategy to choose the seed pixels, and we also should consider which seeds are better for an object to be segmented from the others in a given image. In this section we introduce three multi-seed selection methods, which utilize the crisp segmentation results of the objects L, NL, HL and ML and convert them to their own seeds. We use the crisp segmentation results of one compression wood cell to explain how to select the set of seeds for each object. At last we present how to combine the sets of seeds of the four objects into a seed image.

1. Seeds of L: We use the morphological thinning, which is implemented in MATLAB in the bwmorph function with the “thin” parameter [18], to get the seeds of L. The crisp segmentation result of L will be shrunk into a minimally connected stroke. We use this stroke as the seeds of L. Fig.

3.3(a) shows the crisp segmentation result of L and Fig. 3.3(b) depicts the minimally connected stroke of L.

a b

Fig. 3.3: (a) The crisp segmentation result of L. (b) Seed image of L, which is the minimally connected stroke of (a).

2. Seeds of NL and HL: The seeds of NL and HL are selected experimentally.

We choose the pixels on the following three places as the seeds of NL and HL respectively: (1) The ring halfway between the outer and inner boundaries of NL and HL. (2) The ring halfway between (1) and the outer boundaries of NL and HL. (3) The ring halfway between (1) and the inner boundaries of NL and HL. Make the three options (1), (2) and (3) as a list. The experiments show that choosing (2) as seeds is the best choice.

We still use the morphological thinning operation to get the seeds of NL and HL. Fig. 3.4(a) shows the crisp segmentation result of NL. We call the bwmorph function with “thin” to shrink NL, so that the outer boundary of the object after the shrinkage is positioned at (2), which is shown in Fig.

3.4(b). We then extract the pixels of this outer boundary and use them as seeds for NL (see Fig. 3.4(c)). We apply the same operation for HL. Fig.

3.5(a-c) display the seeds selection of HL.

16

(23)

a b c

Fig. 3.4: (a) Crisp segmentation result of NL. (b) After shrinking NL the outer boundary of the object is positioned at (2). (c) Seed image of NL,

which is the outer boundary of (b).

a b c

Fig. 3.5: (a) Crisp segmentation result of HL. (b) After shrinking HL the outer boundary of the object is positioned at (2). (c) Seed image of HL,

which is the outer boundary of (b).

3. Seeds of the ML: For this step we use the image including the crisp results of the segmented cells (see Fig. 3.6(a)). First we invert this binary image to get the crisp result of ML, which is shown in Fig. 3.6(b). Then we shrink it into a minimally stroke, the skeleton, by calling the bwmorph with the “thin”

parameter. The stroke as the seeds of ML of the whole image is shown in Fig. 3.6(c). Divide it into sub-images for corresponding compression wood cells. The seeds of ML of the example cell are depicted in Fig. 3.6(d).

a b

(24)

c d

Fig. 3.6: (a) Image including the crisp result of the segmented cells. (b) The complement image of (a). (c) Seed image of ML, which is the skeleton

of (b). (d) Seed image of ML for the example cell.

The seeds of the fours objects (L, NL, HL and ML) are notated SL, SnL, ShL and SmL, respectively. The intensity values of the seeds are 1. We combine them into a seed image S by using the following equation.

S = SL + SnL ∗ 2 + ShL ∗ 3 + SmL ∗ 4, (9) Hence, the pixels in the seed image S, whose intensity values are 1 are seeds of L, the pixels with the intensity value 2, 3 and 4 correspond to seeds of NL, HL and ML, respectively. The FC method and the WDT method use the same seed image for the same cell. Fig. 3.7 shows the seed image of the example cell.

Fig. 3.7: The seed image of the example cell

3.6 Comparison methods

The overlapping degree of the segmented regions (overlapping degree) and the devi- ation between the segmentation boundaries (boundary deviation). These methods are used to measure the similarity of two segmented regions of the same wood cell.

3.6.1 Overlapping degree of the segmented regions

The overlapping degree method utilizes the relation between the overlapping area and the total area of the two regions, which is depicted in Fig. 3.8.

18

(25)

Fig. 3.8: The two regions A, B and the overlapping part of A and B We define the following equation to calculate the overlapping degree η of A and B:

η(A, B) = 2 ∗ |A ∩ B|

|A| + |B| (10)

It is clearly from Eq. 10 that the range of η is between 0 and 1. When the value of η is large, the two regions have a great overlap. 1 means the two regions totally overlap and 0 means the two regions do not intersect.

3.6.2 Deviation between the segmentation boundaries

In the boundary deviation method, the deviation between segmentation bound- aries of the same region are used to evaluate the distance between the segmentation lines. Fig. 3.9 shows the diagram of two segmentation boundaries.

Fig. 3.9: The diagram of two segmentation boundaries.

The deviation D is calculated as follow:

D = 1

2(DL1L2 + DL2L1), (11) where

DLjLk =

v u u t

P

iωid2i

P

iωi

, (12)

where di is the minimal distance, which is from the pixel i on Lj to Lk. ωi is the weight, which is related to the position of pixel i and based on the curvature of Lj.

(26)

It ensures a better evaluation of the distances between Lj and Lk. The following gives the weights, which were suggested by Dorst and Smeulders [19].

ωi =

( 0.948 if step i is vertical or horizontal

1.343 if step i is diagonal (13)

20

(27)

4 Evaluation and results

We applied the FC method and the WDT method on 29 sub-images of wood cells to get the results of the two fuzzy segmentation methods. These results and additionally the results of the crisp segmentation were compared with the manual delineation. Here, we checked if the fuzzy segmentation methods refine the results of the crisp segmentation. A qualitative evaluation is described in section 4.1.

A quantitative analysis, which is using the overlapping degree of the segmented regions and the deviation between the segmentation boundaries, is presented in section 4.2.

4.1 Qualitative evaluation

This evaluation aims to get an intuitive comparison between the results of the four segmentation methods for the regions L, NL and HL. Fig. 4.1 displays four sub-images of wood cells and their corresponding segmentation results.

Fig. 4.1: Four sub-images of wood cells are listed in the first row and their segmentation results are shown from the second row to the fifth row, which correspond to the manual segmentation, the crisp segmentation, the FC method

and the WDT method.

The first thing to note is that the boundaries of each region in the manual and crisp segmentation results are smooth lines, which is derived from the nature of the

(28)

two segmentation methods. The segmentation boundaries of the WDT method are a bit jagged, whereas the boundaries of the FC method are very jagged. This is because the definition of the fuzzy affinity is not suitable for this problem, es- pecially for the outer boundaries of NL and HL. This might be a reason for the lower accuracy of the FC method compared to the WDT method.

The second thing we observed is about the similarity of the automatic segmenta- tion results to the manual one. For the first two example cells in Fig. 4.1 (first and second columns) the manual and automatic segmentation results look very similar, whereas for the last two example cells (third and fourth column in Fig.

4.1) the WDT and FC results are mostly related to the crisp segmentation. This is because the seed images for the two fuzzy segmentation methods are based on the crisp segmentation results.

4.2 Quantitative evaluation

In this subsection we evaluate the results of the four segmentation methods in a quantitative way. For this we used the overlapping degree of the segmented regions and the deviation between the segmentation boundaries as described in section 3.6. There are six combinations of the four segmentation methods: Manual vs Crisp, Manual vs FC, Manual vs WDT, Crisp vs FC, Crisp vs WDT and FC vs WDT. We use the manual segmentation results as the ground truth. The closer to the manual segmentation results the better. So in the following two evaluations we emphatically analyze the relationship between the three automatic segmentation methods and the manual segmentation.

4.2.1 Evaluation by using the overlapping degree method

In the first evaluation, the overlapping degree of the segmented regions is used to calculate the similarity of each combination. For each cell we calculate the mean and standard deviation of the overlapping degree of the regions L, NL and HL separately for all before mentioned combinations. Tables 4.1-4.3 list the mean with the standard deviation of the overlapping degrees of L, NL and HL, respectively.

The closer the overlapping degree is to 1, the more similar the segmentation results are.

Crisp WDT FC

Manual 0.91 (0.04) 0.91 (0.03) 0.93 (0.03) FC 0.97 (0.02) 0.97 (0.02) -

WDT 0.98 (0.02) - -

Table 4.1: Mean (and standard deviation) of the overlapping degree of L.

Crisp WDT FC

Manual 0.91 (0.03) 0.91 (0.02) 0.91 (0.02) FC 0.95 (0.01) 0.95 (0.01) -

WDT 0.97 (0.01) - -

Table 4.2: Mean (and standard deviation) of the overlapping degree of NL.

22

(29)

Crisp WDT FC Manual 0.83 (0.06) 0.85 (0.06) 0.81 (0.06)

FC 0.86 (0.04) 0.89 (0.01) -

WDT 0.90 (0.02) - -

Table 4.3: Mean (and standard deviation) of the overlapping degree of HL.

The first rows of Table 4.1-4.3 show the mean (with the standard deviation) of overlapping degrees of the three automatic segmentation methods compared with the manual segmentation in L, NL and HL respectively. It is clear from the first row of Table 4.1 that the FC method has the best performance in L. The WDT method and the crisp segmentation have the same mean, but the WDT method is better because it has the smaller standard deviation. We note from the first row in Table 4.2 that the means of the three automatic segmentation methods are same in NL. So according to their standard deviations, the FC and the WDT methods perform similar, but better than the crisp segmentation method. The first row of Table 4.3 shows that the WDT method outperforms both the FC method and the crisp segmentation in HL.

By observing the rest of the overlapping degree results it became obvious that the performance of the crisp segmentation and the WDT method are most similar in L, NL and HL. So the WDT method works more similar to the crisp segmentation method than the FC method.

4.2.2 Evaluation by using the boundary deviation method

In the second evaluation, we use the deviation between the segmentation bound- aries to calculate the deviation of the segmentation boundaries of regions L, NL and HL. The means and the standard deviations of the three regions are calculated to measure the similarity of each combination, which are listed in Table 4.4-4.6.

The smaller the boundary deviation is, the more similar the segmentation results are.

Crisp WDT FC

Manual 5.30 (0.76) 5.72 (0.96) 4.69 (0.67) FC 1.97 (0.40) 2.38 (0.71) -

WDT 1.55 (0.47) - -

Table 4.4: Mean (and standard deviation) of the boundary deviation of L

Crisp WDT FC

Manual 3.31 (1.00) 2.84 (0.74) 3.89 (0.69) FC 2.96 (0.58) 2.67 (0.36) -

WDT 1.78 (0.46) - -

Table 4.5: Mean (and standard deviation) of the boundary deviation of NL

Crisp WDT FC

Manual 3.65 (0.93) 3.17 (1.14) 3.52 (1.04) FC 2.71 (0.52) 1.85 (0.23) -

WDT 2.51 (0.46) - -

Table 4.6: Mean (and standard deviation) of the boundary deviation of HL

(30)

By comparing the manual result with the automatic results, it is clear that the FC method also performs best in L. The WDT method has the best performance in NL and HL.

The values of the boundary deviation show that the results of the crisp segmenta- tion and the WDT method are most similar regarding the regions L and NL. But for HL the FC and the WDT methods performed most similar.

4.2.3 Final evaluation result

In the evaluation results of the two comparison methods, the best segmentation methods in regions L, NL and HL are shown in the first two rows of Table 4.7. For the regions L and HL the results are clear. The FC method performed best for L and the WDT method performed best for HL. For NL we have to take a closer look, because according to the overlapping degree the WDT and FC methods had a similar performance. But since the boundary deviation votes for the WDT method and as mentioned in the qualitative evaluation, the segmentation boundaries of NL by using the FC method are most ragged among the three automatic segmentation methods, we regard the WDT method as more accurate concerning NL. The final evaluation results are shown in the last row of Table 4.7.

L NL HL

overlapping degree FC WDT, FC WDT boundary deviation FC WDT WDT

Final results FC WDT WDT

Table 4.7: The best segmentation methods in L, NL and HL

4.3 Special case analysis

We noticed that for some cells the overlapping degree and the boundary deviation were quite large when comparing manual and automatic segmentations. Especially the region HL was affected by this.

We chose one example wood cell, see Fig. 4.2(a), to visualize this phenomena. Fig.

4.2(b-e) show the results of the manual segmentation, the crisp segmentation, the FC method and the WDT method, respectively.

24

(31)

a b

c d

e f

Fig. 4.2: (a) Sub-image of wood cell. (b) Manual segmentation result. (c) Crisp segmentation result. (d) Result of the FC method. (e) Result of the WDT

method. (f) Seed points for HL.

In the first column of Table 4.8 and 4.9 we listed the overlapping degrees and the boundary deviations of the three automatic segmentation results compared with the manual result on HL of the selected cell. For comparison the second and third columns contain the corresponding means (compare Table 4.3 and 4.6) and the differences between these means and the calculated values of the selected cell.

overlapping degree Mean Difference

Crisp 0.62 0.83 -0.21

FC 0.64 0.81 -0.17

WDT 0.67 0.85 -0.18

Table 4.8: The first column contains the overlapping degree of HL of the selected cell. Here, the manual segmentation was compared with the three listed

automatic segmentations. The second column contains the mean of the overlapping degree for all 29 cells and the third column contains the difference

between the values in the first and the second column.

(32)

Deviation Mean Difference

Crisp 6.07 3.65 2.42

FC 6.93 3.52 3.41

WDT 6.69 3.17 3.52

Table 4.9: The first column contains the boundary deviation of HL of the selected cell. Here, the manual segmentation was compared with the three listed

automatic segmentations. The second column contains the mean of the boundary deviation for all 29 cells and the third column contains the difference

between the values in the first and the second column.

Tables 4.8-4.9 show that there are large difference between the three automatic segmentation results and the manual result. As we mentioned before, the multi- seed selection is based on the crisp segmentation results. If the seed points are badly chosen, the quality of the performance of FC and WDT is directly affected.

Comparing the seed points of HL, in Fig. 4.2 (f), and the manual segmentation, in Fig. 4.2 (b), it is clear that a part of the seeds lie outside the manually selected region HL. This means that the results of FC and WDT will always contain pixels that are wrongly classified as HL. With the here described methods this is not avoidable.

26

(33)

5 Conclusion and future work

The original intention was to replace the manual segmentation of compression wood cells by an automatic method. A crisp segmentation method [3] has been developed for this purpose. This thesis aimed to refine the results of the crisp seg- mentation provided by using fuzzy segmentation methods. We applied two fuzzy segmentation methods: Iterative Relative Multi Object Fuzzy Connectedness and Weighted Distance Transform on Curved Space, the FC method performs best for the region L compared to the other automatic segmentation methods. For the re- gions NL and HL the WDT method outperforms the others. Here, we see that we were able to refine the crisp segmentation results by using the fuzzy segmentation methods.

We note that there are still some drawbacks with the two fuzzy segmentation methods. The problem with the FC method is that the fuzzy affinity function does not work well on the regions NL and HL. It causes jagged segmentation boundaries, which differed a lot in appearance compared with the manual seg- mentation. In future work we could consider using different functions to calculate the fuzzy affinity according to the properties of different regions. The other prob- lem is related to the multi-seeds selection. Since it is based on the given crisp segmentation result, a bad crisp segmentation leads to bad fuzzy segmentation results. Since it is difficult to select the seeds from the original image directly, in future work we could weigh the seed points based on how probable it is that the pixels are actually lying in the corresponding region.

According to the evaluation results, the FC method performs best for region L and the WDT method has the best performance for the regions NL and HL. Since these algorithms use the same seed images, it is possible to develop a hybrid algorithm.

This hybrid algorithm could perform better than one of the fuzzy segmentation methods alone.

It is also relevant to consider the time performance of the segmentation algorithms.

Until now most of the algorithms of this thesis are implemented in MATLAB, which is an interpreted language. An implementation using a compiler language, like C, would probably be more time efficient.

(34)

References

[1] S. Raiskila. The effect of lignin content and lignin modification on norway spruce wood properties and decay resistance. Dissertationes Forestales, 68:1–

34, 2008.

[2] J.L. Bowyer, R. Shmulsky, and J.G. Haygreen. Forest Products and Wood Science An Introduction. BlackWell publishing, fifth edition, 2007.

[3] B. Selig, C.L. Luengo Hendriks, S. Bardage, and G. Borgefors. Segmenta- tion of highly lignified zones in wood fibre cross-sections. In Proceedings of 16th Scandinavian Conference on Image Analysis (SCIA), pages 15–18, Oslo, Norway, 2009.

[4] L.A. Donaldson. Lignification and lignin topochemistry-an ultrastructural view. Phytochemistry, 57:859–873, 2001.

[5] T. Akbulut and N. Ayrilmis. Effect of compression wood on surface rough- ness and surface absorption of medium density fiberboard. Silva Fennica, 40(1):161–167, 2006.

[6] N. Otsu. A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics, 9(1):62–66, 1979.

[7] K. Fukunaga and L.D. Hostetler. The estimation of the gradient of a density function. IEEE Transactions on Information Theory, 21:32–40, 1975.

[8] S.Y. Wan, J.T. Chen, and S.H. Yeh. Efficient fuzzy-connectedness segmen- tation using symmetric convolution and adaptive thresholding. International Conference on Image Processing (ICIP), 2:905–908, 2004.

[9] K.C. Ciesielski, J.K. Udupa, P.K. Saha, and Y. Zhuge. Iterative relative fuzzy connectedness for multiple objects with multiple seeds. Comput.Vis. Image Understand, 107:160–182, 2007.

[10] P.J. Toivanen. New geodesic distance transforms for gray-scale images. Pat- tern Recognition Letters, 17:437–450, 1996.

[11] N. Sladoje. Reviews of scientific papers on application of fuzzy set theory in image segmentation. Internal report No.32, Center for Image Analysis, Swedish University of Agricultural Science, Uppsala University, 2001.

[12] P.K. Saha and J.K. Udupa. Fuzzy connected object delineation: Axiomatic path strength definition and the case of multiple seeds. Comput.Vis. Image Understand, 83:275–295, 2001.

[13] J.K. Udupa and S. Samarasekera. Fuzzy connectedness and object definition:

Theory, algorithms, and applications in image segmentation. Graph. Models Image Process, 58(3):246–261, 1996.

[14] P.K. Saha and J.K. Udupa. Relative fuzzy connectedness among multiple objects: theory, algorithms, and applications in image segmentation. Com- put.Vis. Image Understand, 82(1):42–56, 2001.

28

(35)

[15] P.K. Saha, J.K. Udupa, and R.A. Lotufo. Relative fuzzy connectedness and object definition: theory, algorithms, and applications in image segmentation.

IEEE Trans. Pattern Anal. Mach. Intell, 24:1485–1500, 2002.

[16] L. Ikonen and P Toivanen. Shortest route on height map using gray-level dis- tance transforms. Discrete Geometry for Computer Imagery (DGCI), pages 308–316, 2003.

[17] C. Fouard and M. Gedda. An objective comparison between gray weighted distance transforms and distance transforms on curved spaces. In Proceedings of the 13th International Conference on Discrete Geometry for Computer Imagery (DGCI), Lecture Notes in Computer Science, volume 4242, pages 259–270, 2006.

[18] Matlab r2011a documentation. http://www.mathworks.com/help/index.

html, April 2011.

[19] L. Dorst and A.W.M. Smeulders. Length estimators for digitized contours.

Computer Vision, Graphics and Image Processing, 40:311–333, 1987.

References

Related documents

This thesis includes four papers addressing the difficulties associated with multi-atlas segmentation in several ways; by speeding up and increasing the accu- racy of

In Panel (b) we show the maximum OOS cross-sectional R 2 attained by a model with n factors (on the x-axis) across all possible values of the prior root expected SR 2 (κ) for

These cutting edges are theoretically informed and focus attention on the core spatial ideas themselves: the construction of new forms of policy knowledge giving legitimacy to

For this specific case study, a number of dimensions (risk taking, idea time, dynamism/liveliness, playfulness/humor, idea support and encouragement, debates, and discussion)

The results show that the test error for the ShELU activation function is significantly better than for ELU, whereas the error for SvELU is slightly inferior. The results suggest that

Complete disappearance of TBBPA was observed within the time frame of the study, and it was confirmed that neither dehalogenation to the estroge- nic bisphenol A (BPA) nor

The ultimate purpose of this master’s thesis was to evaluate the effectiveness of UV pretreatment of alkaline bleaching wastewater from a kraft pulp and paper mill prior to

impression management is one of the crucial aspects of all social interaction (Goffman, 1959), and it is reasonable to assume that one of the essential attractions of tobacco for